From 1b38ca0aa0bfae1177f80a6713ec6d787d2f77d4 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 6 Nov 2026 18:23:20 -0300 Subject: kinds #39, paint writes nothing a step reads and the digest is every Slot field a step reads (ยง17.2 B 2-3): the Slot says what is the kind's own or a frame's (its code and memory, its jobs' inputs, a placeholder's record, the place its kind says, the thumb, the pointer, whether a frame was drawn) and the walker digests the rest, `placed` and the prefix leave the Shadow's frame (the pointer its one byte), the dump carries the cancelled tokens a replica's job answers are dropped by, and a pane test dumps a session with a PDF and a picture, loads it on another core and compares every Slot field the walk does not leave out, so a field added and not dumped fails a test, not a soak 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/dump.zig') diff --git a/src/dump.zig b/src/dump.zig index 2f52d1d9..b1711cf3 100644 --- a/src/dump.zig +++ b/src/dump.zig @@ -927,6 +927,8 @@ const SlotRecord = struct { next_tick: u64 = 0, views: [views.max]u64 = @splat(0), focused: bool = false, + /// The jobs whose answers it dropped (api.cancel): a replica's drop them too. + cancelled: [4]u32 = @splat(0), /// 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). @@ -941,7 +943,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, .prefix = s.prefix.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, .cancelled = s.cancelled, .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) { @@ -973,7 +975,7 @@ pub fn slotRead(out: *Kind.Slot, gpa: std.mem.Allocator, bytes: []const u8) !voi var arena: std.heap.ArenaAllocator = .init(gpa); defer arena.deinit(); const r = try walk.load(SlotRecord, arena.allocator(), bytes, null); - out.* = .{ .gpa = gpa, .arena = .init(gpa), .version = r.version, .art = r.art, .live = r.live, .next_tick = r.next_tick, .views = r.views, .focused = r.focused }; + out.* = .{ .gpa = gpa, .arena = .init(gpa), .version = r.version, .art = r.art, .live = r.live, .next_tick = r.next_tick, .views = r.views, .focused = r.focused, .cancelled = r.cancelled }; errdefer out.free(); @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); -- cgit v1.3