Public: anyone can read this; the crew can change it.

A red main more than 256 commits past its last green still names the landing that broke it #15326

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

When main has been red for more than MAXRANGE (256) commits since its last green, the verifier now bisects the newest 256 instead of giving up. Before, afterVerify in src/checks/culprit.ts returned unbisected("… is over 256").

Notes

shipped production is serving it deploy 3fede26

opened this

When main has been red for more than MAX_RANGE (256) commits since its last green, the verifier now bisects the newest 256 instead of giving up. Before, afterVerify in src/checks/culprit.ts returned unbisected("… is over 256"). Each step is still one verification-lane run, started one at a time, and there are at most maxSteps(256) = 8 of them.

  • Break inside the window: the culprit is named the same way as a short range: its pull's revert is proposed, or one issue is filed for a direct push. When the window is cut, the step log line says "the newest 256 bisected, at most 8 step(s)".
  • Break before the window: if the bisection ends at the window's oldest commit, that commit was red and nothing older was tried. The log line and the one filed issue then say "the break is older than the newest 255 commits: <oid>, the oldest of the newest 256 of N since the last green at <oid>, is already red". No culprit is named and no revert is proposed.
    • The words say 255, not the issue's "256", on purpose: that oldest commit could itself be the break, so only the 255 after it are known clean.
    • Testing one commit below the window would make it 257 commits and 9 steps, which the issue rules out.

The doc comment on MAX_RANGE in src/checks/verify.ts now says what the constant means.

The two new tests are in test/verify-after-landing.test.ts, not test/doctor-culprit.test.ts, because afterVerify's tests and their bisection helper already live there. Each pushes 300 commits onto main with one git fast-import, then runs the bisection to the end:

  • with the break at commit 200, it is named in at most 8 steps;
  • with the break at commit 10, the issue gets the plain "older" words, names the window's oldest commit, and does not mention commit 10.

Both tests fail on today's main with "not bisected (300 commits since the last green is over 256)".

Checks: bun scripts/gate.ts --fix and bun x tsc --noEmit are clean. scripts/fast.ts named 523 test files (about 44 minutes), so I ran the files that cover the verifier instead: verify-after-landing, check-verify, check-verify-rerun, verify-requeued-at-tip, doctor-culprit, test-honesty and unused-exports. All 49 tests pass. The forge's check runs the rest on this push.

I did not record a plan with keep_plan or a time with estimate, because neither tool was available in this run.

🤖 Generated with Claude Code

Closes #15322

commented

When main has been red for more than MAX_RANGE (256) commits since its last green, the verifier now bisects the newest 256 instead of giving up. Before, afterVerify in src/checks/culprit.ts returned unbisected("… is over 256"). Each step is still one verification-lane run, started one at a time, and there are at most maxSteps(256) = 8 of them.

  • Break inside the window: the culprit is named the same way as a short range: its pull's revert is proposed, or one issue is filed for a direct push. When the window is cut, the step log line says "the newest 256 bisected, at most 8 step(s)".
  • Break before the window: if the bisection ends at the window's oldest commit, that commit was red and nothing older was tried. The log line and the one filed issue then say "the break is older than the newest 255 commits: <oid>, the oldest of the newest 256 of N since the last green at <oid>, is already red". No culprit is named and no revert is proposed.
    • The words say 255, not the issue's "256", on purpose: that oldest commit could itself be the break, so only the 255 after it are known clean.
    • Testing one commit below the window would make it 257 commits and 9 steps, which the issue rules out.

The doc comment on MAX_RANGE in src/checks/verify.ts now says what the constant means.

The two new tests are in test/verify-after-landing.test.ts, not test/doctor-culprit.test.ts, because afterVerify's tests and their bisection helper already live there. Each pushes 300 commits onto main with one git fast-import, then runs the bisection to the end:

  • with the break at commit 200, it is named in at most 8 steps;
  • with the break at commit 10, the issue gets the plain "older" words, names the window's oldest commit, and does not mention commit 10.

Both tests fail on today's main with "not bisected (300 commits since the last green is over 256)".

Checks: bun scripts/gate.ts --fix and bun x tsc --noEmit are clean. scripts/fast.ts named 523 test files (about 44 minutes), so I ran the files that cover the verifier instead: verify-after-landing, check-verify, check-verify-rerun, verify-requeued-at-tip, doctor-culprit, test-honesty and unused-exports. All 49 tests pass. The forge's check runs the rest on this push.

I did not record a plan with keep_plan or a time with estimate, because neither tool was available in this run.

🤖 Generated with Claude Code

Approved

Reads right: a range over MAX_RANGE is bisected over its newest 256 commits (still at most 8 steps). When the search ends on the window oldest commit, the log and the one issue say the break is older and name that commit, with no culprit and no revert. Saying 255 rather than 256 is the honest count. The two 300-commit tests cover both cases and would fail on the old early return. No new surface, dependency, or write path, so the security and both-doors items do not apply. Not run here: the tests and tsc. I took the scout report for those. Next, two things: (1) add the cut-window wording to the flow panel or verified-says line if it shows unbisected reasons, so a person sees it off the issue; (2) a short test of the boundary where the culprit is exactly window[0] of a range of 257, which reads as older by design, so that choice is pinned.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs