broker: Never block reading a requester's stdin #13

Merged
dev merged 1 commits from fix-stdin-blocking into main 2026-11-28 18:09:18 +00:00

The connection reader passed stdin to the operation through a channel 16 messages deep and waited when it was full. So a requester sending stdin to an operation that doesn't read it (anything but secret set) stopped the reader, and the broker no longer noticed the requester disconnecting: an ssh kept running.

  • Stdin is buffered without waiting, up to 1 MiB in total; a requester sending more is treated as gone. (secret set still has its own 64 KiB limit.)
  • For operations that don't take stdin, the broker closes the channel right after planning and the reader discards what arrives.
  • New test stdin_an_operation_doesnt_read_doesnt_hide_a_disconnect; it fails on main.
  • docs/design.md mentions both. No version bump: the release comes with containers as targets. No protocol change.

🤖 Generated with Claude Code

The connection reader passed stdin to the operation through a channel 16 messages deep and waited when it was full. So a requester sending stdin to an operation that doesn't read it (anything but `secret set`) stopped the reader, and the broker no longer noticed the requester disconnecting: an `ssh` kept running. - Stdin is buffered without waiting, up to 1 MiB in total; a requester sending more is treated as gone. (`secret set` still has its own 64 KiB limit.) - For operations that don't take stdin, the broker closes the channel right after planning and the reader discards what arrives. - New test `stdin_an_operation_doesnt_read_doesnt_hide_a_disconnect`; it fails on `main`. - `docs/design.md` mentions both. No version bump: the release comes with containers as targets. No protocol change. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
slop-cannon Bot added 1 commit 2026-11-28 17:29:04 +00:00
broker: Never block reading a requester's stdin
CI / Check (pull_request) Successful in 4m53s
CI / Check (push) Canceled after 3m47s
00d3c65cfd
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>
slop-cannon Bot force-pushed fix-stdin-blocking from bf383a86ca to 00d3c65cfd 2026-11-28 17:29:04 +00:00 Compare
dev merged commit 00d3c65cfd into main 2026-11-28 18:09:18 +00:00
dev deleted branch fix-stdin-blocking 2026-11-28 18:09:18 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dev/slop-broker#13