Repository navigation
fix(dev): eval builders can't die writing their own output - #1189
Conversation
|
Review (GPT 6.1 Sol) Reviewed head
Other requested checks:
No additional Effect service convention finding. Applicable surfaces were the dev runner and score classification; this changes no public wire/CLI contract, migration, product vocabulary, or served page. No repository files were edited, and no eval suite, dev instance, or production endpoint was started/contacted. |
|
All three findings are fixed in the latest push.
I re-ran the edge cases through the bridge in bwrap with a disk HOME: stdin, exit code 3, separate stderr, a background sleeper (exits at once), and output across a pause. Typecheck, test types, lint and format pass. Node runs all 20 tests; Bun runs 19 and skips the bridge test. |
d1b23e3 to
8a19d43
Compare
|
Re-review (GPT 6.1 Sol) Reviewed The previous items are resolved:
New P2 — Freeze the spool boundary when the command exits. I reproduced this against both heads in bwrap: the main command exits after about 0.15 s, leaving a descendant writing 64 KiB every 25 ms for one second; the reader consumes 64 KiB every 100 ms. Closed-pipe check: a real reader close causes Validation: No repository files were edited, committed, or pushed. No eval suite or dev instance was started, and no production endpoint was contacted. |
|
Fixed in the latest push.
Rechecked through the bridge in bwrap: stdin, exit code 3 with separate stderr, and the 64 MiB late-reader case (all bytes, 55 MiB peak RSS). Typecheck, test types, lint and format pass. Node runs all 21 tests; Bun runs 19 and skips the two bridge tests. |
|
Re-review (GPT 6.1 Sol) Reviewed
P3, non-blocking — Synchronize the descendant test's startup. Validation: No tracked files were edited, committed or pushed. No eval suite or dev instance was started, and no production endpoint was contacted. |
|
On the P3: a191899 synchronizes the descendant test. The logger first writes a 256 KiB backlog, then touches One thing that check turned up, for the record: under vitest this test can't reproduce the slow-reader hang. Effect's child-process stdout stream pulls the pipe eagerly into its own buffer, so the per-chunk sleep doesn't slow what the bridge sees. The old bridge then catches up between the logger's writes and exits too. The regression is reproduced by the direct bwrap run with a truly slow reader, which I re-ran against the synchronized command:
The test still guards the design I avoided, a bridge that waits for every writer to close the spool: that would hang there. It also checks that the backlog is delivered. Node runs all 21 tests; Bun runs 19 and skips the two bridge tests. Typecheck, lint and format pass. |
Acceptance: PASS with notesChecked Done means
Golden journeys
Rollback answers: match the diff. This changes only dev-tooling code and tests, with no migration, production data, deployed contract, or infrastructure change. The unlinked HOME spools disappear when their sandbox descriptors close. A revert needs no Validation Not run
Notes
Signed: GPT-6.1 Sol, Codex harness through T3 Code. |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
a191899 to
918a059
Compare
…tals stay exact (#1222) ## What changed This adds release 35's What's new entry, written from `dd0e2ec`. It covers everything merged since release 34's `through` (`e5334ca`), and sets the `patchy` release to `0.35.0` in `packages/patchy/package.json` and `CURRENT_RELEASE`. | Change | PRs | | --- | --- | | Fixed: keyboard shortcuts in patches do what they say (a once-per-press shortcut doesn't fire again while held, shortcuts wait during input-method composition, symbol keys such as `+` work on every keyboard) | #1152 | | Improved: agents keep shared totals exact | #1184 | The rest get no line: - #1147, #1154, #1189, #1155, #1172 and #1153 are `pnpm dev eval` tooling. - #1150 renames a CI check. - #1203 is an internal docs paragraph. - #1221 changes the production spend alerts, which nobody using Patchy sees. - #1149 is release 34's own entry. ## Look at - **The entry**, at the top of `releases` in `packages/core/src/whatsNew.ts`. - **Rollback safety, from the live commit `11dc68b` (release 34) to `dd0e2ec`:** - None of the 11 PRs is labelled `one-way`, and each one's Release impact answers say a revert leaves nothing behind. - #1152 changes `patchy/hotkeys`, which patches bundle when they are built. Published patches keep the copy they bundled. A patch repo that writes `"+"` stops typechecking only if it moves back to an older `patchy` release. - #1184 is skill text. #1147 adds a dev-only personas option that production never reads. - #1221 changes a cost setting on the two budgets in the base stack. Releases don't read budgets. - Nothing else touches code that runs in production. **Rollback line:** If this release misbehaves, roll back to `11dc68b` (release 34). ## How it was verified - **Tests.** `whatsNew.test.ts`, `WhatsNewPages.test.ts` and `schemas.test.ts` pass (21 tests), and `bun fmt` passes on the changed files. - **Deploy state.** I pinned the live commit from `/healthz/deep`: `11dc68b` (release 34). The Deploy run updated last succeeded, and none is unfinished. ## Release impact - [ ] **Breaking** — requires action from anyone already running this - [x] **Not breaking** — no action required Text and version numbers only. Like every release, the `0.35.0` bump tells CLIs and patch repos installed before this deploy to upgrade. - **What does a revert leave behind?** Nothing. - **Does the release before it still work with that?** Yes. Built by Claude Opus 5.5 (`claude-opus-5-5`) in Claude Code, through T3 Code. Co-authored-by: Claude Opus 5.5 <[email protected]>
What changed
Eval runs could die mid-build for no fault of the builder. A Terra run on #1153 ended with
It exited 101 without a result: failed printing to stdout: Resource temporarily unavailable (os error 11)and was scoredgave-up. A Sol judge in calibration exited 101 the same way.The cause: the builder inherits the bridge's stdout, a pipe to the runner. Its own Node-based tools can put that shared pipe into non-blocking mode. When the runner reads slowly, for example while grading other runs, the pipe fills, the next write fails instead of waiting, and Rust's
println!panics.Now the bridge gives the command spool files in the sandbox's HOME, which is on disk, unlike its tmpfs
/tmp. They're unlinked once open, so the builder never sees them. The bridge hands each file on as it grows, never faster than the runner drains it. A write to a file never fails because it's full, whatever mode it's in. Output waiting for a slow runner costs disk, not memory. When the command exits, the bridge records each file's length and hands on exactly that much, so a process the command left running can't keep the sandbox alive. Since the bridge is the sandbox's first process, its exit then ends everything else. If the failure ever recurs, the classifier counts it as infrastructure, so the run is retried rather than charged to the builder. Onlyfailed printing to stdout|stderrcounts; an unrelatedos error 11stays the builder's.Look at
Reproduced, then fixed. I ran the real bridge in bwrap with a command that marks its stdout non-blocking and writes 2 MiB, while the runner side starts reading 2 s late:
The relay is bounded. A 64 MiB writer with the runner reading 3 s late delivers every byte at a 55 MiB bridge peak, where an unbounded relay used 127 MiB. A logger left running forever after the builder exits, with a truly slow reader: the sandbox ends in 0.56 s with what was written before the exit, where an unfrozen relay ran into a 30 s timeout.
Behaviour kept, each checked through the bridge in bwrap:
exit 3→ 3)How it was verified
Bridge tests. Two tests run the real bridge through
bwrapArgsandopenNetwork:Where bubblewrap can't start a sandbox or real Node is missing (CI runners,
bun --bun), both skip viactx.skip. Effect's child-process stream reads eagerly, so the slow-reader case is shown by the direct bwrap reproductions above rather than by the test.Classifier tests cover the
failed printing to stdout … os error 11detail, and an unrelatedos error 11that staysgave-up.Checks.
scripts/dev/src/eval/eval.test.ts: Node runs all 21 tests; Bun runs 19 and skips the two bridge tests. Typecheck, test typecheck, lint and format pass.Review. Sol reviewed it three times; the final verdict is merge.
Acceptance. PASS with notes: 28 direct checks and a real
cheerseval.Release impact
Tick exactly one.
Breaking — requires action from anyone already running this
Not breaking — no action required. Dev tooling only.
What does a revert leave behind? Nothing; the spool files are unlinked inside each sandbox's HOME and go when it ends.
Does the release before it still work with that? Yes.
Built by Claude Opus 5.5 (
claude-opus-5-5) in Claude Code, through T3 Code.