broker: Never block reading a requester's stdin
CI / Check (pull_request) Successful in 4m53s
CI / Check (push) Canceled after 3m47s

The reader passed stdin to the operation through a channel 16 deep and
waited when it was full, so a requester sending stdin to an operation
that doesn't read it stopped the reader, and the broker no longer saw
it disconnect: the operation kept running.

Buffer stdin without waiting, up to 1 MiB (a requester sending more is
treated as gone), and drop it for operations that don't read it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit was merged in pull request #13.
This commit is contained in:
jackos1998andClaude Opus 5.5 committed 2026-11-28 17:28:51 +00:00
1 parent ef53a39597
commit 00d3c65cfd
4 files changed
+50 -6

No files matched your search

+2 -1
View File
@@ -102,7 +102,8 @@ and `slop-approve`. How the code does it is in
- **One connection per request**, carrying in order:
1. the request;
2. the operation's stdin, only after approval and only for operations that read it (`ssh`
carries its stdin in the request instead, below);
carries its stdin in the request instead, below). The broker drops stdin an operation
doesn't read, and treats a requester sending more than 1 MiB as gone;
3. its stdout and stderr;
4. a final message with the exit status and any structured result.