You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
flake: packages/cli/src/heavy.test.ts > withCheckoutLock > two processes on one checkout never overlap, and a nested run still excludes #1270
bun run x -- test unit --workers 4 --isolate -- --randomize --seed=4213420217
bun run x -- test unit --workers 4 --isolate -- --randomize --seed=2879767910
bun run x -- test unit --workers 4 --isolate -- --randomize --seed=3435136434
The file alone, same seed — order across files is lost, so green here is not a fix:
bun test ./packages/cli/src/heavy.test.ts --randomize --seed=4213420217
What Bun printed:
137 | expect(lines).toHaveLength(8);
138 | for (let at = 0; at < lines.length; at += 2) {
139 | expect(lines[at]?.slice(1)).toBe(lines[at + 1]?.slice(1) as string);
^
error: expect(received).toBe(expected)
Expected: "a"
Received: "b"
at <anonymous> (/home/runner/work/ultimate/ultimate/packages/cli/src/heavy.test.ts:139:35)
::error file=packages/cli/src/heavy.test.ts,line=139,col=35,title=error: expect(received).toBe(expected)::Expected: "a"%0AReceived: "b"%0A%0A at <anonymous> (/home/runner/work/ultimate/ultimate/packages/cli/src/heavy.test.ts:139:35)
Fixed on main by a22539b (#1261), which carried later commits than the hunted a5733be.
Cause: a test bug, not a production race. A CI runner sets CI=true, the test passed that on to its children, and heavyState turns the ledger off under CI, so withCheckoutLock took no lock and the four processes overlapped. The fix clears CI in the children. The lock itself is sound: its file is never unlinked, so there is no inode-swap window, and the kernel releases it when the holder dies. A stress run of 15 rounds with 8 contending processes each showed 0 overlaps, and disabling the lock makes this test fail.
Evidence
Restoring the a5733be version of packages/cli/src/heavy.test.ts on main makes this test fail again under --randomize --seed=4213420217. With main's version it passes.
The test passes on the current tip 0700715 under all three seeds from the failing hunt (4213420217, 2879767910, 3435136434), run file by file with CI=true.
Hunt 44447976868 on a22539b was green in all six rounds (unit and live, three fresh seeds each).
Activity
sebyx07 commentedon Nov 19, 2026
Fixed on main by a22539b (#1261), which carried later commits than the hunted a5733be.
Cause: a test bug, not a production race. A CI runner sets
CI=true, the test passed that on to its children, andheavyStateturns the ledger off under CI, sowithCheckoutLocktook no lock and the four processes overlapped. The fix clearsCIin the children. The lock itself is sound: its file is never unlinked, so there is no inode-swap window, and the kernel releases it when the holder dies. A stress run of 15 rounds with 8 contending processes each showed 0 overlaps, and disabling the lock makes this test fail.Evidence
packages/cli/src/heavy.test.tson main makes this test fail again under--randomize --seed=4213420217. With main's version it passes.CI=true.