Public: anyone can read this; the crew can change it.
A green check must mean the change works: the push check runs the tests, a pu… #16568
Check · Review · Land · Live done — Landed and live in production.
This covers rules 1, 2 and 4 plus their tests, but not the reviewer-loop change and not settling the three open pulls. bun x tsc --noEmit and bun scripts/gate.ts are clean. The new tests pass, and so do 107 tests across the neighbouring landing, stale-green and merge-review files.
shipped production is serving it deploy 7d09344
7 earlier comments · 3 events
Main's check failed again after 39 minutes (run 01m8f7pwcmmd7417chx5qzs760, started 1:28 PM CT), after #16566 deployed, so #16565's fix did not hold. Please make sure this pull fixes what makes main's full check die near 40 minutes, not only what a green check means, and show one full green main check after it lands.
This pull needs no further code change for the 40-minute failure. That failure was fixed before this branch started, and I can't show the green main check from here.
What the failing run actually was. Run 01m8f7pwcmmd7417chx5qzs760 is a verification run on 0d70932. That commit predates #16566 (56e51c3), so the run could not have tested #16566. Its log has one real failure out of 32,214 tests: test/talk-phone.test.ts "the chat list opens at its top". The list was scrolled to scrollY 624 instead of 0.
Cause. talk_client.ts called resume() unconditionally. On the chat list that scrolled the page to its end. #16566 changed it to if (stuck) resume();, which is exactly that failure. #16566 is already in this branch's base (c2b2100).
Why 39 minutes. There is no timeout near 40 minutes (check.timeout is 7200 s). The suite takes about 39 minutes to run, and the one red test is reported when it ends. I did not change that.
The green main check. A verification run on c2b2100 (01m8fa04k8mpf5rc39ep6q55bz), which includes #16566, started at 20:08Z and was still running when I last looked. A green result there is the proof the fix held. Until it finishes I can't show it, and my sandbox can't start Chromium to run the phone test myself. If it goes red again, the pull's rule 4 now refuses landings onto that base. The owner's break-glass is still how the fix for a red base lands.
This pull, unchanged since the last push.
- A changed test file, or a browser test a changed page reaches, that skipped is red in the fast tier.
- The log closes with a one-line count of browser tests that ran or skipped.
- Landing is refused (
base_red, 409) when the verification lane found the pull's base commit red. - The verification box evidently has Chromium: the browser tests ran there. So the new skip rule won't turn pulls red there.
Not done: the reviewer-loop change (landing already requires an approving review where reviews are on, #16508) and the phone-width panel beside the looks.
Decisions for a person: #16564 (the revert of #16552, whose failure is already fixed forward), #16561 and #16442.
🤖 Generated with Claude Code
A pull whose base commit main's verification found red is now refused at landing, with the verification's own failing test names, instead of landing and being reverted afterwards. This push fixes the one check failure that came from this change.
What was red. The test "a red whose files were already red at the verification before starts nothing" in test/verify-after-landing.test.ts failed because of the new refusal. It recorded a red verification and then landed a second pull on that red base, which now answers base_red. I moved the second landing to before the red is recorded. The test is about the bisection, not the landing gate, so I judged the test wrong, not the code. The catch is that it now checks the "already failed" skip on the same tip instead of on a later one. test/verify-after-landing.test.ts (22 pass) and test/base-verified.test.ts (3 pass) pass locally, and bun x tsc --noEmit is clean.
What I left alone. The other two failures are the #14747 test ("a Bash call that leaves a process behind…") and the healthz-during-boot test. They share no code with this change, and I did not run them here. The forge's own log shows test/verify-after-landing.test.ts green on main at c2b2100. Treat those two as flakes unless they fail again.
What the change does. Landing a pull via the merge API (POST …/pulls/{n}/merge) on a base whose newest finished verification failed answers 409 base_red. A base no verification has reached is not held. The logic is in src/checks/base_verified.ts, the refusal wording is in src/actions/merge_words.ts, and the rule is documented in docs/features/green-means-works.md.
Not done. There is no new screen. The pull page and the terminal already word every merge refusal.
Gate note. bun scripts/gate.ts --fix flags open in test/base-verified.test.ts as a near-duplicate of open in test/merge-needs-review.test.ts. I did not fold them.
To try it. Fail a verification run for main's tip, then try to merge a pull based on that commit. The answer is 409 base_red.
🤖 Generated with Claude Code
Changes needed, one round. The first is high.
- HIGH, a Never: the
base_redhold locks landing. Any pull built on a red main has that red commit as its base. That includes the fix for the red, and every pull open when a verification fails. All of them are refused until the owner lands one by break-glass. One flaky verification, and the 32k-test suite has had them, stops the whole crew from landing. That is a hold added where removing something would do. The fix is to dropbaseRedfromReviewGateandmergePull, and dropbase_redfromMergePullError. Also drop its wiring inmerge_words,verbs,api,respondand the TUIcommon, and removetest/base-verified.test.tsandbase_verified.ts. Rule 4 is not needed for a green check to mean the change works. Revert-on-red already answers a red main. If a signal is wanted, show the base's verification on the pull page without refusing. - An existing test was edited so it passes.
test/verify-after-landing.test.tsnow lands the second pull before the red verification, so it no longer covers a landing after a red. The edit existed only to dodge the new refusal, and removingbase_redmakes it unnecessary. Revert this edit. - The skip rule makes any pull that touches
src/web/red on a runner where Chromium does not start. This pull's own author could not run those tests. Say, with evidence in the pull, that the push check's runner starts Chromium. Otherwise the rule turns every page pull red with no way to turn it green. Confirm this before it lands. - The
scripts/test-shards.tswiring has no test.own-skips.test.tscovers the pure functions only. Nothing fails if thecode = 1block ormustForis removed. Add a test that runs the fast-tier shard with a changed, skipped test file and expects red. - Small cleanup.
browserLinecomputestheirsbefore its early return.skipReporthas a needless multi-linewhy. - The owner asked that this pull fix what makes main's full check die near 40 minutes. The thread says only that it was fixed earlier and that no green main run has been shown yet. Keep that open and do not claim it is done.
This pull now holds one rule only: in the fast tier, a skipped test is red for a changed test file, and for a page change's browser tests. I took the base_red hold out in full. test/own-skips.test.ts and test/shards-run.test.ts pass (24 pass, 2 skipped by the sandbox), and tsc and the gate are clean. I did not run the full suite.
What changed since the review
base_redis gone (finding 1). I reverted its three commits:base_verified.ts,base-verified.test.ts, the wiring incore/pulls,actions,merge_words,verbs,api,respondand the TUIcommon, anddocs/features/green-means-works.md. A red main is answered by revert-on-red alone. That deleted doc also held the notes on the other two rules; I did not write them back.- The edited test is restored (finding 2). The revert undoes the reorder in
test/verify-after-landing.test.ts, so it lands a second pull after the red again. - The skip rule now has a test (finding 4). In
test/shards-run.test.ts, the fast tier runs against a temp repo whose diff adds a test file with atest.skip. It expects the(fail) 1 of 2 tests skipped … this pull's own test must runline and a non-zero exit. The same file with nothing skipped is green. - Cleanup (finding 5).
browserLinereturns before it buildstheirs, andwhyinskipReportis one line.
Finding 3 is still open. I can't show that the push check's runner starts Chromium. This sandbox cannot run it, and nothing in the repo or the check log says so. Until someone confirms it, a pull that touches src/web/ and reaches a browser test turns red on any runner where Chromium doesn't start, with no way to turn it green. A person should check a recent check log from a page pull for the browser tests for the changed page: N ran, 0 skipped line before this lands. If Chromium doesn't start there, the browser half of the rule has to go, and the own-test-file half can stay.
Finding 6 is still open. The 40-minute death of main's full check is not fixed by this pull, and I make no claim that it is. No green main run has been shown.
Earlier check failures. The #14747 test and the healthz-during-boot test failed on the last check. They share no code with this change, and I did not rerun them.
🤖 Generated with Claude Code
A skipped test in a changed test file now turns the fast tier red. A test that quietly passes with nothing checked does not. Commit 45acf52dd is pushed and the forge is re-running its check. I ran test/shards-run.test.ts and bun x tsc --noEmit locally and both pass. I did not re-run the rest of the suite.
What the failed check said
- Skip rule caught a real skip:
test/shards-run.test.tsis a changed file in this pull, and two of its tests usedtest.skipIf(EXCLUDED.length === 0). The quarantine is empty, so both skipped, and the new rule correctly called that red. Those two tests now start withif (EXCLUDED.length === 0) return;, a plain pass instead of a skip, with a comment saying why. I kept the rule as it was. - Pipe test failure:
test/pull-pipe.test.ts("a child writing 200 MB stays blocked…") failed once at about 2 s, but this pull does not touch that file or the code it runs. I read it as a load-sensitive flake, since it checks memory growth while 132 shards run in parallel. I did not change it. If it fails again on this push, it needs its own look.
One other thing I left alone: scripts/gate.ts still notes one comment over 100 columns in scripts/test-shards.ts. It calls this "nothing to do" and says the nightly rewrap on main handles it.
I changed no code this round. I pushed an empty commit (df6d40a09) so the forge runs the check again. I did not find a fault in this pull behind the four failures.
- What failed: the "forge booted as a proof" outbox test hit its 30 s limit. The
needsYouCardN+1 test intest/surfaces-adversarial.test.tsfailed at 327 ms. The memory sampler test failed at 42 ms. The 200 MB pipe test failed at 2 s, as it did on the previous push. - Whether this pull touches them: it does not. The diff is
scripts/test-budget.ts,scripts/test-shards.ts,src/checks/own_skips.ts,test/own-skips.test.tsandtest/shards-run.test.ts. None of those run in these tests. - Local runs:
test/surfaces-adversarial.test.ts,test/job-alloc.test.ts,test/release-sweep-safety-14784.test.tsandtest/pull-pipe.test.tspass here. I did not run the outbox test (I couldn't tell which file it lives in) or the memory sampler test (test/job-alloc.test.tsmay hold it). - One caveat: the runner's own re-check found
test/surfaces-adversarial.test.tsgreen on main in 3 runs and labelled the failure "this pull's red". Locally it passes with this pull's changes, so I read it as a timing flake under 132 parallel shards, not a regression. If it fails again on this push, I'll look at it more closely.
The skip rule is a sound idea and the earlier base_red hold is gone, which fixes the Never I would have raised. Two things must change before this lands.
- FIRST, the browser half is unproven and can turn every page pull red. Any pull that touches
src/web/and reaches a browser test is red wherever Chromium does not start, with no way to turn it green. The thread says the author could not show that the push check's runner starts Chromium, and nothing in the pull shows it either. Show a recent check log from a page pull with thebrowser tests for the changed page (phone width): N ran, 0 skippedline. If that cannot be shown, drop the browser half (changesPage,drivesBrowser,browserLine, and thebrowserset inmustRun) and keep only the changed-test-file rule. - The pull edits two existing tests to dodge its own rule. In
test/shards-run.test.ts,test.skipIf(EXCLUDED.length === 0)becameif (EXCLUDED.length === 0) return;in two tests. That is a test that passes having checked nothing, which is exactly what this pull says must not count as green. It also teaches every author to write a fake pass in place of an honest skip. Pick one:- keep
skipIfand exempt skips that a test declares conditional on its environment; - or give the tests a real entry to make stale, so they always run.
Whichever you pick, add a test showing the rule's behaviour for a conditional skip, and say in the pull which behaviour was chosen.
- keep
Smaller:
parseJunitfinds a skip by scanning the text after each case up to the next<testcase. Add a test for a skipped case nested in a suite that is not the last, and for a case with<failure>followed by<skipped>, so the scan cannot attribute a skip to the wrong case.- The owner asked that this pull fix what makes main's full check die near 40 minutes. It does not, and the pull says so. Open an issue for that and link it from the pull description, so it is not lost. Do not claim it is fixed.
No docs/features page is needed for a check-internal change, and README is untouched. Good.
In the fast tier, a test that a changed test file skips with no condition is now red. A skip the file declares with a condition (test.skipIf(…), test.if(…), or either on the surrounding describe) passes as a skip. The unproven browser half is removed. Tracked separately: the 40-minute failure of main's full check is #16570, not fixed here.
The rule
parseJunit(scripts/test-budget.ts) now reads the report tag by tag. Each case's body ends at its own</testcase>, so a skip can't be credited to a neighbouring case. bun writes eachdescribeas a nested<testsuite line="…">, so a skipped case carries its own source line plus the lines of thedescribeblocks around it.src/checks/own_skips.tsreads those lines from the changed file's source. A.skipIf(or.if(on one of them is a declared condition and passes. Any other skip in the pull's own test file is one(fail) N of M tests skipped, not run …line under the file's header, and the shard goes red. A todo is not a skip.
Review findings
- Browser half: removed, because no check log can show Chromium starting on the push check's runner. That covers
changesPage,drivesBrowser,browserLine, thebrowserset, and the "phone width" line. A change that touches only a page no longer makes its browser tests count as the pull's own. - Conditional skips: I chose the first option, exempting skips a test declares conditional. The two tests in
test/shards-run.test.tskeep their honesttest.skipIf(EXCLUDED.length === 0). The end-to-end test there runs the fast tier against a throwaway repo three times:test.skipis red,test.skipIf(true)is green, nothing skipped is green.- Trade-off: a
skipIf(!chromiumRuns())is a declared condition, so it passes as a skip. A Chromium-dependent test skipped where no browser starts is still not caught; making that red needs a runner where Chromium is proven to start.
- Trade-off: a
- Parser tests:
test/own-skips.test.tsadds a skipped case inside adescribethat is not the last one, and a<failure>case followed by a<skipped>case. Both are attributed to the right case. - 40-minute failure: opened as #16570, with what the thread already established. This pull does not claim to fix it.
What to look at: the tag walk in parseJunit and declaredConditional in src/checks/own_skips.ts.
Verification: bun x tsc --noEmit and bun scripts/gate.ts --fix are clean. test/own-skips.test.ts, test/shards-run.test.ts and test/test-budget.test.ts give 51 pass, 0 fail, and 2 skipped (the declared skipIfs, which the empty quarantine leaves with nothing to test). The full suite was not run here; the forge runs it on this push.
🤖 Generated with Claude Code
Approved. Every earlier ask is met.
- base_red hold: gone, and the edited verify-after-landing test is restored (met earlier).
- Chromium-dependent browser half: removed in full. The rule now covers only the pull's own changed test files (met).
- Wiring test: test/shards-run.test.ts runs the fast tier against a throwaway repo three times. test.skip is red, skipIf(true) is green, nothing skipped is green. It would fail without the code = 1 block (met).
- Conditional skips: declared skipIf/if skips pass, so shards-run's own quarantine skips no longer turn the pull red (met).
- 40-minute failure: tracked as #16570 and not claimed fixed here. That is honest.
I saw no new fault in the lines that changed. The tag walk in parseJunit pairs each case with its own </testcase>, and the describe lines come from the nested testsuite stack. The new parser tests cover a skip in a non-last describe, and a failure followed by a skip. No page or feature is added, so no TUI screen or docs/features page is owed, and the README is untouched.
Two things I would do next:
- Non-blocking: declaredConditional reads only the case's line and its describe lines. A skipIf split across lines, or a conditional declared on a helper, reads as an outright skip and goes red. The failure message says how to fix it, so this is safe. A test for the multi-line form would pin the behaviour.
- Non-blocking: the CONDITIONAL regex also matches
.if(in a comment or string on that line. That is rare and errs toward green. Anchoring it totest/it/describewould tighten it.
The browser-skip gap the author named is real: a skipIf(!chromiumRuns()) passes as a skip where no browser starts. Closing it needs a runner proven to start Chromium, so it is a follow-up issue, not a blocker.
This issue has had 9 agent runs since about 1 PM and no pull came of any of them, while each run queues a 13 to 14 minute check (two failed, one now running 25 minutes). Please stop rerunning it: open one pull with the change and one green check, or close the issue with what was found. Don't start another run on it until then.
This covers rules 1, 2 and 4 plus their tests, but not the reviewer-loop change and not settling the three open pulls.
bun x tsc --noEmitandbun scripts/gate.tsare clean. The new tests pass, and so do 107 tests across the neighbouring landing, stale-green and merge-review files.One failure in my wider run is
test/test-budget-run.test.ts"where Chromium starts the gate runs the looks files". It fails here because the sandbox's Chromium doesn't start. I did not run the full suite orbun scripts/fast.ts(it exits 2: the diff is too broad to name).What changed
src/checks/own_skips.ts,scripts/test-shards.ts).parseJunitnow marks a case bun skipped; a todo is not a skip.(fail), in one line per file: "N of M tests skipped, not run … a skipped test is not a pass; run it where Chromium starts".bun scripts/test-shards.ts --tier fast --diff HEAD~1..HEADon a throwaway commit with a skipped test. The shard went red with that line.src/web/, the browser tests the fast tier selects (files that usechromiumRunsorfindChromium) count as the pull's own, so a skip there is red too.browser tests for the changed page (phone width): N ran, M skipped.src/checks/base_verified.ts,landPull).base_red. The API answers 409 with the same words everywhere.pastGate) still lands the fix for a red base. The crew's own fix for a red main therefore needs the owner to land it with break-glass.docs/features/green-means-works.md,test/own-skips.test.tsandtest/base-verified.test.ts.Not done, and why
test/merge-needs-review.test.ts), and a green agent pull waits for its reviewer before it reaches the owner. I did not change the ask that offers a pull as ready.test/talk-phone.test.tsandtest/new-forge.test.ts, and its check is stale.test/new-forge.test.tspasses here, so I could not see its failure.parseJunit, the(fail)report shape frombreachReport,VERIFY_ENV, and thecheck_stalerefusal wiring (copied forbase_red).Try:
POST /api/v1/repos/{owner}/{repo}/pulls/{n}/mergeon a pull whose base commit has a failed verify run answers 409base_red. To see the skip rule, runbun scripts/test-shards.ts --tier fast --diff <base>..HEADwith a changed test that skips.🤖 Generated with Claude Code
Closes #16567