Repository navigation
fix(pr-merge): let a passed newer commit clear an unattributed red run - #17003
Conversation
A red full run charged to no merge (red again on its re-run, failing only checks already failing before the merge) stayed in the post-merge report's `unattributed` list for good: supersession is read only for a run with no attempt 2, and the red run keeps its merge unsettled, so every check judged it again. `idle_report_refusal` refuses any report with an unattributed run, so pr-merge's PR-scoped wake never armed and paid about 80 GITHUB_TOKEN calls a run for a fresh check settle then refused. - `_judge` stops counting such a run once `_Context.superseded` finds a full run that passed after it on a newer commit of the branch (`_recovered`). A pass on the same commit, or a spent compare budget, leaves it counting; a newly failing check is still a failure. - `settle --idle-tick` refuses a report that stands but for its unattributed runs, with nothing else moved, as `unattributed-unmoved`. pr-merge.yml's wake then runs no fresh check, as it already does for `code-changed`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
dispatch-post-merge-runs's own idle tick runs the full check after any refusal, so the unattributed-unmoved probe's reads (verifying runs, the lane room's rule, quarantine issues and pins) bought it nothing. The probe now runs only under `settle --probe-unmoved`, which only the PR-scoped wake's settle of the last sweep's report passes; without it an unattributed report is refused with no read, as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… fix Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed Security review: no security issues foundI read all 7 changed files in full. Three of them are trusted-path files and need extra scrutiny: Merge-hold path checked. I looked at both changes for a merge hold that could let through something the base code stopped.
No token scope, trusted actor, untrusted-text path or kill switch is touched, and none of the changed files is a plugin manifest. Spend: this lowers GITHUB_TOKEN API use, because the PR-scoped wake skips the roughly 100-call fresh post-merge check when nothing has moved. It costs no money. critical-findings: 0 |
|
claude-review reviewed Code review: #17003 at d139597One advisory finding. Nothing blocks the merge. I read every hunk of all 7 changed files, the code the changed lines call and the related tests. What I checked, and found correct:
Finding (advisory):
Not findings:
Review settings:
Verifier dropped 0 of 1 candidates. |
No related issue: hub finding L770, measured in .work token-spend report
Summary
pr-merge's PR-scoped wake (
pr-merge: arm #N, job Enable Auto Merge) armed nothing in 16 of 16 runs on 2026-11-17 between 20:00Z and 23:50Z. Eight of those runs spent 103-107 GITHUB_TOKEN calls each, 44 of them pagingactions/workflows/{x}/runs, to build a fresh post-merge report.settle --idle-tick --freshthen refused that report asidle tick unattributed. Example: run 44214235479.That report's
unattributedlist held four red main full runs from 2026-11-17 07:47Z-11:18Z: 44041416405, 44050918457, 44067913362 and 44072876681. They failed on flaky tests that were later fixed, and main has passed since.Root cause: an unattributed red run never ages out.
_Context._outcome: the identity's re-run was red again, or someone else re-ran it._Context.superseded) is read only when there is no attempt 2.final = Falsein_judge, so the merge never settles and every later check judges it again.unattributedfor good.idle_report_refusalrefuses any report with anunattributedentry, so the wake could never arm.Fix
babysit_postmerge.py._judgestops counting a red run charged to no merge once_Context.supersededfinds a full run that passed after it on a newer commit of the default branch (_recovered).SETTLE_COMPARE_BUDGET) leaves it counting, which is the conservative direction.final = False), as before.babysit_verify_evidence.py settle --idle-tick --probe-unmoved. With the new flag, a report whose only refusal is its unattributed runs gets the rest of the idle rule: verifying runs, the lane room's rule, quarantine issues and pins. If all of those pass, it is refused asidle tick unattributed-unmoved.idle tick unattributedrefusal stands.--idle-tickand rejects--fresh.pr-merge.yml, step "Keep the last sweep's report only while nothing it read has moved". The wake's settle of the last sweep's report passes--probe-unmoved. Onunattributed-unmovedthe wake ends without the fresh check, as the existingpost-merge answer code-changedbranch already does. The next sweep decides.Verification
python3 -m unittest discover -s plugins/source-control/skills/babysit-prs/scripts/tests -p "test_babysit_postmerge*.py": 587 tests OK.... -p test_babysit_lane_room.py: 93 tests OK.... -p "test_babysit_verify_evidence*.py": 453 tests OK.node --test .github/scripts/pr-merge/*.test.mjs: 984 pass, 0 fail.scripts/run-ruff.sh checkon the changed Python files: clean.Baseline.test_a_pre_existing_red_run_stops_counting_once_a_newer_commit_passes: the report'sunattributedis empty, andidle_report_refusalreturns None.Baseline.test_a_pre_existing_red_run_counts_while_no_newer_commit_passed: with only a same-commit pass, the refusal is stillunattributed.Baseline.test_a_newer_passing_commit_does_not_excuse_a_newly_failing_check.SettleCommandunattributed-unmovedcases:--probe-unmoved,--freshincluded;workflow.test.mjs:unattributed-unmovedruns no fresh check, whileunattributedstill does. The wake's first settle call carries--probe-unmoved._judgerestored to the oldelse, the superseded case fails.Related
unattributedrefusal.🤖 Generated with Claude Code