You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any future retry chain is silently truncated the day it ships, with no failing test, because the failure mode is "fewer passes than budgeted" and nothing asserts a budget it does not know about.
That is the same shape as the audit finding in #10170's comment: a rule whose correctness depends on every future author remembering an unwritten obligation.
Proposed redesign: guard the derivation, not the pass
Move the skip to the same kind of place the record half already occupies — the single choke point where the verdict is derived and published — and let everything else in the pass run unconditionally.
Then, by construction:
retry chains, markers, counters and budgets always advance, because they sit outside the guarded region
a new retry chain needs no registration and cannot be truncated
explicitlyRequested shrinks to its honest meaning — "a human asked for a fresh verdict" (force) — instead of a grab-bag of unrelated subsystems
This restores the symmetry #10204 intended: one place every verdict passes through, for both writing it and deciding whether to re-derive it.
Scope
In:
Identify the single choke point where a pass derives-and-publishes a verdict (start from maybePublishPrPublicSurface, and confirm maybeRunAgentMaintenance cannot reach a verdict independently of it).
Reduce explicitlyRequested to options.force only; drop the previewPollAttempt exemption if the poll's bookkeeping now sits outside the guard (verify, don't assume).
A mechanical drift check in the scripts/check-*.ts family: fail the build if a publish-and-maintain entry point exists that does not route its verdict derivation through the guarded choke point. Same idiom as checkers-wired:check / dead-source-files:check.
A property test per bounded retry chain: with backoff engaged on a settled verdict, each chain still completes its full attempt budget. This is the regression proof that generalises to chains not yet written.
Out:
Changing the backoff policy — the fingerprint, VERDICT_BACKOFF_* constants, head-SHA keying and fail-open posture are all correct and stay as they are.
The record half. It is already in the right place.
Acceptance criteria
grep -c stableVerdictBackoffEngaged shows the guard at exactly one choke point, not per entry point.
#10204 shipped the wiring with no test at all (grep -rn "review_skipped_stable_verdict" test/ returned nothing before #10222). The three defects were found by reading the merged diff and reproducing against the Orb, not by CI. Whatever lands here should leave behind the tests that would have caught them.
The bug class, stated once
#10204 placed two halves of the verdict-stability backoff (#10184) in two different kinds of place, and only one of them was right.
runAgentMaintenancePlanAndExecute, immediately afterpersistDecisionRecord— the single ledger write every verdict passes throughGuarding the pass entry means backoff cancels work that has nothing to do with re-deriving a verdict:
onReachedReadiness→regatePullRequest's bounded repair budget — charged for a pass that never ranforcere-gate — silently suppressed#10222 fixes the first, second and fourth by relocating the guard and adding an
explicitlyRequestedescape hatch. It does not fix the class.Why the current shape cannot be made safe by adding cases
The escape hatch is an allowlist of exemptions:
Every bounded retry chain in the system must remember to add itself. The default for anything not listed is "suppress me." So:
upstream_state_change, the reason mapped to a raw GitHub delivery — the webhook path.That is the same shape as the audit finding in #10170's comment: a rule whose correctness depends on every future author remembering an unwritten obligation.
Proposed redesign: guard the derivation, not the pass
Move the skip to the same kind of place the record half already occupies — the single choke point where the verdict is derived and published — and let everything else in the pass run unconditionally.
Then, by construction:
explicitlyRequestedshrinks to its honest meaning — "a human asked for a fresh verdict" (force) — instead of a grab-bag of unrelated subsystemsThis restores the symmetry #10204 intended: one place every verdict passes through, for both writing it and deciding whether to re-derive it.
Scope
In:
maybePublishPrPublicSurface, and confirmmaybeRunAgentMaintenancecannot reach a verdict independently of it).explicitlyRequestedtooptions.forceonly; drop thepreviewPollAttemptexemption if the poll's bookkeeping now sits outside the guard (verify, don't assume).handlePullRequestWebhookEvent) — the whole reason this matters, and currently unguarded. Confirm visual(capture): bound the render-failure retry chain with a durable per-head budget #10061's recapture chain still spends its fullMAX_CAPTURE_RETRY_ATTEMPTSbudget with the guard live.scripts/check-*.tsfamily: fail the build if a publish-and-maintain entry point exists that does not route its verdict derivation through the guarded choke point. Same idiom ascheckers-wired:check/dead-source-files:check.Out:
VERDICT_BACKOFF_*constants, head-SHA keying and fail-open posture are all correct and stay as they are.recordhalf. It is already in the right place.Acceptance criteria
grep -c stableVerdictBackoffEngagedshows the guard at exactly one choke point, not per entry point.MAX_CAPTURE_RETRY_ATTEMPTSunmodified.records_per_headon the Orb measurably falls for theupstream_state_changepopulation — the metric perf: no backoff for a PR whose verdict never changes — 56 identical evaluations of one commit in 47 minutes #10184 was after, which is currently unmoved because the dominant path is unguarded.Note on how this was found
#10204 shipped the wiring with no test at all (
grep -rn "review_skipped_stable_verdict" test/returned nothing before #10222). The three defects were found by reading the merged diff and reproducing against the Orb, not by CI. Whatever lands here should leave behind the tests that would have caught them.