Repository navigation
chore: pin Bun runtime and types to 1.4.2 - #14800
Conversation
Bun 1.3.14 mishandles ownership of extra child-process stdio descriptors. A descriptor can be closed twice and then reused, so a later unrelated subprocess fails with EBADF in epoll_ctl. This surfaced as flaky unit-test failures from simple-git calls under the VS Code suite. Bun fixed the descriptor ownership bug after 1.3.14. Pin the runtime to 1.4.2 so CI and local development get the fix, and align the Bun type packages and documented minimum version.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (7 files)
Previous Review Summary (commit 9e0a77e)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 9e0a77e)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Related consistency notes (unchanged files, no inline comment)
Files Reviewed (5 files)
Reviewed by deepseek-v4.1-flash · Input: 86.9K · Output: 26.3K · Cached: 1.4M Review guidance: REVIEW.md from base branch |
Typecheck failed because bun-types 1.4.x widened native FFI return values to bigint | Pointer | null, which @ff-labs/fff-bun 0.9.4 does not accept. Restore the patch that narrows those results with an asResult helper. Also add the companion changes a Bun runtime bump needs: the Process event overload shim for the narrowed Bun 1.4 types, Bun 1.4.2 hashes in nix/bun.nix, release-age excludes for the freshly published @types/bun and bun-types, the updated Bun image version, and a changeset.
What Problem This Solves
The VS Code unit-test job intermittently failed when a real
gitsubprocess inpackages/kilo-vscode/tests/unit/agent-project-paths.test.tsaborted with:This is not a test-logic failure. It originates in Bun child-process descriptor handling.
Why This Change Was Made
Bun 1.3.14 can double-close the parent end of an extra stdio pipe (fd >= 3). The kernel then recycles the descriptor, so a later unrelated subprocess call fails. Bun fixed that fd ownership bug after 1.3.14 (oven-sh/bun#34785).
This pins the runtime that contains the fix instead of rewriting the Git tests or reducing coverage. It also aligns
@types/bun/bun-typesand the documented minimum Bun version.User Impact
No user-facing behavior change. CI and local development move from Bun 1.3.14 to 1.4.2.
Evidence
child_process.spawncalls with a 5-entry stdio array repeatedly fail withFailed to connect.agent-project-paths.test.tspasses 1,100/1,100 on 1.4.2.packages/kilo-vscodeunit suite on 1.4.2: 6,732 pass, 2 skip, 0 fail.packages/kilo-vscodetypecheck andbun install --frozen-lockfilepass on 1.4.2.