From 3f62f4e2a0f40e9d92f79665c2e87804c2d55357 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 30 Oct 2026 15:57:57 -0300 Subject: docs/next-daemon.md: the remote bugs, fix3's: an error, a stat and a search's budget that meant what their build said, the guard in semantics, the cross-build replays, a window client of the box before and after, and a MessageLinger 0 replay leak found on the way Co-Authored-By: Claude Opus 5.5 --- docs/next-daemon.md | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/docs/next-daemon.md b/docs/next-daemon.md index e2101740..28449487 100644 --- a/docs/next-daemon.md +++ b/docs/next-daemon.md @@ -3650,3 +3650,82 @@ same scripts (`.scratch/daemon/final/final2.sh`). - The next step is a client that, when a word differs, asks the session for that unit's parts, so the field is named the first time. - The client heals by rejoining, at the cost of a redraw each time. + +## The remote bugs the user hit + +### fix3: what the replica stream carried in its build's own words + +A unit of the replica stream is its session's tape, written by +`walk.encode`, which said "same build only": a window client (pardes-gui) +of a terminal's session, or of the box's, read another build's bytes. +Found by the variant hunt (V2, E), with real ReleaseSafe executables. + +- **An error crossed as its number** (`@intFromError`, read back with + `@errorFromInt`). The numbers are a build's own: 451 of 505 shared names + are numbered otherwise in the Linux window's build than in the terminal's, + 244 between the Linux and the FreeBSD terminal's (FileNotFound is 62 in + both terminals and 60 in the window, whose 62 is NoDefaultValue). A + terminal's tape replayed by pardes-gui panicked at its first failed read + (`unexpected error code, found error.NonLocalPath`); a replica read the + wrong error, and diverged. + - Fix: an error is taped by its name. A set decodes it among its own + names; a name this build lacks is `error.NoSuchError`, a divergence, + never another error. `anyerror` keeps no list of names, so the tape's + five (a host's reports: `shell_failed`, `save_failed`, ...) read back + as one of `tape.Failure`, the union of the sets a host reports from. + ponytail: kept by hand; one outside it panics a Debug build as it is + taped, and is a release build's divergence. +- **A stat crossed as `std.Io.File.Stat`** (the `os_stat` site, /os over + 9P), whose `nlink` is 4 bytes on Linux and 8 on FreeBSD and `permissions` + 4 and 2: a Linux client read a FreeBSD session's stat out of step. Fix: + the site returns `fs.OsStat` (kind, size, mtime), the same everywhere. +- **The guard:** `tape.shape`, what every type the tape carries is laid + out as (each field, element and tag, an enum's names and numbers; an + error as an error), goes into `wire.semantics`. Builds whose tapes differ + in shape refuse each other's replicas in words at the hello, as builds of + other options do; a site whose result `tape.results` does not list is a + compile error. The sweep that set it (every type the tape reaches, from + the Linux terminal, the Linux window and the FreeBSD terminal builds): the + stat was the only one laid out otherwise. All three builds now hash to + one semantics; with the stat taped as before, the Linux and the FreeBSD + build hash to two. No wire version for it: every build's semantics + changes with it, so an older build is refused in words. +- **A search's answer was the build mode's (E).** regexp.zig's step budget + was 4M in Debug and 32M in a release build, and semantics names no mode: + `\s*(\w+)\s*=` over 200 letters was TooSlow in a Debug replica and no + match in its ReleaseSafe session. Fix: 32M in every mode (a Debug build's + worst search takes about two seconds). +- **Found by the cross-build replay, the same class:** a core's first view + was a window's by the build's default (`windowed = platform == .gui`), so + a window's build replaying a terminal's session started otherwise (its + init file's window settings applied); now an option (`Options.windowed`), + taped with the rest. And a window's font words (`observe_font` and the + three beside it) were no-ops in a terminal's build, so a terminal's + replica of a window's session diverged at the window's first font; every + hosted build takes them now. +- **Tests:** walk.zig's "an error is taped by its name" and regexp.zig's + "a search's answer is every build mode's" (from the variant hunt; it + fails in Debug before). `test/cross_replay.py ...`: + a session that meets the host's failures (a Look of a fifo and of a + directory, a Save into a file, a Restore of no dump, a stat and a read + under /os), recorded by one build and replayed by the others, and + `--record` and `--replay` alone for the box. Another frontend's tape must + agree in the replica that draws nothing, as a replica client draws none of + its session's frames: the two that draw meet the other build's drawing, + which owes frames for animations of its own (on 132 snapshot tapes, a + window's build agrees in all three on 13). `zig build + replay -Dreplay-with=` replays every snapshot script's tape + with the window's build as well. + - Before: pardes-gui panicked replaying a terminal's tape, and live, a + window client (main's ReleaseSafe) of a session on the box (main's) + panicked the moment the session looked at a fifo: `unexpected error + code, found error.NonLocalPath`. + - After: every direction agrees, tty to gui and back, the FreeBSD build's + tape replayed here by both Linux builds and theirs on the box; live, a + window and a terminal client here of a session on the box agree after + the same failures. +- **Not fixed, found on the way:** in a session whose init file says + `MessageLinger 0` (as test/daemon.py's do), now and then a tape does not + replay even by its own build, on main too: pane 0's message differs a + step after a failure is said (seven times in the first runs, none in 15 + since). cross_replay.py leaves the setting out. -- cgit v1.3