Repository navigation
fix: resolve registry guard base ref at runtime - #15990
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
All contributors have signed the CLA ✍️ ✅ |
|
Review: independent review of the workflow, local guard resolver, and regression tests found no correctness issues.\n\nFixed: no review findings required changes. The final delta also asserts the required shallow-fetch rationale comment.\n\nLeft: the local change-area suite and broad guard sweep retain unrelated existing API, runner, and checkout failures documented in the PR body. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
|
Merge receipt for |
eaec3f0 fix: resolve registry guard base ref at runtime (manaflow-ai#15990) 5fbbc0c [codex] Improve setup errors for missing Xcode and GhosttyKit cache locks (manaflow-ai#6443) e53826c fix: ignore SwiftPM warning text in package lane (manaflow-ai#15975) # Conflicts: # .github/workflows/ci-guards.yml
Review landed after the merge. Verdict LAND, which this already did, plus one coverage defect worth a follow-up.The fix is correct and I proved it rather than reading it. The reviewer built a real fixture: a copy of the PR-head tree as a git repo, a bare origin, a branch adding a test, a
Reproduced in both merge-ref shapes: the fast-forward case where the branch already contains main, and the real synthetic-merge case. Old 1, new 0 in both. Confirmed from the live CI log for check run Degradation is loud, not silent, and better than it looks. A failed The divergence from #15943 is justified, and I want that on the record since the two guards now resolve their base differently. #15943's Variable rename is clean: Mutation testing: 13 mutations, 10 killed, 3 survived. The one that matters, and it is a follow-up not a complaintNo test observes the guard's exit code, so the guard can be silently disabled. Root cause: every I am opening a follow-up PR for that plus the next item. Other non-blocking items
Guard sweep: 9 failures on PR head against 8 on merge base — Raindrop g2 🫧 / Run: run_worker_20260930_3fc64ba6 |
The Python test execution registry guard was using
github.event.pull_request.base.sha, which can be an old base tip recorded when a long-lived pull request was synchronized. After a catch-up merge, tests that main added after that stale SHA were attributed to the pull request and legacy-lane checks blocked unrelated work.For #5677 and #5341, the workflow reported base SHA
9bf6cb8c9421from 2026-09-17 even though both pull requests were updated on 2026-09-30. Main was at6d7ad149121a, and commit224327b55a07added the registry plus ten legacy tests on 2026-09-24. Those tests were reported against both pull requests.The workflow now reads
github.event.pull_request.base.ref, fetches that branch at depth 1, resolvesFETCH_HEAD, and passes the resolved commit to the validator. Push events still run without--base-sha. The shallow fetch is intentional: when merge-base history is unavailable, the validator's two-tree fallback compares directly with the current base tip. The local guard runner now resolves the new expression to its explicit local base revision.The scratch-repository regression demonstrates both directions: with the stale branch-point SHA,
newly_added_testsreturnstests/test_mine.pyand main'stests/test_theirs.py; with the current main tip, it returns onlytests/test_mine.py. The workflow test failed before the fix, failed after mutating the workflow back tobase.sha, and passed after restoration.This unblocks #5677, #5341, and #15711.
Validation: registry tests 31/31, local guard planner tests 17/17, validator
--help, and actionlint pass.test_ci_change_areas.pypassed 268/270; its two failures are unrelated GitHub API and stale-head environment failures. The guard sweep retains the knownRUNNER_TEMP, registry variable unbound, Ghostty Zig, stored DispatchWorkItem, bash integration, and seed-derived-data failures, plus existing checkout/API failures in other guard blocks.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Fixes the Python test execution registry guard so long-lived pull requests no longer get blocked for tests added to main after their stale base SHA. Previously the workflow used
github.event.pull_request.base.sha, which records the base tip from when the PR was last synchronized; after a catch-up merge, newer main commits were attributed to the PR and tripped legacy-lane checks for unrelated work, affecting #5677, #5341, and #15711.The workflow now reads
github.event.pull_request.base.ref, fetches that branch at depth 1, resolvesFETCH_HEAD, and passes the resolved commit to the validator. The fetch stays shallow on purpose: when merge-base history is unavailable, the validator's two-tree fallback compares directly against the current base tip. Push events still run without--base-sha, and the local guard runner resolves the new expression to its explicit local base revision.Written for commit 363ef86. Summary will update on new commits.
Summary by CodeRabbit
Bug Fixes
Tests