diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-19 15:52:33 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-19 15:52:33 -0300 |
| commit | 8fea4ab90a04acd5f20528b00342c23d42f8c83e (patch) | |
| tree | be264d2cd8ba57492e227d9d6a65027f3d7680c9 /core/Messages.zig | |
| parent | 553a62bac675bfc0a64254718488d3c8012f533e (diff) | |
| parent | ee2e79dea10c93c104b70cf1eedccd7ba85003fc (diff) | |
| download | pardes-8fea4ab90a04acd5f20528b00342c23d42f8c83e.tar.gz pardes-8fea4ab90a04acd5f20528b00342c23d42f8c83e.zip | |
integration: the soak on the real session loop and the cli's serve thread joined, with the tape's handle through the kinds, the core's own files and the small ones: pardes-runners-d (10c's last changes) and pardes-handle-2 (the handle's steps 3 to 5 and its two rules as tests), merged without a conflict; gates in the coordinator's ledger
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/Messages.zig')
| -rw-r--r-- | core/Messages.zig | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/core/Messages.zig b/core/Messages.zig index de10b845..767eb297 100644 --- a/core/Messages.zig +++ b/core/Messages.zig @@ -111,9 +111,11 @@ pub const Message = struct { } pub fn stamp(buf: []u8, verb: []const u8, subject: []const u8) []const u8 { - // The time of day as the session that said it read it, in its - // zone: a replica's clock and TZ are its own (core/tape.zig). - const clock = pardes.tape.value(.clock, timeOfDay, .{}); + // The time of day of the host that stamps it, in its zone: only a + // host stamps a message (a file reloaded, a save, a language + // server's status), between steps, and the message it then hands + // the core (`setMessage`, an input) is what the tape carries. + const clock = timeOfDay(); const head = std.fmt.bufPrint(buf, "{s} {s} ", .{ &clock, verb }) catch return buf[0..0]; const room = buf.len - head.len; const tail = if (subject.len <= room) subject else subject[subject.len - room ..]; @@ -161,7 +163,7 @@ fn showMessage(p: *Pardes, id: usize, text: []const u8, stack: bool) void { pane.msg_len = @intCast(n); // The clock when it was said (the session clock is the last pump's, // and a 9P write after an idle hour would say it an hour ago). - pane.msg_said_ms = pardes.tape.value(.clock, nowMs, .{}); + pane.msg_said_ms = p.tape.value(.clock, nowMs, .{}); p.needs_frame = true; // New, the same line again or a status update: fresh, so it stays. pane.msg_life = .{}; @@ -185,7 +187,7 @@ fn nowMs() i64 { pub fn expireUnattended(p: *Pardes) void { if (!p.unattended) return; // The clock as the session that recorded read it (core/tape.zig). - const now = pardes.tape.value(.clock, nowMs, .{}); + const now = p.tape.value(.clock, nowMs, .{}); for (p.panes) |slot| { const pane = slot orelse continue; if (pane.msg_len == 0 and pane.msg_older_len == 0) continue; |
