From 10a7e8768304478555dfe0b619423f5a4ad47d76 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 29 Oct 2026 21:13:33 -0300 Subject: docs/next-daemon.md: phase 2 on main with views and phase 5 part A: a slice a len cuts, the drawn views' selections, and the gates again Co-Authored-By: Claude Opus 5.5 --- docs/next-daemon.md | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) (limited to 'docs/next-daemon.md') diff --git a/docs/next-daemon.md b/docs/next-daemon.md index 0f008974..0f3a494c 100644 --- a/docs/next-daemon.md +++ b/docs/next-daemon.md @@ -1437,7 +1437,19 @@ What proved wrong or missing in the design: - The walker's list rule (exactly `items` and `capacity`) never matched in a safe build: Zig 0.17's ArrayList has a `pointer_stability` lock there, so phase 1's digest hashed every list's capacity and a dump wrote it. - Both take a list's items now. + Both take a list's items now (`walk.isList`). +- Merged onto phase 5 part A (sqsnvoux): a `len` may cut a slice now (a + text's room for its ranges, made whole and used `nsel` deep). The dump + writes such a slice whole, room and all, and a load gives it the room + it had; only one of plain numbers may be cut so (every bit pattern a + value past the cut), else no build. +- Phase 4's other views lost their selections whenever they were drawn: + `unpark` hands a slot's selections to the body (main's fix for a double + free) and `drawOthers` never gave them back, so a drawing session took + them from every view not live while a headless replica kept them. The + three-view monkey seeds with the headless replay found it (seeds 5 and + 35 of 50 diverged at the next key typed at several cursors); + `drawOthers` gives them back after each frame. - "pty masters passed as fds where Handover passes them today": Handover passes none (it refuses terminals: their shells are the window's children), and phase 3 made Detach happen in place, so no dump carries @@ -1501,18 +1513,22 @@ pane's record is 14.5 KB, not 1.5 KB, most of it the type table each self-describing dump carries (ponytail: bounded by 64 a session and the compaction; a table once per store generation if it matters). -The gates on the rebased line (on main vvmuwntp). `zig build replay --Dreplay-seeds=50`, now with `--dump`: the 110 scripts (129 sessions, -32,373 replica digests) and 50 monkey seeds of 70 steps (38,022 digests), -no divergence, and every session's dump at its end loaded to its digest -(all 179, field by field) and dumped again byte for byte (13.9 MB and 5.4 -MB of dumps). The 110 snapshots pass with five goldens moved (above). -unit-test tty passes; unit-test gui fails only phase 1's two known tests; -test/fs.py and test/daemon.py (20 cycles) pass. The cross-build check is +The gates on the line rebased onto main with views and phase 5 part A +(sqsnvoux). `zig build replay -Dreplay-seeds=50`, with `--dump` in all +three parts: the 113 scripts (132 sessions, 29,430 digests over their +first, second and headless replicas), 50 monkey seeds of 70 steps +(37,722 digests) and 50 at three views (29,148), no divergence, and +every session's dump at its end loaded to its digest (all 232, field by +field) and dumped again byte for byte (14.4, 5.4 and 6.7 MB of dumps). +The snapshots pass with five goldens moved (above). `zig build replicas +-- --seeds 12` (Debug, three clients, 30/80/207 ms): none diverged or +unequal. unit-test tty passes; unit-test gui fails only phase 1's two +known tests; test/fs.py and test/daemon.py (20 cycles) pass; the web +shell builds and its touch check passes. The cross-build check is walk.zig's test of two hand-written versions of a struct (a field added, one removed, one renamed, enums renumbered, a width changed, a pane whose required field changed kind left out), both ways, and dump.zig's of a real -session read by name. +session read by name. The real-store check (above) holds on this line. Measured (ReleaseFast, the base binaries from before the rework against this line, interleaved A B A ... A on the perf cores, medians, the base's -- cgit v1.3