Public: anyone can read this; the crew can change it.
test/merge-queue-check-retry.test.ts passes every time in the full suite, not just alone #7438
Check · Review · Land · Live done — Landed and live in production.
merge-queue-check-retry.test.ts no longer depends on which test files share its process (#7419)
shipped production is serving it deploy 6da1e48
merge-queue-check-retry.test.ts no longer depends on which test files share its process (#7419)
Cause. The log floor in src/kernel/log.ts is one setting for the whole process. seedFixture in bench/map-home.ts sets it to error for the bench command line and never puts it back. test/map-cache.test.ts and test/caching-doc.test.ts call seedFixture. In the check's shard 2, map-cache.test.ts runs just before merge-queue-check-retry.test.ts in the same bun test process. With the floor at error, the queue's log.info("… red (check) named no test, gating once more") was dropped. The gates and answers in the first test were right, but its log assertion (line 83) got false. The check logs of #7412 and #7316 both show that line failing, with "fails only beside others". I reproduced it locally from shard 2's exact file list, and with each of the two leaking files paired with this one.
Changes
test/merge-queue-check-retry.test.ts:beforeAllsets the log floor toinfoandafterAllrestores the floor it found, asmerge-queue.test.tsalready does. No assertion changed, and nothing waits on a timer or a longer timeout.test/map-cache.test.tsandtest/caching-doc.test.ts: each callsquietLogs()fromtest/helpers/globals.ts. The floor is raised for that file and given back to the next one. Before this, every later file in the shard lost itsinfoandwarnlines.
Each half fixes the failure alone. I checked both: only this test's change with map-cache still leaking, and only the two leaking files fixed without this test's change. Each was green.
How it was run. Shard 2's exact file list from the failing check, 38 files ending with vision.test.ts, was run with bun test --timeout 60000 <files> 20 times in a row: 20 of 20 green, 246 pass and 0 fail each time. Before the fix the same command failed on the first run. I did not run the whole suite 20 times, because the shard that failed is the case the issue describes and it runs much faster. bun x tsc --noEmit is clean.
Not done
src/checks/queue.tsandbench/map-home.tsare unchanged. The queue holds no state across files that mattered here, and the bench sets a quiet floor on purpose for its command line.- #7354 is still open, so there was no rebase.
- The other red in those checks, "report a problem in the terminal > the palette has the row" (shard 5), is a separate failure and is not addressed here.
🤖 Generated with Claude Code
Approved. The cause is right: seedFixture (bench/map-home.ts:95) drops the process-wide log floor to error and never puts it back. That hid the queue's info line from merge-queue-check-retry's log assertion whenever map-cache or caching-doc ran before it in the same shard.
Both halves are sound:
- The two leaking files now call
quietLogs()at top level. ItsbeforeAllrecords the floor before any test callsseedFixture, since both files call it inside tests or describe hooks, and itsafterAllgives the floor back to the next file. - The retry test now sets its own
infofloor and restores it, the same pattern merge-queue.test.ts:205 already uses. No assertion is weakened and no timeout is added.
Security: test-only change, no runtime surface, no secrets, no new dependency. The check is green at 9783a257 and the preview answers / with 200. There is nothing for the terminal or the README to add.
One non-blocking nit is in the line comment.
merge-queue-check-retry.test.ts no longer depends on which test files share its process (#7419)
Cause. The log floor in
src/kernel/log.tsis one setting for the whole process.seedFixtureinbench/map-home.tssets it toerrorfor the bench command line and never puts it back.test/map-cache.test.tsandtest/caching-doc.test.tscallseedFixture. In the check's shard 2,map-cache.test.tsruns just beforemerge-queue-check-retry.test.tsin the samebun testprocess. With the floor aterror, the queue'slog.info("… red (check) named no test, gating once more")was dropped. The gates and answers in the first test were right, but its log assertion (line 83) gotfalse. The check logs of #7412 and #7316 both show that line failing, with "fails only beside others". I reproduced it locally from shard 2's exact file list, and with each of the two leaking files paired with this one.Changes
test/merge-queue-check-retry.test.ts:beforeAllsets the log floor toinfoandafterAllrestores the floor it found, asmerge-queue.test.tsalready does. No assertion changed, and nothing waits on a timer or a longer timeout.test/map-cache.test.tsandtest/caching-doc.test.ts: each callsquietLogs()fromtest/helpers/globals.ts. The floor is raised for that file and given back to the next one. Before this, every later file in the shard lost itsinfoandwarnlines.Each half fixes the failure alone. I checked both: only this test's change with
map-cachestill leaking, and only the two leaking files fixed without this test's change. Each was green.How it was run. Shard 2's exact file list from the failing check, 38 files ending with
vision.test.ts, was run withbun test --timeout 60000 <files>20 times in a row: 20 of 20 green, 246 pass and 0 fail each time. Before the fix the same command failed on the first run. I did not run the whole suite 20 times, because the shard that failed is the case the issue describes and it runs much faster.bun x tsc --noEmitis clean.Not done
src/checks/queue.tsandbench/map-home.tsare unchanged. The queue holds no state across files that mattered here, and the bench sets a quiet floor on purpose for its command line.🤖 Generated with Claude Code
Closes #7419