pbz: Chunk 30 third review pass — read the output, not the code
Round three: a fresh regression sweep against merged Chunk 29, and a reviewer who induced real failures on the spare and read what the CLI actually prints. Both found things the code-level rounds could not. From the live output: running-unsaved said the pattern "IS live on the device" while the transport error it appends to says "it may have rebooted" — and a reboot falsifies the claim in the same breath as suggesting it. Past tense now, and explicit that a reboot ends it. Also from the live output: every failure printed as one 350-580 char run-on, because the progress line is written without a newline and the error glues onto it, burying "error:" mid-line across several wrapped rows. The CLI now closes an open progress line before printing. From the regression sweep: narrowing the stored death to err.message meant an Error with an empty message left the connection un-dead, and let a second cause overwrite the first — which the queue's factory closes over, so even already-parked waiters would have started getting the wrong reason. Chunk 29 stored the object and was immune; a separate isDead flag restores that. queue.fail() now rejects an Error where a factory is required, instead of failing silently with nothing parked and skipping die()'s ws.close() with something parked. The run/save asymmetry on the same wire condition is now justified where it lives rather than left to be rediscovered: save() can defer to the preview frames, which are proof of rendering; run() ends at the ack. examples/fan-out.mjs is cited as the motivation for e.device and was still regexing prose; it now branches on the state and flags frozen walls. New deferred item: pbz save derives the device id from the file BASENAME, not the Name argument, so a colliding basename silently renames an existing pattern — a reviewer hit this on real hardware. 219 tests, typecheck green. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PZnUXRsLLnt2A7pR3X4Luj
T
Tarek Rached committed
985673ce3de6017fbcba50e94edaed287a63442f
Parent: b10f984