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/Kind.zig | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/Kind.zig') diff --git a/src/Kind.zig b/src/Kind.zig index 08c04154..71ff4890 100644 --- a/src/Kind.zig +++ b/src/Kind.zig @@ -126,8 +126,16 @@ pub const Registry = struct { /// What the core keeps of a pane of a kind, round the kind's own state. /// A rollback copy leaves it be, as a terminal's emulator; a dump writes -/// its record by hand (dump.zig). +/// its record by hand (dump.zig). A digest walks every field a step reads +/// (17.2), which a dump carries and test/panes.zig's parity walk checks. pub const Slot = struct { + pub const replica = .{ + // The kind's own and the authority's (its code and memory, its + // jobs' inputs, its file's hash, a placeholder's record, the place + // its kind says), and what a frame makes (the thumb, the pointer, + // whether one was drawn: a view's, never a step's). + .local = .{ "ops", "st", "gpa", "arena", "opened", "jobs", "tokens", "record", "where_text", "thumb_at", "thumb_span", "pointer", "painted", "over", "shadow", "used" }, + }; /// Its kind's code here; null in a placeholder (`live` false: its kind /// not in the registry, its record kept for the day it comes) or a /// Shadow (a replica's pane of a library's kind). @@ -205,13 +213,6 @@ pub const Slot = struct { return std.mem.eql(u8, s.nameOf(), name); } - pub fn digest(s: *const Slot, h: *walk.Hasher) void { - h.update(s.nameOf()); - h.update(s.path); - h.update(std.mem.asBytes(&s.art)); - h.update(std.mem.asBytes(&.{ s.next_tick, s.gen, @intFromBool(s.live), @intFromBool(s.focused) })); - } - pub fn free(s: *Slot) void { for (&s.jobs) |*j| if (j.*) |job| s.gpa.free(job.in); s.gpa.free(s.selection); -- cgit v1.3