docs: add driver client/exporter compatibility rule#782
Conversation
Add .claude/rules/driver-compatibility.md (via .cursor/rules, matching the existing symlink pattern) documenting the backwards-compatibility invariants between independently-released clients and exporters: - client() class path stability: the exporter reports this string and the client imports it from its own environment, so changing it for a released driver breaks old clients with ImportError - stable wire surfaces: RPC names/argument shapes and the ClientStreamResource/PresignedRequestResource handle types - deprecation policy for public client method parameters and j CLI flags - jumpstarter* dependency pinning via hatch-pin-jumpstarter - the opendal removal pattern established in #535 (issue #441), as a checklist for migrating the remaining drivers - end-to-end testing expectations for file-transfer paths These invariants surfaced while reviewing #535, where the QEMU driver migration was safe only because QemuFlasher explicitly overrides client(); this rule makes that requirement explicit for future migrations and AI-assisted changes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThis PR establishes driver compatibility rules for maintaining interoperability between independently released exporter and client packages. It creates a new rule file documenting stability invariants around class paths, wire protocols, versioning, and testing, then registers it in the project documentation. ChangesDriver Compatibility Rules
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.cursor/rules/driver-compatibility.mdc (1)
45-46: Update deprecation-window reviewer judgment guidance
.cursor/rules/driver-compatibility.mdcalready mandates “warn/ignore for at least one release” plus documenting the removals and migration path in release notes, so the “one-release is a reviewer judgment point” framing isn’t supported by the repo context.If this PR is actually deprecating/removing a public client parameter, align the implementation with that rule and ensure the eventual removal + migration notes are included (existing
warnings.warn(...)patterns exist, e.g.python/packages/jumpstarter/jumpstarter/client/flasher.pyfor parameter-related warnings).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.cursor/rules/driver-compatibility.mdc around lines 45 - 46, The rule in driver-compatibility.mdc requires deprecating a public parameter with a warn/ignore period for at least one release and documenting removal + migration notes, so if this PR actually deprecates/removes a public client parameter, update the implementation to emit a runtime deprecation warning (use warnings.warn(...) where the parameter is accepted, following the pattern in python/packages/jumpstarter/jumpstarter/client/flasher.py), keep the old parameter behavior intact for one release, and add explicit release notes describing the removal and migration path before actually removing the parameter in a later release.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.cursor/rules/driver-compatibility.mdc:
- Around line 45-46: The rule in driver-compatibility.mdc requires deprecating a
public parameter with a warn/ignore period for at least one release and
documenting removal + migration notes, so if this PR actually deprecates/removes
a public client parameter, update the implementation to emit a runtime
deprecation warning (use warnings.warn(...) where the parameter is accepted,
following the pattern in
python/packages/jumpstarter/jumpstarter/client/flasher.py), keep the old
parameter behavior intact for one release, and add explicit release notes
describing the removal and migration path before actually removing the parameter
in a later release.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ad7124e2-d7ba-4cb3-a651-9a620fa727f1
📒 Files selected for processing (3)
.claude/rules/driver-compatibility.md.cursor/rules/driver-compatibility.mdcCLAUDE.md
| # Driver Client/Exporter Compatibility | ||
|
|
||
| Exporters and clients are released and upgraded independently. A lab may run an | ||
| older exporter for months while clients update weekly, or vice versa. Any change |
There was a problem hiding this comment.
I thought we defined a specific upgrade path here, not that both could be outdated?
Summary
Adds a new project rule,
.claude/rules/driver-compatibility.md(stored as.cursor/rules/driver-compatibility.mdcand symlinked, matching the existing pattern), and indexes it inCLAUDE.md.It documents the backwards-compatibility invariants between independently-released clients and exporters, so future driver changes — human or AI-assisted — don't break mixed-version deployments:
client()class path stability: the exporter reports this string and the client imports it from its own environment. Changing it for a released driver breaks old clients withImportError— a failure mode invisible to unit tests. New drivers must always overrideclient()explicitly.ClientStreamResource/PresignedRequestResourcehandle types handled byDriver.resource().jCLI commands and flags stable.jumpstarter*deps viahatch-pin-jumpstarter, so no manual bounds inpyproject.toml.operator=kwarg migration note for release notes.jumpstarter.common.utils.servewhen touching file-transfer paths.Why
While reviewing #535 (QEMU opendal removal), it turned out the migration was cross-version safe only because
QemuFlasherexplicitly overridesclient()— drivers relying on a base-class default would have silently started reporting a class path that old clients can't import. With more drivers queued for the opendal removal series (#441), this invariant should be written down before the next migration rather than rediscovered.Notes for reviewers
client()invariant that makes migrations safe.Related #441
🤖 Generated with Claude Code