You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(fspy-shm): split what the channel reports from what it panics on
The CLOSED gate now means one thing: the region had no room. That is the
only failure `shm_io` owns, since the region's size is the only thing it
controls. `report_lost_record` goes with that, and the gate loses its
second meaning.
Everything else a sender can hit is a defect in this crate, so the channel
layer panics instead of reporting. `Sender::send` panics when a record's
serialized size disagrees with the bytes it writes, and `sender()` panics
when the region is there but cannot be opened, mapped, or attached to.
A missing backing file stays an error, because it is not a failure at all:
the receiver removed it, so it has already stopped collecting and this
process is working past the boundary. That distinction is what lets the
rest abort. A process that cannot attach has no way to tell the receiver it
recorded nothing, and a trace that silently omits every access a process
made is worse than a build that stops.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: crates/fspy_shared/src/ipc/channel/shm_io/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ Where the table ends and payloads begin never moves. Claiming needs no retry loo
36
36
-**The process died,** mid-claim or mid-fill. The slot stays zero and the receiver ignores it. No cleanup code runs, because none exists.
37
37
-**The process abandoned the frame** and kept going. The slot stays zero and the receiver ignores that too, since it cannot tell the two apart.
38
38
39
-
So the channel asks one thing of its users: **publish a record before performing the action it describes.** A dead writer's missing record then describes an action that never happened, and a record refused after the seal describes one performed after the channel closed. The receiver drops both. A writer that records after acting loses records with nothing said. A writer that abandons a frame and acts anyway calls `ShmWriter::report_lost_record`.
39
+
So the channel asks one thing of its users: **publish a record before performing the action it describes.** A dead writer's missing record then describes an action that never happened, and a record refused after the seal describes one performed after the channel closed. The receiver drops both. A writer that records after acting, or that abandons a frame and acts anyway, breaks the rule and loses records with nothing said. The channel cannot see either one.
0 commit comments