Repository navigation
chore(nix): pin Bun 1.4.4 so gated commands get blocking stdio - #528
Conversation
Bun 1.4.2 marks the gate's piped stdout or stderr O_NONBLOCK, a flag on the open file description its command shares, and uv aborts on the EAGAIN that follows (astral-sh/uv#22170). Bun 1.4.4 clears it before spawning (oven-sh/bun#43868). nixpkgs still ships 1.4.2, and the rev that ships 1.4.4 also moves opencode, which the runner pins through @opencode/client. So take only Bun from a second nixpkgs input, locked to the rev moq.pro uses, and bump packageManager to match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed head d30c729 against base a3789c7.
[P2] Remove private-repository references from the public PR description.
Location: PR description, Problem, Change, Land runner, and Suggested follow-ups sections. The description includes private-repository links and host-specific operational details. assets/CONTEXT.md explicitly prohibits private-repository links in public repositories and requires justifying the work on its own merits. Remove those references and operational details, retaining the generic blocking-stdio reproduction, public upstream links, version rationale, and validation. Keep any deployment coordination in its appropriate private destination.
No actionable implementation defect found in the four-file diff. The Bun overlay feeds the package builds, development shell, and version check; the locked upstream package declares Bun 1.4.4 for all three flake systems. The public Bun fix in oven-sh/bun#43868 is included in bun-v1.4.4, and the new test exercises inherited stdout/stderr flags through the real CLI.
Static review only through the GitHub connector. I did not execute code, tests, builds, or Nix evaluation, and have not independently reproduced the reported validation results.
(Written by review (OpenAI))
|
No actionable comments were generated in the recent review. WalkthroughThe flake now uses a separate nixpkgs input for Bun and continues to use the existing nixpkgs input for other packages. The package manager version in package.json is updated to Bun 1.4.4. A Linux-only test checks that a gated command with piped output exits successfully and that stdout and stderr do not have the O_NONBLOCK flag. Merge Risk:
|

Problem
Bun 1.4.2 marks
quest gate's own piped stdout or stderrO_NONBLOCK. That flag lives on the open file description its command inherits, so the command starts with non-blocking stdio. uv then panics on the firstEAGAINand aborts with no message (astral-sh/uv#22170). Bun 1.4.4 clears the flag before spawning (oven-sh/bun#43868).A consumer whose flake makes quest's
nixpkgsfollow its own, newer nixpkgs already gets 1.4.4. Aquestbuilt from this flake's own lock still uses 1.4.2.Change
package.json:packageManageris nowbun@1.4.4. CI'ssetup-bunsteps read it throughbun-version-file. There is noenginesfield, andbun.lockdoesn't record the Bun version.flake.nix: adds anixpkgs-buninput and an overlay that takes onlybunfrom it. The packages, the dev shell,quest-pinnedand thebun-versioncheck all pick it up. It's locked to nixpkgs-unstable9d3b8db, which ships Bun 1.4.4.test/gate.test.ts: adds a Linux-only regression test. It runs the real CLI'squest gatewith stdout and stderr piped, and checks that the gated command's fds 1 and 2 don't haveO_NONBLOCK, by reading/proc/self/fdinfo.Choices made without asking
d3b13ad), and also58deea6from moq-dev/quest#502, still ship Bun 1.4.2. The rev that ships 1.4.4 also moves opencode from 2.1.1 to 2.2.5. Theopencode-clientcheck would then need@opencode/clientbumped too, which is the runner's sandboxed opencode path and outside this fix. The flake comment says to dropnixpkgs-bunoncenixpkgsreaches 1.4.4. Dependabot'snixgroup keeps both inputs moving until then, andbun-versionstill fails if they drift frompackageManager./proc/self/fdinfo.Validation
PATH=<bun-1.4.2>/bin:$PATH bun run test test/gate.test.ts -t "piped output blocks"): fails withexpected 2048 to be +0, which isO_NONBLOCKon fd 1.bun src/cli/bin.ts gate -- grep -h ^flags: /proc/self/fdinfo/1 /proc/self/fdinfo/2with stdout and stderr piped. I ran it from both Node and Bun parents, with and withoutQUEST_GATE_ADMITTED.04002/02in every case.02/02in every case.just check: pass.just test: pass (29 files; 1089 passed, 5 skipped; shell hook, install and installer suites passed).nix flake check: all checks passed, includingbun-version,opencode-client,packageandquest-tree.nix build .#default: the bundle's shebang is…-bun-1.4.4/bin/bun --no-env-file.nixpkgs-bungives Bun 1.4.4 on all three flake systems.git merge-tree.Downstream runner
A self-hosted land runner that builds quest from its own pinned rev of this flake still runs quest on Bun 1.4.2. I checked that read-only, from the shebang of its installed bundle. This PR doesn't reach it until that pin is bumped past this change, which is the runner owner's job. I didn't change the runner.
Suggested follow-ups
nixpkgs-bunwith the next nixpkgs bump that brings Bun 1.4.4 and its matching opencode/@opencode/clientupdate.Models
Size: S
Implementer: Claude Code, claude-opus-5-5, high effort
Review
Rewritten by
quest reviewafter each round.01a1b372-5dc8-7443-80d3-56bae0a47e0a, round 1The specified diff consistently pins Bun 1.4.4 and its regression scenario passes directly, with no actionable defects found; full checks were blocked by the read-only environment.Addressed the online review: removed private-repository links and host-specific details from this description.
🤖 Generated with Claude Code
(Written by Opus 5.5 with high)