Repository navigation
perf(pr-merge): let a wake refuse on the last sweep's unmoved refusing report - #13107
Conversation
…ut a fresh check A PR-scoped pr-merge wake whose last sweep's report does not stand ran the post-merge check fresh plus `settle --idle-tick --fresh` (64-154 GITHUB_TOKEN calls), and in 6 of 8 sampled wakes that fresh check refused and the wake armed nothing. keep-report now asks `babysit_verify_evidence.py refusal-stands` first, for a last report from a check that judged (exit 0, 1 or 5). It stands, and the wake refuses with no fresh check, only when: - the report refuses on what it found: exit 1 (readable, failing), or the idle refusal needs-dispatch, unattributed, quarantines or excused. Not stale-soon or dispatch-deadline (time), not a hold (only on an unreadable report), not reruns (a red run can leave the _lane_reruns lookback with nothing moving), and not a report missing pins or outstandingSince or carrying a failed lane re-run read; - nothing it was read from moved: age within SHARED_MAX_AGE, the same identity and lane, main's tip, config commit and demotion (_moved, a tripped probe read again), the quarantine issues and pins (idle_marks_refusal), and no verifying run created, re-run or updated since computedAt whatever its status (_verifying_runs_unchanged with the new `running` keyword; its default, which ignores in-progress runs, is unchanged for the sweep). Otherwise the fresh check runs exactly as before. The skip only refuses: the report is removed and the arm step stays skipped, as on a refused fresh check, so a wake never arms on a stale report. The notice names the report (exit code, computedAt) and its refusal; the pr-merge-wake outcome line reads "the last sweep's report still refuses (<refusal>) and nothing it read has moved". The arm step's env now carries BABYSIT_POSTMERGE_ATTEMPTS, pointing at the attempts.json kept beside the report it reads (a sweep's artifact, the last sweep's on a kept wake, and a fresh wake's check now copies its file there), so the room's recompute answers completed attempts with no read. keep-report also carries BABYSIT_RUN_CACHE at the arm step's path, so its check and settle can share run-cache answers with the room. Call delta per wake whose last report does not stand: +5 to +10 calls for refusal-stands (branch, config, head, demotion probe, two run listings, quarantine listing, pins), and -64 to -154 when it stands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l skip The README change under docs/conventions/pr-pipeline/ needs a pr-pipeline fragment; it changes only the wake's GitHub calls, so no release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis 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: PR #13107, no findingsI read every hunk of all 8 changed files. Three of them match trusted paths and got extra scrutiny: Merge hold (keep-report step and the new
Untrusted text and injection: none.
Other checks:
Spend: this only changes GITHUB_TOKEN API calls. It cuts 64–154 calls from a wake whose refusal stands, and adds about 7–10 probe calls to a wake whose refusal does not stand. No billable resource is involved, so there is no cost hold. critical-findings: 0 |
|
claude-review reviewed Code review: PR #13107 (head 9c875ca)No findings. I read every hunk of all 8 changed files in What I checked
Other checks
|
No related issue: part of the hub's order to cut enable-auto-merge's GITHUB_TOKEN spend. Issues are being driven to zero, so none was filed.
Summary
A PR-scoped pr-merge wake runs the keep-report step: a fresh post-merge check plus
settle --idle-tick --fresh, at 64-154 calls. In 6 of 8 sampled wakes that check refused and the wake armed nothing (attribution:.work/gh-monitor/trends/eam-calls/result.md, cut #1).Fix
Skip a refusal that stands (A). Before running the fresh check, a wake tests whether the last sweep's report still refuses, using what that report read:
_movedchecks on head, config commit and demotion (a tripped demotion probe is read again).idle_runs_refusal(running=True)). Quarantine issues and pins are unchanged.When the refusal stands, the wake refuses as the report did. It prints a
::notice, sets outputrefusal-stands, and logsreport=last outcome=skipped: the last sweep's report still refuses (<refusal>) and nothing it read has moved. The report is removed, so the arm step stays skipped: a wake never arms on a stale report. The sweep is unchanged (the default isrunning=False).Change B: the arm step gets
BABYSIT_POSTMERGE_ATTEMPTS, so the room's recompute reads completed run attempts from the file instead of the API. keep-report getsBABYSIT_RUN_CACHE, the arm step's path, so its processes share perf(source-control): list only open quarantine issues and share fixed-SHA compares #13096's fixed-SHA compares.Call delta (R34), which needs measuring:
Verification
sync-hold-floor.py --check,check-changelog-fragments.sh --check-required origin/main, and ruff check pass. actionlint shows only the existingqueue:findings.refusal-stands=trueagainst wakes that paid the probe and ran the fresh check anyway. Revert if probe-only wakes x 9 > skipped wakes x 64 (net calls rise).Related
🤖 Generated with Claude Code