fix: Remove the dispatcher contract integer generation - #1504
Conversation
…Versions The dispatcher and the Unity package were double-gated: an integer generation (dispatcherContractVersion vs REQUIRED_DISPATCHER_CONTRACT_VERSION, compared through --version --json) on top of the semver floor the pin's minimumDispatcherVersion already enforces. The dispatcher self-updates and releases monotonically, so the floor alone expresses capability requirements and the equality gate only added a value to keep in sync (it was never bumped). The embedded contract JSONs' schemaVersion fields gated nothing because the JSON is compiled into the same binary that parses it. The IPC protocolVersion is now the only integer compatibility generation in the system. - Drop dispatcherContractVersion and schemaVersion from dispatcher-contract.json and schemaVersion from contract.json, with their parse gates and getters - Stop emitting DispatcherContractVersion from --version --json and stop parsing it in CliInstallationDetector - Delete the check-dispatcher-contract guard, its cmd, and its workflow step; shrink the dispatcher minimum version guard accordingly - Refresh shared-inputs stamps for the cli/common contract change
clicore.Version() and clicore.ProtocolVersion() were pure pass-through wrappers around clicontract, which owns the embedded contract data. Two names for the same value invite divergence in call sites, so every caller now reads clicontract directly and the wrappers are gone.
|
Warning Review limit reached
Next review available in: 36 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (33)
✨ 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 |
Summary
Part 3 of the version-gate consolidation (G4), following #1501 and #1503. The dispatcher and the Unity package were double-gated: an integer generation (
dispatcherContractVersionvsREQUIRED_DISPATCHER_CONTRACT_VERSION, compared through--version --json) on top of the semver floor the pin'sminimumDispatcherVersionalready enforces. The dispatcher self-updates and releases monotonically, so the floor alone expresses capability requirements — the equality gate only added a value to keep in sync (it was never bumped from 1). The embedded contract JSONs'schemaVersionfields gated nothing because the JSON is compiled into the same binary that parses it.After this PR the IPC
protocolVersionis the only integer compatibility generation in the system.dispatcherContractVersionandschemaVersionfromdispatcher-contract.jsonandschemaVersionfromcontract.json, with their parse gates and gettersDispatcherContractVersionfrom--version --jsonand stop parsing it inCliInstallationDetectorcheck-dispatcher-contractguard, its cmd, and its workflow step; shrink the dispatcher minimum version guard accordinglyclicore.Version()/clicore.ProtocolVersion()ontoclicontract, which owns the embedded contract datacli/commoncontract changeValidation
scripts/check-go-cli.sh,scripts/test-release-please-config.sh,scripts/test-stamp-release-inputs.sh,scripts/test-resolve-dispatcher-release-target.shcheck-release-triggers: passed (common change paired with dispatcher and project-runner touches)uloop compile: 0 errors / 0 warnings;CliInstallationDetectorTests: 15/15 passeduloop --version --jsonnow emits onlyDispatcherVersion