Files
SeedPass/js/packages/cli/test
thePR0M3TH3ANandClaude Opus 5 7b5730910e Write the oversized request with backpressure, so the refusal can be read
The daemon fix landed but the test still failed on macOS and Windows, and the
remaining fault was the client. It blasted a megabyte in a single write, so
the moment the daemon capped the line and hung up, the write raised EPIPE —
and Node destroys a socket on error, discarding the refusal that was already
inbound. Ignoring the error was not enough: by then the socket was gone.

It now writes in 64KB chunks and honours the return value of `write`, waiting
for `drain` rather than pushing into a full buffer, and stops as soon as a
reply arrives. That is what a real client does, and it leaves room for `data`
to fire between chunks.

Worth stating plainly: the daemon was right the whole way through this. It
capped the line and refused, on every platform. Two layers of test artefact —
treating a client-side EPIPE as fatal, then writing without backpressure —
made correct behaviour look broken on the two platforms nobody had run.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Vtx94nXDmNgXEeThUZP4QN
2026-08-20 14:55:20 -04:00
..