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/addon_test.zig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/addon_test.zig') diff --git a/src/addon_test.zig b/src/addon_test.zig index 7c9950d7..2e673145 100644 --- a/src/addon_test.zig +++ b/src/addon_test.zig @@ -138,13 +138,13 @@ fn run(io: std.Io, gpa: std.mem.Allocator, lib: []const u8, script_path: ?[]cons if (!p.executeBuiltinLine(at, line)) try out.print("not a word here: {s}\n", .{verb}); } drain(p); - // A tick owed (a pane opened or loaded here, outside a step) and a - // view whose facts a frame's layout changed (its tag wrapped), as - // a host steps for them. - if (p.panes[id.?]) |pane| if (window(p, id.?) != null and (pane.addon.?.next_tick == 1 or Kind.viewOwed(p, pane.addon.?, id.?))) { + // The session's own steps owed (a tick asked outside a step, a view + // whose facts moved, a focus), as a host's pump takes them (17.2). + var owed: usize = 0; + while (owed < 4 and window(p, id.?) != null and (Kind.wake(p) orelse std.math.maxInt(u64)) <= @max(1, p.clock.stepped_ns)) : (owed += 1) { p.update(.tick); drain(p); - }; + } try show(p, gpa, id.?, out, opened or is(verb, "size")); if (Kind.breach.len > 0 and !said) try out.print("addon-test: {s}\n", .{Kind.breach.slice()}); said = Kind.breach.len > 0; -- cgit v1.3