1.2 KiB
Prompt
Fix cancellation during an indeterminate transport write without allowing a second RPC msg to corrupt the stream. Keep the transport fix separate from the higher-level to_actor remediation and explain the length-prefixed protocol rather than using unexplained “framed send” terminology.
Response summary
Close a msgpack transport stream when cancellation interrupts its length-prefixed send_all() operation. The stream can no longer be safely reused because Trio cannot report how many bytes were written.
Files changed
tractor/ipc/_transport.py- close an interrupted send stream.tests/ipc/test_each_tpt.py- cover cancellation during the write.
Human edits
The human required this transport edge-case fix to land as its own behavioral commit with a detailed message. During staged review, the human also rejected the unexplained “framed send” wording and asked for terminology tied directly to the actual transport operation.