From eeb59b92295e74b956d32e66c3c318e105a391db Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 6 Nov 2026 18:22:04 -0300 Subject: kinds #38, a kind's ticks and views as units of the session's origin (ยง17.2 B 1): a step of the session's own (a tick, a job's answer, a 9P request, any input no client sends) tells each view whose facts moved and ticks a focus changed or a deadline come, a client's input ticks only the pane its key, click or word went to (which already waits), so a client never guesses a tick and never waits for one; the tick's prefix is in its taped outcome (a Shadow's tag is the authority's from the tape, `told` and the frame's prefix gone, the dump carrying the prefix), Kind.wake says a focus change, the tick wait and Kind.repaint are gone, the post-unit flush stays for the tick after a key; the stall test asserts the replay (0 mispredicted, 0 waited) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/dump.zig | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/dump.zig') diff --git a/src/dump.zig b/src/dump.zig index 52002697..2f52d1d9 100644 --- a/src/dump.zig +++ b/src/dump.zig @@ -927,7 +927,8 @@ const SlotRecord = struct { next_tick: u64 = 0, views: [views.max]u64 = @splat(0), focused: bool = false, - told: []const u8 = "", + /// Its tick's prefix: a replica's tag laid out as the session's. + prefix: []const u8 = "", /// A placeholder's why (its file not here). refused: []const u8 = "", /// What a step reads of it that its kind's open made (Kind.reopen) or @@ -940,7 +941,7 @@ const SlotRecord = struct { pub fn slotWrite(s: *const Kind.Slot, gpa: std.mem.Allocator, w: *std.Io.Writer) !void { var place: [32]u8 = undefined; - var r: SlotRecord = .{ .name = s.nameOf(), .version = s.version, .path = s.path, .art = s.art, .record = s.record, .where = s.where_text.slice(), .values = s.values.slice(), .live = s.live, .next_tick = s.next_tick, .views = s.views, .focused = s.focused, .told = s.told.slice(), .refused = s.refused.slice(), .tail = s.tail.slice(), .selection = s.selection }; + var r: SlotRecord = .{ .name = s.nameOf(), .version = s.version, .path = s.path, .art = s.art, .record = s.record, .where = s.where_text.slice(), .values = s.values.slice(), .live = s.live, .next_tick = s.next_tick, .views = s.views, .focused = s.focused, .prefix = s.prefix.slice(), .refused = s.refused.slice(), .tail = s.tail.slice(), .selection = s.selection }; var owned: ?[]u8 = null; defer if (owned) |o| s.gpa.free(o); if (s.ops != null) { @@ -977,7 +978,7 @@ pub fn slotRead(out: *Kind.Slot, gpa: std.mem.Allocator, bytes: []const u8) !voi @memcpy(out.name[0..@min(15, r.name.len)], r.name[0..@min(15, r.name.len)]); out.path = try gpa.dupe(u8, r.path); out.where_text.set(r.where); - out.told.set(r.told); + out.prefix.set(r.prefix); out.refused.set(r.refused); out.tail.set(r.tail); out.values.set(r.values); -- cgit v1.3