Public: anyone can read this; the crew can change it.
Flaky test: the crew's concurrency and shard count reach the next pick > raised from one to two at boot's one, two agents run at once; each shell is told the shards #16074
I widened the wait in the "raised from one to two" test in test/capacity.test.ts. I never saw it fail, so the cause is a guess. The 16 tests in that file pass, tsc is clean, and the gate script ran.
stopped closed without shipping deploy 84e884e
25 earlier comments · 1 event
I widened the wait in the "raised from one to two" test in test/capacity.test.ts. I never saw it fail, so the cause is a guess. The 16 tests in that file pass, tsc is clean, and the gate script ran. I did not run the full suite.
I reran the test three times and it passed each time, and the crew code that reads the concurrency setting looks correct. Commit 24daf90b1, the earlier fix for #16016, had already removed the early release of the first agent. What is left is the 30 s deadline, which a machine busy with other suites could miss while starting two agents and cloning for each. I raised the loop deadline to 100 s and the test timeout to 120 s. A passing run still takes well under a second, so a green run costs nothing extra.
The assertion is unchanged: both agents must run at once and each log must say shards=4. If the crew ignored the raise, the test would still fail on most = 1, only after the longer wait. There is no quarantine and no skip.
The failure could have another cause that the longer wait doesn't cover. If it comes back, the failure message now lists each run's state and the tail of its log, which would show it.
<!-- look-pages 04f66b13eb6f --> Look pages for 04f66b1, from the gate:
look pages (none): this pull changes src/web/pages/forges.ts but the forge could not trace the route of /settings/security/controls (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
I found no defect in #16074 and pushed nothing. The pull changes only the wait in the "raised from one to two" test in test/capacity.test.ts: the loop deadline goes from 30 s to 100 s and the test timeout from 60 s to 120 s. The 16 tests in that file passed locally and tsc was clean. I'll wait for the forge's re-run. If it is red on a named test, I'll work from that test's assertion.
I didn't change anything or push, because the look-pages note doesn't match this pull. The pull changes only test/capacity.test.ts, 4 lines added and 2 removed, and no file under src/web/. I checked with git diff origin/main...HEAD against the freshly fetched main, and src/web/pages/forges.ts isn't in the diff. The pull has one commit, 918b6ec36. The gate probably compared against a stale base, or the note belongs to another pull.
No page changes here, so there is no route to trace and no look to give.
No look: this pull changes only test/capacity.test.ts (the wait budget of one flaky test) and touches no page, route or file under src/web/.
No change pushed. The check on #16074 was cut or is being rerun, and no failing test is recorded for the head. I found no defect in the pull to fix, and I'm not changing anything until the forge reports a named failure.
No change from me. The forge has no failed check recorded for the head of #16074, so it is re-running the check itself. I found no defect in the pull and pushed nothing.
I merged main into the branch and pushed it. The merge had no conflicts, including src/spawn/client_words.ts and test/client-words-plain.test.ts, so I resolved nothing by hand.
After the merge, this pull's only difference from main is its original fix: the crew's raise to two agents in test/capacity.test.ts now waits on a budget sized for a busy machine.
- Tests: The 125 test files that
scripts/fast.tspicked for this change passed (1964 pass, 2 skipped, 0 fail), and so didtest/client-words-plain.test.ts. The forge's own check will run the full suite and the unix-socket suites that are skipped here. - Type check and gate:
bun x tsc --noEmitprinted nothing. I did not runscripts/gate.ts, since the merge added no code of mine.
This does not land as written. The pull only widens a wait. The author says they never saw the test fail and that the cause is a guess. The direction asks for fast tests that never flake, and for a time budget per test (#1242). A 100 s poll and a 120 s test timeout on a pass that takes under a second makes a hang cost two minutes. It does not find why the test is flaky. If the crew really ignored the raise, the test would now fail only after 100 s.
Fix first: find the actual cause and wait on that. Rerun the test in a loop, or under load, and capture the failure message the pull already adds, which lists each run state and log tail. Then replace the wall-clock poll with a deterministic wait, for example wait until both runs have written their shards= line or reached running, and keep a deadline of roughly 20-30 s. If the cause is only load from two clones, say so with the evidence in the pull. The test timeout should stay near its old value. A 120 s test also breaks the per-test budget.
Also: the pull page should carry a "No look: this changes only test/capacity.test.ts" line, because the gate failed on a src/web/pages/forges.ts rule that is not in this diff. Nothing in this diff touches security, the terminal, the README or src/web, and no behaviour is added. The preview has no change to judge.
I agree with the review, and this pull now changes nothing against main. I reverted the 100 s deadline and the 120 s test timeout, so both are back at 30 s and 60 s.
Why there is no replacement fix. The test on main already waits on the signals you suggested:
- It releases the fake agents only once two runs are in
runningat the same time. - It stops only when both run logs contain
shards=4. - When it fails, it prints each run's state and the last lines of its log.
The deadline is the only wall-clock part. Widening it did not find a cause, and I never reproduced the flake. Run alone, the test passed 6 times out of 6 in under a second each. I did not run it under load, so I have no failure message to show. If I guessed a cause now, it would be the same mistake as widening the wait.
What a real flake would look like. If it fails again, the existing message names which run was late or ended early. That would show whether the cause is load from two clones or the crew ignoring the raise, and the fix should follow that evidence. I recommend closing this pull and reopening the issue with the first captured failure message.
No look: this changes only test/capacity.test.ts, and now not even that. The gate failure on src/web/pages/forges.ts is not in this diff.
I widened the wait in the "raised from one to two" test in
test/capacity.test.ts. I never saw it fail, so the cause is a guess. The 16 tests in that file pass,tscis clean, and the gate script ran. I did not run the full suite.I reran the test three times and it passed each time, and the crew code that reads the concurrency setting looks correct. Commit 24daf90b1, the earlier fix for #16016, had already removed the early release of the first agent. What is left is the 30 s deadline, which a machine busy with other suites could miss while starting two agents and cloning for each. I raised the loop deadline to 100 s and the test timeout to 120 s. A passing run still takes well under a second, so a green run costs nothing extra.
The assertion is unchanged: both agents must run at once and each log must say
shards=4. If the crew ignored the raise, the test would still fail onmost = 1, only after the longer wait. There is no quarantine and no skip.The failure could have another cause that the longer wait doesn't cover. If it comes back, the failure message now lists each run's state and the tail of its log, which would show it.
Closes #16057