From d92ea9dfdd9198b69bff420c3b594f0ffed1e1bb Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 30 Oct 2026 16:50:58 -0300 Subject: Messages: a detached session's messages go on the clock in the pump, after its wait, not in the host's wait: the host's call (tty waitInput, gui waitDetached) was no input, its clock read untaped, so a replay (and every replica of a session nobody attached) kept a message its session had let go; with MessageLinger 0 (test/daemon.py's sessions) a tape whose session said a failure never replayed, on main too (pane 0's msg, digest 6, 7 of 7 runs; 0 of 6 after); test/cross_replay.py's session says MessageLinger 0 again Co-Authored-By: Claude Opus 5.5 --- src/pardes.zig | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/pardes.zig') diff --git a/src/pardes.zig b/src/pardes.zig index 189a5b02..a4fcb2d3 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -6175,6 +6175,11 @@ pub const Pardes = struct { } else 0; f(h.ctx, timeout); } + // Detached, nobody's key dismisses a message: they go on the clock, + // here in the step, where the clock read is taped (the host's wait + // did it, untaped, and a replay kept a message its session had let + // go). + Messages.expireUnattended(p); p.frames.mark_start = FrameStats.nowNs(); if (v.now) |clock| p.advance(clock(h.ctx)); p.settle(); -- cgit v1.3