From 2662a45ac245e574987bf6876f4470aed89da09c Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 19 Nov 2026 22:06:32 -0300 Subject: replica: the bytes kind of replica made right and joinable (P29, P32; the brief's step 2: 2a, 2b, 2c and 2d in one change): the one rule in place of two, the faults shown first (a session's output kept over a copy held ahead was fed again by a rollback: the digests apart; the pages an emulator gained while a copy was held were the epoch's and freed with it: a crash in PageList.increaseCapacity in the rollback's replay): every replica's emulators on the C heap (panes.emulatorGpa), Term.writes counting the writes into emulators, a unit whose replay wrote one never kept over a copy taken ahead, never taken as moving nothing (tape.feedsTerminal), a client's input that owed a reflow always replayed when confirmed; a speculation moves a terminal's view under bytes as under screen state; tape.unit_max (1 MiB) and Tape.cut, which the session's Peers sets, so a pump's reads are cut into units under it; the join: whole terminals in a joiner's dump, every replica the session included reloading each live terminal in the step that opens or reopens a view (panes.reloadTerminals), the session's hash taped (Site.reload) and compared, kitty records left out of it, the cell pixels set first as a feed does; .positions and .prompt compared with the replica's own emulator on replay; replicas load kitty images by direct data only (Term.direct); Peers.bytes for the soak; six tests (core/replica.zig, bytes:); tui core-test 848/997 (149 skipped), shell-test 1033/1036, pane-test 183/184, term-test 17/17, kitty-test 45/45, behaviour-test 275/275 and --replay 0, process-test 2 of 144 (the base's), image- and kitty-harness pass, unit-test bytes: 22/22; gui unit-test 1633/1637 (the perf check's BaselineHarnessMismatch); the soaks in klrvlrly's Co-Authored-By: Claude Opus Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- core/Core.zig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/Core.zig') diff --git a/core/Core.zig b/core/Core.zig index d5a990e2..9bc40775 100644 --- a/core/Core.zig +++ b/core/Core.zig @@ -1175,6 +1175,7 @@ fn openViewInner(p: *Pardes) ?View.Id { // tape does it here: a join dumps the session next, and a core // loaded from a dump has no queue (Replica.initDump). p.settle(); + pardes.panes.reloadTerminals(p); p.needs_frame = true; return .at(Views.open(p) orelse return null); } @@ -1217,6 +1218,7 @@ fn rejoinViewInner(p: *Pardes, k: View.Id) bool { if (!Views.isAway(p, k.index())) return false; p.views_away &= ~(@as(u8, 1) << @intCast(k.index())); p.settle(); + pardes.panes.reloadTerminals(p); p.needs_frame = true; return true; } -- cgit v1.3