Public: anyone can read this; the crew can change it.

Move the forge to Bun 1.4.4 or newer: 1.3.14 shares one unlocked SQLite handle table across threads and it crashed production four times #12545

opened this in answer to

Merged 20d 12h ago, live in production

This moves the repository's pins to Bun 1.4.4, but the issue's proofs and the checks' own Bun are not done. The 1.4.4 type check, the gate and six test files pass; the full suite did not run on it. What changed Dockerfile: the release image is now oven/bun:1.4.4-debian.

Notes

opened this

This moves the repository's pins to Bun 1.4.4, but the issue's proofs and the checks' own Bun are not done. The 1.4.4 type check, the gate and six test files pass; the full suite did not run on it.

What changed

  • Dockerfile: the release image is now oven/bun:1.4.4-debian. The comment about waiting on the decode issue (#3726) is replaced by the reason for 1.4.4.
  • src/cloud/droplet.ts: BUN_VERSION is now 1.4.4, which is what a pinned forge's droplet installs.
  • package.json and bun.lock: @types/bun and bun-types are now 1.4.4.
  • Two type errors showed up with the 1.4.4 types, and both are fixed with no behaviour change:
    • scripts/rehearse-roll.ts: proc.signalCode can now be a number, so it is turned into a string before it reaches goneLine.
    • src/machines/shell.ts: the websocket message handler is now optional in the types, so it is called with ?..

What I ran, on Bun 1.4.4 (the npm [email protected] binary, installed into $TMPDIR)

  • tsc --noEmit is clean under both 1.4.4 and the sandbox's 1.3.14.
  • scripts/gate.ts is clean.
  • Six test files pass, 74 tests and 0 failures: pinned-forge-recovery, worker-database-opens, apps, release-launch, data-query-limits and release-boot.
  • data-query-limits and release-boot are two of the "Mac-only reds" from item 4. They pass here, but this is Linux. I did not run the client-list crash that was reported on 1.3.13 or the remaining release-boot cases.
  • machines*/shell* also pass (6 tests).

What I did not do

  • Proof (item 2): I did not run the full suite, the 20-minute two-Worker reproducer, the stage rig verdict, or a hosted-forge cell boot. The sandbox can't run containers, run the reproducers for 20 minutes, or reach a stage copy of production. Those must run on a container of the new image before this merges.
  • Changelog read (item 1): I did not read the Bun 1.3.14 to 1.4.4 changelog, since it isn't reachable from here. The only changes I found were the two type breakages above. Someone needs to check the bun:sqlite, Worker, Bun.spawn, Bun.serve, S3 and test-runner notes for anything else.
  • Checks' Bun (item 3): the checks run on the host's Bun, which this repository doesn't pin. The host's Bun must move to 1.4.4 in the same rollout, or checks and production will differ.
  • Docs and fixtures: I left the docs that quote measurements taken on 1.3.14 (docs/CACHING.md and the research notes). I also left the test fixtures that embed a bun test v1.3.14 banner, because they are captured output, not pins.
  • Done condition: the 24-hour kernel-log check on production can only happen after deploy.

To try it: build the image from Dockerfile and run bun test inside it. Then run the two-Worker reproducer for 20 minutes, and the stage rig on a copy of production.

🤖 Generated with Claude Code

Closes #12538

1 earlier comment · 1 event
commented

This moves the repository's pins to Bun 1.4.4, but the issue's proofs and the checks' own Bun are not done. The 1.4.4 type check, the gate and six test files pass; the full suite did not run on it.

What changed

  • Dockerfile: the release image is now oven/bun:1.4.4-debian. The comment about waiting on the decode issue (#3726) is replaced by the reason for 1.4.4.
  • src/cloud/droplet.ts: BUN_VERSION is now 1.4.4, which is what a pinned forge's droplet installs.
  • package.json and bun.lock: @types/bun and bun-types are now 1.4.4.
  • Two type errors showed up with the 1.4.4 types, and both are fixed with no behaviour change:
    • scripts/rehearse-roll.ts: proc.signalCode can now be a number, so it is turned into a string before it reaches goneLine.
    • src/machines/shell.ts: the websocket message handler is now optional in the types, so it is called with ?..

What I ran, on Bun 1.4.4 (the npm [email protected] binary, installed into $TMPDIR)

  • tsc --noEmit is clean under both 1.4.4 and the sandbox's 1.3.14.
  • scripts/gate.ts is clean.
  • Six test files pass, 74 tests and 0 failures: pinned-forge-recovery, worker-database-opens, apps, release-launch, data-query-limits and release-boot.
  • data-query-limits and release-boot are two of the "Mac-only reds" from item 4. They pass here, but this is Linux. I did not run the client-list crash that was reported on 1.3.13 or the remaining release-boot cases.
  • machines*/shell* also pass (6 tests).

What I did not do

  • Proof (item 2): I did not run the full suite, the 20-minute two-Worker reproducer, the stage rig verdict, or a hosted-forge cell boot. The sandbox can't run containers, run the reproducers for 20 minutes, or reach a stage copy of production. Those must run on a container of the new image before this merges.
  • Changelog read (item 1): I did not read the Bun 1.3.14 to 1.4.4 changelog, since it isn't reachable from here. The only changes I found were the two type breakages above. Someone needs to check the bun:sqlite, Worker, Bun.spawn, Bun.serve, S3 and test-runner notes for anything else.
  • Checks' Bun (item 3): the checks run on the host's Bun, which this repository doesn't pin. The host's Bun must move to 1.4.4 in the same rollout, or checks and production will differ.
  • Docs and fixtures: I left the docs that quote measurements taken on 1.3.14 (docs/CACHING.md and the research notes). I also left the test fixtures that embed a bun test v1.3.14 banner, because they are captured output, not pins.
  • Done condition: the 24-hour kernel-log check on production can only happen after deploy.

To try it: build the image from Dockerfile and run bun test inside it. Then run the two-Worker reproducer for 20 minutes, and the stage rig on a copy of production.

🤖 Generated with Claude Code

the crew's run was interrupted: restart, resumes on the next pass — cancelled
commented

I couldn't read the review text, so I haven't addressed it. The API shows one changesRequested. The reviews, threads and comments endpoints returned only my own earlier comment or nothing. If the review asks for something specific, tell me and I'll do it.

I pushed two commits that were missing or unfinished:

  • Banner example and shard comment: src/apps/process.ts now shows Bun v1.4.4 (Linux x64 baseline) in the version-banner example. The shard measurement in scripts/shards.ts is marked as taken on 1.3.14. This commit had been made locally but never pushed.
  • Gate fix: the banner comment was 103 columns and failed the gate's 100-column rule. It's rewrapped to 93 columns with no code change.

What I ran:

  • bun scripts/gate.ts and bun x tsc --noEmit are clean.
  • test/apps-adversarial-test-step.test.ts and test/apps-compound-run.test.ts pass, 8 tests and 0 failures. These cover the banner regex, which is the only code I touched this round.
  • The sandbox's bun is 1.3.14, so none of this ran on 1.4.4. The earlier 1.4.4 runs used the npm [email protected] binary.
  • scripts/fast.ts exits 2 because package.json changed, so I picked the tests myself. I did not run the full suite.

Still not done (the sandbox can't do these):

  • Reading the Bun 1.3.14 to 1.4.4 changelog.
  • The 20-minute two-Worker reproducer and the stage rig.
  • A hosted-forge cell boot on a container of the new image.
  • Moving the checks host's Bun to 1.4.4. This repository doesn't pin it.
  • The 24-hour kernel-log check on production, which can only happen after deploy.

To try it: build the image from Dockerfile and run bun test inside it. Then run the two-Worker reproducer and the stage rig.

Closes #12538

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs