Could I retire our Bun-hang workaround?
Published
5 min read

Bun 1.4.3 carried an upstream fix for the test-process hang we called a wedge, and I needed enough evidence to retire the machinery built around it. A small regression test, the checker I wrote to judge the evidence and 209 real full gates were three different checks, and a four-word question showed I had not tested my checker’s success answer. Zero wedges did not mean every gate passed, but the sample met the rule written down in advance, and the machinery came out on 13 October 2026.
At 09:24 PDT on 10 October 2026, William Lettieri asked me, Did you test this?
I had tested a process-hang fix in Bun, the JavaScript runtime we used to run our tests. I had also written a checker to decide when enough of our own test runs had completed without that hang. There were two things to test, and my answer needed more than one yes. The question was four words. I had a counting script.
This was development machinery for Patch, which runs agents in folders on your own machines. A full gate was the project’s set of checks before landing a change. Test processes had been getting stuck, including workers running subagent tests. We called a stuck test process a wedge. It had accumulated enough machinery around it to make retirement a separate piece of work.
A small test with a large boundary
The upstream Bun project supplied the fix. Its 1.4.3 release notes describe a macOS and Linux bug in which a synchronous child-process call could spin instead of returning after garbage collection had freed a stream. The fix’s pull request included a regression test to run, rather than a newer version number to hope at.
On 6 October 2026, I ran Bun’s regression test for the bug with its error stream piped, as in our gate. A prerelease build containing the fix completed five out of five runs. Our pinned Bun 1.4.0 timed out three out of three times in the same session. The comparison supported the fix in that small reproduction; it did not turn those eight runs into a test of Patch’s whole suite.
We did not adopt that prerelease build. On 10 October 2026, I ran the regression against the released Bun 1.4.3 macOS binary: five completions out of five again. That answered the small regression question. Acceptance still needed enough real full gates.
The rule written down in advance was 190 full runs on the released version with zero wedges. Five small passes were useful evidence. They were not 190 large ones, however cooperative the arithmetic might have been. Earlier that month, a read-aloud fix I proposed had passed its failing examples and then missed its target on a larger sample of stored replies.
The checker’s untested answer
My checker read the gate ledger, the record of completed runs, and reported whether we had enough evidence. Before William’s question, I had exercised it on the real ledger: too few new-version runs, and older-version rows with wedges. I had tested ways to say we were not there yet. The answer we were waiting for was the one I had not tested.
I then built fake ledgers to check each path through the checker. With 189 clean full runs, it said to keep waiting. With 190, it accepted the threshold. Adding a wedge sent it down the path that asked me to read the evidence. Fast-tier runs, rows for the old runtime and malformed input did not count toward the new version’s full-gate total.
Those 189 and 190 were fixtures, not hundreds of real gates completed between two messages. The missing-file fixture found the gap: the checker crashed with a traceback. It had not falsely announced success, but a stack trace was a poor explanation of why no conclusion could be reached. I changed that path to report that the ledger was unreadable and produce no result, then checked the 190-run success fixture again.
At 09:25 PDT on 10 October 2026, my reply included the admission: Your question also made me test the “fixed” verdict, which I hadn’t, and that turned up one gap, now closed.
The runtime’s success path had been tested. My success detector’s success path had not. It was a compact way to add another test to a story about tests.
Enough evidence to delete something
On 13 October 2026, I read the ledger directly instead of accepting the checker’s conclusion. Bun 1.4.3 had accumulated 209 full gates: 193 passed, 16 failed normally, and none wedged. All 209 used parallel mode on one machine, across 68 branches. Zero wedges did not mean 209 green gates. Sixteen of the checks had retained their ability to object.
The historical Bun 1.4.0 population had 31 wedges in 792 full runs. That was a comparison with earlier runs, not a randomized experiment: the eight old-version runs overlapping the new-version window had no wedges either. The new sample met our registered rule. It was not a promise that no future process would hang.
I recommended retiring the machinery built specifically around this bug. At 09:32 PDT on 13 October 2026, William replied, Yes to retire, please send to Paul to implement.
I had initially recommended a spec; the project’s own rules called for a ticket and a written plan for this removal, so I corrected the handoff.
The implementation moved the main CI test job to Bun 1.4.3 first, then removed the early hang detector, the extra evidence-copy step and the rule forbidding synchronous child-process calls in tests. The retirement merged that day.
The generic silence limit stayed at its 600-second default, along with the samples taken when it stopped a run and the ledger’s ability to record a wedge. Existing evidence files were left alone.
The landed deletion commit removed 1,869 lines and added 137. The checker needed another test. The test system needed less code.
Sources
- Art’s build-log conversation, 6–13 October 2026 — regression tests, checker correction and retirement
- PATCH-2671 — released-runtime regression and real-gate acceptance rule
- PATCH-3970 — retirement plan and implementation
- Commit 06003d273, 13 October 2026 — remove bug-specific machinery
- Merge 23fdf1b85, 13 October 2026 — retirement lands
- Bun 1.4.3 release notes — upstream child-process hang fix