fix: Shrink the project runner pin schema to two fields#1503
Conversation
…mumDispatcherVersion The pin carried four fields no runtime code reads: requiredProtocolVersion (the IPC protocol is checked on the wire, never via the pin), packageName, packageVersion, and schemaVersion. Dead fields in the pin invite drift and each one is an extra release-please stamp or guard to keep consistent, so the pin now declares only the two values the dispatcher actually consumes. Older dispatchers reject a pin without schemaVersion; this one-time format break is accepted because pre-release dispatchers are updated manually. - Drop the removed fields from the dispatcher pin struct, its validation, and the release-automation guard, updating fixtures accordingly - Remove the two $.packageVersion pin stamps from release-please-config.json - Keep the two-pin identity and pin-to-contract projectRunnerVersion checks
|
Warning Review limit reached
Next review available in: 42 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 (2)
📝 WalkthroughWalkthroughThis PR simplifies the project-runner pin JSON schema across Unity assets and Go CLI code, removing schemaVersion, packageName, packageVersion, and requiredProtocolVersion fields while retaining only projectRunnerVersion and minimumDispatcherVersion. Corresponding parsing structs, validation logic, tests, and release-please configuration/scripts are updated to match. ChangesProject-runner Pin Schema Simplification
Estimated code review effort: 2 (Simple) | ~12 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@scripts/test-release-please-config.sh`:
- Line 131: The jq assertion in test_release_please_config is using invalid
syntax for accessing the extra-files array, so the filter fails before length is
checked. Update the assert_json_value call in
scripts/test-release-please-config.sh to use a valid jq path for the
Packages/src package entry and its extra-files field, keeping the existing
length check intact.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 14e0bbb0-f989-4e30-83f5-188ef5c3b8df
📒 Files selected for processing (11)
.uloop/project-runner-pin.jsonAssets/Tests/Editor/CliPinSynchronizerTests.csPackages/src/project-runner-pin.jsoncli/common/clicontract/protocol_version_consistency_test.gocli/dispatcher/internal/dispatcher/dispatcher_pin.gocli/dispatcher/internal/dispatcher/dispatcher_test.gocli/release-automation/internal/automation/dispatcher_minimum_version_guard.gocli/release-automation/internal/automation/dispatcher_minimum_version_guard_test.gorelease-please-config.jsonscripts/test-release-please-config.shscripts/test-sync-release-please-package-releases.sh
💤 Files with no reviewable changes (4)
- cli/release-automation/internal/automation/dispatcher_minimum_version_guard.go
- cli/dispatcher/internal/dispatcher/dispatcher_pin.go
- release-please-config.json
- scripts/test-sync-release-please-package-releases.sh
There was a problem hiding this comment.
1 issue found across 11 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
.["extra-files"] after an expression is rejected by jq 1.6, so the config test only worked on newer jq builds; plain ["extra-files"] indexing parses everywhere. The synchronizer fixtures now carry both pin fields so a sync bug that dropped minimumDispatcherVersion would fail the exact-match assertions.
Summary
Part 2 of the version-gate consolidation (G4), following #1501. The pin carried four fields no runtime code reads:
requiredProtocolVersion(the IPC protocol is checked on the wire, never via the pin),packageName,packageVersion, andschemaVersion. Dead fields invite drift, and each one is an extra release-please stamp or guard to keep consistent. The pin now declares only the two values the dispatcher actually consumes:{ "projectRunnerVersion": "...", "minimumDispatcherVersion": "..." }$.packageVersionpin stamps fromrelease-please-config.jsonprojectRunnerVersionconsistency checkCompatibility note
Dispatchers older than this change reject a pin without
schemaVersion, so they need a manualuloop updateonce a package ships the new pin. This one-time format break is accepted for the pre-release line; from here on the pin format evolves additively only (fields are never deleted or renamed), because the forced-update instruction travels inside the pin.Validation
scripts/check-go-cli.sh,scripts/test-release-please-config.sh,scripts/test-stamp-release-inputs.shuloop compile: 0 errors / 0 warnings;CliPinSynchronizerTests: 6/6 passed