Skip to content

fix(runtime): upgrade Bun to 1.4.3 - #436

Merged
davidvornholt merged 1 commit into
mainfrom
fix/runtime-bun-1.4.3
Oct 15, 2026
Merged

davidvornholt merged 1 commit into
mainfrom
fix/runtime-bun-1.4.3

Conversation

@davidvornholt

@davidvornholt davidvornholt commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Before. Development shells, new project templates, and trusted workflow bootstraps run Bun 1.4.2. Its JavaScriptCore stops passing Error.stackTraceLimit on to the engine once the code that sets the limit is JIT-compiled (analysed in oven-sh/bun#42501). Errors built after that can lack a stack, depending on JIT timing. In wordhold this made Effect 4.0.1's Cause.pretty throw in some CI runs and not in others, so a test failed only with certain test orders. Wordhold now uses Effect 4.0.4, which no longer depends on the stack, but any other code that reads error.stack remains exposed on 1.4.2.

Now. Source development, new project templates, and workflow bootstraps use stable Bun 1.4.3, which contains the upstream fix (oven-sh/bun#43882). The shared Nix package resolves its verified Linux archives on x64 and ARM64.

Implementation

The shared Nix package keeps the Bun 1.4.0 and 1.4.2 archives, because consumers own their packageManager pin and move to 1.4.3 in their own change. All new hashes were checked against the release's GitHub asset digests and against the downloaded archives: bun-linux-x64.zip for the workflow bootstrap and the runner metadata, bun-linux-x64-baseline.zip for the x64 Nix package, and bun-linux-aarch64.zip for both on ARM64.

Verification

Completed checks

  • bun run check:fix: all 7 tasks passed.
  • nix flake check -L on x86_64-linux, including the standards CLI, app-release, and app-release VM checks: passed.
  • aarch64-linux evaluation of the dev shell and the standards CLI package: passed.
  • bash nix/bun-system-metadata.test.sh: passed.
  • nixfmt --check nix/standards-bun.nix flake.nix with the flake's pinned nixfmt: passed.
  • nix develop --command bun --version: 1.4.3.
  • In wordhold, BUN_JSC_useConcurrentJIT=0 bun --env-file=.env.local test --randomize --seed 2 (with Effect 4.0.1) failed in 3 of 3 runs on Bun 1.4.2 and passed on Bun 1.4.3.

@davidvornholt
davidvornholt marked this pull request as ready for review October 15, 2026 05:01
@davidvornholt
davidvornholt merged commit b3a5641 into main Oct 15, 2026
11 checks passed
@davidvornholt
davidvornholt deleted the fix/runtime-bun-1.4.3 branch October 15, 2026 05:11
davidvornholt added a commit to davidvornholt/wordhold that referenced this pull request Oct 15, 2026
**Before.** Wordhold ran the canonical Standards files of 11 October, because the weekly standards sync has failed since 5 October. It therefore lacked several later CI fixes: a push to a draft PR directly followed by ready for review could cancel the ready run, as in run 38624481042, and leave the head without its required check. The CI Postgres also synced every write to disk, so each `DROP DATABASE` in the test suites took seconds. Bun 1.4.2 has a JIT bug that desynchronizes `Error.stackTraceLimit`. Locally, a changing host network address could make Chromium abort accessibility-test requests with `net::ERR_NETWORK_CHANGED`.

**Now.** Wordhold uses the current canonical files, Standards CLI 0.30.0, and Bun 1.4.3 in the dev shell, CI, and the runtime image. Draft and ready runs no longer cancel each other ([standards#437](davidvornholt/standards#437)). Both CI Postgres services run without disk syncs ([standards#439](davidvornholt/standards#439)), and Bun 1.4.3 fixes the JIT bug ([standards#436](davidvornholt/standards#436)). The accessibility suite runs through `a11y-playwright`, which uses a loopback-only network namespace where the host allows it ([standards#431](davidvornholt/standards#431)).

## Implementation

- Synced from davidvornholt/standards@414022f. The sync also brings the animation-settle and app-release documentation changes made upstream since the last sync.
- `test:a11y` runs `a11y-playwright` because the fixture server is a static `vite preview` that needs no host network. The CLI moves to 0.30.0 because the structure check in 0.29.0 accepts only `playwright test` there.
- `bun install` does not add a new `bin` of an existing workspace package to `bun.lock`, and `--frozen-lockfile` does not notice its absence. The three `bin` lines for `@davidvornholt/a11y-testing` were added by hand, exactly as in the Standards lockfile; `bun install --frozen-lockfile` then links `node_modules/.bin/a11y-playwright`.
- The Dockerfile pins the multi-arch index digest of `oven/bun:1.4.3`.
- The `container-smoke` job in `publish-container.yml` runs the full gate against its own Postgres service, which gets the same `POSTGRES_INITDB_ARGS`.
- `@types/bun` stays `^1.4.2`, as in the canonical packages.

## Verification

### Completed checks

- `bun run check` on the final commit, with `DATABASE_URL` from `apps/web/.env.local`: `standards check` passed (63 canonical paths match, structure matches), and all 15 Turbo tasks passed. An uncached run on the same content passed all 15 tasks in 38.8 s: web 932 tests, db 28, ai 188, a11y-testing 21.
- `bun run test:a11y` in `apps/web`: 524 passed in 35.6 s inside the loopback-only namespace, without the fallback notice.
- `podman build` of the Dockerfile succeeded, and `bun --version` in the image prints `1.4.3`.
- The `container-smoke` checks, replayed with Podman against `postgres:18-alpine` started with the new `POSTGRES_INITDB_ARGS`: `fsync`, `synchronous_commit`, and `full_page_writes` read `off`; `db:migrate:production` passed twice; the read-only container without capabilities answered `/api/health` with `{"status":"ok"}` as user `65532:65532`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant