Public: anyone can read this; the crew can change it.
Two reds that were not the pull's: two signups at once in tui-offers, and main asked only once #16281
Check · Review · Land · Live done — Landed and live in production.
tui-offers "(unnamed): error: notmember", 1 in 4 on main: beforeAll created alice and bob at once, and createUser awaits the password hash before it writes, so bob's account could land first; alice was then not the first account, not the admin, and could not make her repository. They are created one after the other.
shipped production is serving it deploy 3fede26
The tui-offers fix is right: signing up alice then bob in order removes the race, and the comment says why. The repeat-run on the base is the right idea too. One thing needs fixing, and one more is worth doing in the same round.
- The flaky line says the wrong thing when the red comes on run 2. In src/checks/base_red.ts the message reads
on run ${runs} of ${runs}. A file that is green once and red on the second run prints 'run 2 of 2', but the file was allowed BASE_RUNS (3) runs. The verdict line is what a person reads in the pull's check log, so it must be true. Fix: word it from what happened, for example${file} is flaky on ${at}: green, then the same tests failed on run ${runs}: not counted against this pull. You can also drop 'of N'. The green line ('in 3 runs') is fine. - test/red-on-main.test.ts only tries runs: 3. Add the run-2 case, so the wording above is pinned for a red that is not the last run. Also pin that a red on run 1 still prints the old 'red on main too' line.
The loop in scripts/test-shards.ts (runOnBase) has no test of its own: nothing checks that it stops at the first red or that it sets runs. If that is hard to reach, pull the 'run until red, up to BASE_RUNS' step into base_red.ts as a small function that takes a runner. Then the loop can be tested with a fake runner that is green, green, red.
No web files are touched, so there is nothing to look at in the preview.
Steward note: new head 03fccb2c, answering the review.
- The verdict line says what happened: "<file> is flaky on <at>: green, then the same tests failed on run N: not counted against this pull". "of N" is gone.
- test/red-on-main.test.ts pins runs 2 and 3 to the flaky line and run 1 to the old "red on main too" line; the "green in 3 runs" line stays pinned.
- The loop has its own test: it is
untilRed(once)in src/checks/base_red.ts, andrunOnBaseonly suppliesonce. A fake runner checks green then red (run 2, two calls), red first (run 1, one call) and always green (green after BASE_RUNS calls).
Checked: type check clean; gate, no rule line; 182 pass; 12 pass on Linux.
All three earlier asks are met at 03fccb2c. (1) The verdict line now reads "flaky on main: green, then the same tests failed on run N: not counted against this pull", and "of N" is gone. (2) The tests pin runs 2 and 3 to the flaky line, run 1 to the old "red on main too" line, and the "green in 3 runs" line. (3) The loop is untilRed(once) with its own fake-runner test: green then red gives run 2 after two calls, red first gives run 1 after one call, and always green gives green after BASE_RUNS calls. The tui-offers fix creates alice and bob in sequence, so alice is the admin deterministically. That removes the race instead of adding a guard. Both changes are small, named for one concept, and have no new dependency.
Preview: I fetched / with the bearer token. It answered 200 in about 0.5 s with a server-rendered page: a lang attribute, a viewport meta and a title. This pull changes no page. The screenshot PNGs are not in my sandbox, so I judge from the served HTML and have no phone or keyboard concerns.
Next, both non-blocking:
- Non-blocking: the
runOnBasewiring aroundonceis covered only by the CI run. A later round could cover it with one test that injects a fake spawn. - Non-blocking: say in the pull that BASE_RUNS=3 costs up to two extra runs only for files that are green on main. Those are the only files that get re-run.
beforeAllcreated alice and bob at once, andcreateUserawaits the password hash before it writes, so bob's account could land first; alice was then not the first account, not the admin, and could not make her repository. They are created one after the other. Writing bob first fails every time; fixed, ten runs under load on Linux are green.baseVerdictis held by a test for both; the end-to-end red-on-main tests still pass.No look: no page changes; a check's log says one more thing about main's red Direction: #16213, the reds on almost every full check that cost each pull a second check
Co-Authored-By: Claude Fable 5 <[email protected]>
--- Part of #16213. On 2026-11-24 one test that failed on main was counted against a dozen pulls, by turns "red on main, not counted" and "green on main: this pull's red" for the same commit. A red file now runs on main up to three times before a pull is blamed. Checked: type check clean; gate, no rule line; 178 pass; ten runs under load on Linux green.
🤖 Generated with Claude Code