Repository navigation
perf(pr-pipeline): re-fire broker-check breaker denials on the first sweep after the clear - #10383
Conversation
…sweep after the switch clears A work-resolve-issue run the lanes kill switch stopped at broker-check ran no model, and the work-unblock sweep proceeds only with the kill switch off. The sweep now re-fires it at once instead of waiting limits.reset-clamp-min hours after the run ended. didNoWork returns the trip's stage; a trip at a post-model `Request the lane token` step still waits the clamp, since its re-fire runs the model again. The trip count, the stranded backoff past limits.limit-stops-per-issue, the WIP cap pause and limits.restarts-per-run are unchanged. 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 No security issues found in this pull request. Scope read: all 4 changed files in Trusted path: What the change does: a work-resolve-issue run that the lanes kill switch stopped at broker-check is now re-fired on the first work-unblock sweep after the switch clears. Before, it waited Why no finding:
Cost: this adds at most one extra lane run per tripped issue. That spends prepaid API credits or subscription usage only, so it is not a hold. manifest: no plugin manifest changed. critical-findings: 0 |
|
claude-review reviewed No findings. I read What the change does. What I checked.
Closing issue. The PR states "No related issue", so there are no acceptance criteria to check. The PR body contains no embedded instructions. Manifests. The diff touches no plugin manifest. Cost. The only effect is that re-fired lane runs start about an hour earlier. That spends prepaid or subscription usage and is not a hold. Security. The security surface did not change. The sweep still runs only with the kill switch off, no workflow or permission files changed, and the broker-side trust path is left alone. |
No related issue: efficiency plan item 11 (.work/gh-monitor/efficiency-plan-2026-10-26.md), owner direction 2026-10-26
Summary
When the lanes kill switch stops a work-resolve-issue run at broker-check, no model runs. Today the work-unblock sweep still waits
limits.reset-clamp-min(1 hour) after the run ended before it re-fires the run. Two facts make that wait unnecessary for this case:proceed(label-unblocked.mjs:1565). So a sweep that reaches the re-fire code has already seen the switch off.TRIP_PCT=20 CLEAR_PCT=40).So a broker-check trip now re-fires on the first sweep after the switch clears.
Expected saving:
label-unblocked.mjs:1187(before:ended + reset-clamp-min); the47 * * * *sweep cron inwork-unblock.yml; the fix(work-unblock): name the refused run and its end time in a breaker re-fire record #10337 commit body.Fix
didNoWorknow returns the trip's stage:checkwhen broker-check refused, or when its kill-switch step skipped the broker ask;tokenwhen aRequest the lane tokenstep was refused (label-unblocked.mjs:814).check-stage trip underlimits.limit-stops-per-issueis due at once (label-unblocked.mjs:1187).token-stage trip still waits the clamp. That run already ran the model, and re-firing it runs the model again.limit-stops-per-issue;wipCapped());limits.restarts-per-run;docs/conventions/pr-pipeline.yamllabel-unblocked description, and apr-pipelinepatch fragment.The clear event cannot start the sweep. The hub sets
CLAUDE_LANES_REPO_DISABLEDwithgh variable set, and a variable change raises no workflow event. Aworkflow_dispatchof work-unblock.yml at clear would be refused by the broker:melodic-software/azure-iacsrc/lanes-token-broker/src/claims.mjs:21setsUNBLOCK_EVENTStoissuesandschedule, andclaims.mjs:213-214denies any other event withevent-not-allowed. Allowing it is a trust-path change at the broker, so it is left out. A hub-side relabel ofagent-readywas also rejected. It would bypass the re-fire record, the trip count andrestarts-per-run.Post-model token losses are not fixed here. At least 2 runs, 40261927981 and 40261974907, ran the model and then lost the lane token at apply-issue-patch or report-outcome. Moving the token check before the model would not have saved them:
kill-switch403 inrequest-lane-token's token mode. That calls the broker during a ban-safety trip, so it needs its own decision and is left as a separate follow-up.Verification
Tests came first. Two changed expectations failed on the old code and pass now:
The old test asserted the 1-hour wait for the broker-check case. Changing that expectation is the intended behavior change, not a weakened test.
New tests pin what must not move:
The existing past-
limit-stops-per-issuebackoff test still passes unchanged.node --test .github/scripts/work-unblock/*.test.mjs: 188 pass, 0 fail.node --test .github/actions/resolve-config/*.test.mjs .github/actions/check-wip-cap/*.test.mjs: 748 pass, 0 fail.scripts/workflow-self-paths.test.sh: PASS=40 FAIL=0.scripts/check-changelog-fragments.sh --checkand--check-required origin/main: pass.actionlint on work-unblock.yml and work-resolve-issue.yml: clean. Neither file changed.
Re-measure after the next trip: the hours from a broker-check kill-switch refusal to its re-fire record. Source: events.log LANE-OUTCOME and the issue's breaker record, which names the refused run and its end time since fix(work-unblock): name the refused run and its end time in a breaker re-fire record #10337.
Related
🤖 Generated with Claude Code