Skip to content

Upgrade Bun to 1.4.4 - #723

Merged
lavaman131 merged 1 commit into
mainfrom
bun-1.4.4
Oct 22, 2026
Merged

lavaman131 merged 1 commit into
mainfrom
bun-1.4.4

Conversation

@lavaman131

Copy link
Copy Markdown
Collaborator

Moves Chopin from Bun 1.4.2 to Bun 1.4.4, which shipped today with security fixes for TLS, WebSocket, Bun.SQL, fetch, bun install and other APIs.

Where the version changed

  • Workflows: ci.yml, release-cli.yml and verify-agents.yml (BUN_VERSION), and weekly-use-effect-review.md. Its .lock.yml was recompiled with gh aw compile 0.86.2, the compiler that produced it.
  • mise.toml, and packageManager in package.json
  • Dockerfile (ARG BUN_VERSION), e2e/conversation-plan.Dockerfile and e2e/design/Dockerfile (oven/bun:1.4.4; these images are pinned by tag, not by digest)
  • AGENTS.md, README.md, docs/chopin-cli-reference.md (the Bun that /connector.js needs), docs/self-hosting.md, e2e/design/README.md
  • bun.lock: the lockfile format is unchanged, so it was not regenerated. Only the @types/bun and bun-types entries and the new override changed.

@types/bun 1.4.4 isn't published yet. The catalog uses @types/bun 1.4.3, and an overrides entry pins bun-types to 1.4.4, the types published with this release. When @types/bun 1.4.4 is out, the override can be removed.

Changes in 1.4.3 and 1.4.4 that affected us

  • Bun.SQL result types (1.4.4): a query result is now typed as T & ResultMetadata. Three toEqual checks in the migration test now compare a plain copy of each result.
  • fetch network errors (1.4.4): the message now starts with the code, for example ECONNRESET: The socket connection was closed unexpectedly. Because of that, the connector printed Can't reach Chopin (ECONNRESET: ECONNRESET: …). failureCause now shows the code only once. This changes the connector.
  • bun test .rejects and Bun.serve WebSockets (1.4.4 regression, oven-sh/bun#45805): while a .rejects matcher is pending, Bun.serve can close a valid socket with 1002 Received new message inside a fragmented message. I reproduced the upstream report on 1.4.4, and it passes on 1.4.2. The agent link's Stop and Resume test now awaits the refusal and then asserts on it. This only affects that test pattern. The frames on the wire are valid, and replaying them against a plain Bun.serve server works.
  • ENETUNREACH in a route-free namespace: in a --network none container, Bun 1.4.4 still reports ENETUNREACH as ECONNREFUSED, the same as 1.4.2 (Node reports ENETUNREACH). The conversation-plan worker's version-keyed mapping now names 1.4.4.
  • Also checked and not affected:
    • WebSocket close codes changed (1005 for close() without a code). Nothing in the app or connector depends on 1000.
    • bun install now rejects unknown flags. All of our flags are valid.
    • --disallow-code-generation-from-strings=strict has new behavior. We don't use it.
    • Bun.SQL no longer reads the PASSWORD environment variable. We pass the URL.

Connector / CLI

The chopin binaries are compiled with the release workflow's Bun, so the next CLI release will embed Bun 1.4.4 and include the failureCause fix. It needs a CLI release for users to get either one. This PR doesn't bump the CLI version.

Verification (Bun 1.4.4, run locally)

  • bun install --frozen-lockfile: no changes
  • GIT_CONFIG_GLOBAL=/dev/null bun test --parallel --no-isolate: 6725 pass, 22 skip, 0 fail. Before the fixes, the two failures above reproduced every time on 1.4.4 and never on 1.4.2. After the fixes, both files pass on both versions.
  • bun run test:postgres against a disposable PostgreSQL 17: 121 pass
  • bun run types and bun run ci: pass
  • docker build . and docker build -f e2e/design/Dockerfile .: both build, and both images run Bun 1.4.4
  • build:binaries bun-linux-x64: chopin 0.0.20, and the bridge smoke test apps/connector/src/binary.test.ts passes
  • E2E against disposable databases: connector, connection, machines, planner-attachment, implementation-launcher, build-restart, collab and setup-agents. 60 passed, and 1 live-only test was skipped.

There's no UI change, so this PR has no visual preview.

Bun 1.4.4 carries security fixes for TLS, WebSocket, Bun.SQL, fetch and the
package manager. The CI, release and agent-verification workflows, the weekly
React Effect review (recompiled with gh aw 0.86.2), mise.toml, packageManager,
the application and E2E Docker images and the documentation now name 1.4.4.

@types/bun has no 1.4.4 release yet, so the catalog takes 1.4.3 and an override
supplies bun-types 1.4.4, the types published with this release. Those types
add result metadata to Bun.SQL query results, so the migration test compares a
plain copy of each result.

Three behaviours changed under 1.4.4:

- fetch now starts a network error's message with its code, so the connector
  printed "ECONNRESET: ECONNRESET: ..." when Chopin was unreachable. It names
  the code once again.
- A pending `.rejects` matcher in bun test makes Bun.serve close a valid
  WebSocket as fragmented (oven-sh/bun#45805). The agent link's Stop and Resume
  test awaits the refusal before asserting it. Only that test pattern is
  affected.
- Bun 1.4.4, like 1.4.2, reports ENETUNREACH as ECONNREFUSED in a route-free
  network namespace, so the conversation-plan worker's egress check keys its
  mapping on 1.4.4.

The chopin CLI is compiled with the release workflow's Bun, so its next release
embeds 1.4.4 and the connector's error wording fix.

Assistant-model: Claude Opus 5.5 (fast)
Assistant-workflow: inline (fast subagents)
Assistant-verification: bun test passes with Bun 1.4.4 (6725 pass, 0 fail); the two failures it first showed pass on both 1.4.2 and 1.4.4 after the fixes
Assistant-verification: the PostgreSQL contract, bun run types and bun run ci pass
Assistant-verification: the application and design Docker images build on oven/bun:1.4.4, and the compiled CLI passes its bridge smoke test
Assistant-verification: the connector, connection, machine, Planner attachment, launcher, restart, collaboration and setup E2E files pass (60 passed, 1 live test skipped)
User-preference: Keep Bun on the latest security release
Co-authored-by: Alex Lavaee <alexlavaee@microsoft.com>
@lavaman131 lavaman131 self-assigned this Oct 22, 2026
@lavaman131
lavaman131 merged commit f43776a into main Oct 22, 2026
24 checks passed
@lavaman131
lavaman131 deleted the bun-1.4.4 branch October 22, 2026 20:48
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