diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-30 05:28:34 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-30 05:28:34 -0300 |
| commit | 16f4a216e45fe8425d594d04803287eb3557bdf9 (patch) | |
| tree | 7a452b58744322f254d096520127e1edcfa71e66 /docs/next-daemon.md | |
| parent | bbcebf80c45e0182bf8ff6adc2336afc4bc4af51 (diff) | |
| download | pardes-16f4a216e45fe8425d594d04803287eb3557bdf9.tar.gz pardes-16f4a216e45fe8425d594d04803287eb3557bdf9.zip | |
docs/next-daemon.md: the final gate's notes: the three found on the way (a terminal's paint walking the page list a cell, glibc's tcgetattr past Zig's termios, an optional slice loaded undefined in ReleaseSafe), the gates in Debug and against the installed ReleaseSafe binaries, the FreeBSD main test, the A/B against base, what was installed
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs/next-daemon.md')
| -rw-r--r-- | docs/next-daemon.md | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/docs/next-daemon.md b/docs/next-daemon.md index ce828b89..6e47bd06 100644 --- a/docs/next-daemon.md +++ b/docs/next-daemon.md @@ -2919,3 +2919,79 @@ Not done, and why: - The remote client (the other line) wires it: `initDump`'s core, the frame hook, its `moved`. (Done since: Phase 5 part B notes, with the echo through the FreeBSD box's link.) + +## The final gate notes + +Run 2026-10-30 on main with every phase merged (rqzuvput, then the three +fixes below), in the default workspace. Scripts and logs are in +`.scratch/daemon/final/`. + +Found and fixed on the way: +- **A terminal's paint walked the page list once a cell** (uvprzmxw). + `recolorAnsi` read each cell through `pages.getCell(viewport x, y)`, + which walks from the viewport's top down to the row. The main build no + longer inlined it. `terminal.cellAt` reads the cell from the row's own + pin instead. Phase 5B's "regression against base" was something else: + its core benchmark was a Debug core beside base's ReleaseFast one (the + `--json` identity says which). +- **glibc's `tcgetattr` overran Zig's termios** (qoprvkln). glibc's struct + is 60 bytes and Zig 0.17's `std.c.termios`/`std.posix.termios` is the + kernel's 44, so every call wrote 16 bytes past its caller's struct + (vaxis's `makeRaw` too). The ReleaseSafe tty trapped at its first + terminal (`BADF => unreachable`); Debug and ReleaseFast survived on the + stack's luck. On linux-gnu, main.zig exports `tcgetattr`/`tcsetattr` + as the kernel's TCGETS/TCSETS* ioctls, which touch only the 36 bytes + both layouts share. FreeBSD's libc struct is 44 bytes, so nothing + overruns there (checked on the box). +- **Restore of a session with a command pane failed in ReleaseSafe** + (xquktpqo): "end of dump". The walker loaded an optional by setting it + to an undefined payload and reading into `.?`. A `?[]u8`'s null is its + address, so the optional itself was undefined, and ReleaseSafe's + optimizer took it as null. `Pane.command` read one byte long and every + field after it fell out of step. Pointer-like payloads now load through + a local. Found by tracing (type.field, offset) from the loader in a + Debug and a ReleaseSafe build and diffing for the first divergence. + +The last two were invisible to every Debug suite. The gate therefore runs +the installed (ReleaseSafe) binaries through the suites that start a real +pardes. + +Gates, Debug unless said: +- `core-test`, `unit-test -Dplatform=tty` (its perf gate too), `snap` + (113/113), `replay`, `replicas` (no divergence, no wrong delta at + 30/80/207 ms), `9p-io-test`, `fs-test`, `test/daemon.py` (20 cycles), + `test/daemon.py --upgrade`, `test/fs.py`: all pass. +- `unit-test -Dplatform=gui`: 1563 of 1575, 10 skipped, and the two that + failed on main already. +- ReleaseSafe, the binaries installed: a tty in a pty with the daemon on + and off, `test/daemon.py` 20 cycles, `test/fs.py`, `snap -Doptimize= + ReleaseSafe` (113/113), `--upgrade` Debug to ReleaseSafe and back, the + GUI 5 s offscreen: all pass. +- The FreeBSD main test (ReleaseSafe on both sides, `e2e_box.py`): a + session on the box, two replica clients here and a terminal there, all + three typing. Every digest agreed (72 checks), first frames at 3.8 and + 3.9 s, a shell's answer 223 ms after Enter, 1 misprediction and none + visible. + +No local regression, ReleaseFast, interleaved base/new on the perf cores, +new/base of the medians: +- The core in process, on an idle machine (`--only medium|small --reps + 25`, three rounds): every cell 0.91 to 1.02. Run beside builds, the + big-buffer cells (`body-2m`, `body-appends`, `open`) spread 1.6x run to + run on base alone, so that run's 1.10 to 1.16 there is noise. The idle + rerun is the measure. +- A terminal's frame (the scrollback cells, beside builds): render 0.86 + to 0.90, output 0.89 to 0.91, edit-char 0.87 to 0.91. +- Startup: boot 0.93 to 1.00, first frame 0.94 to 0.96, peak memory the + same. +- Live tty keystroke-to-present: level within each CPU state. With the + machine busy, key-down is 459/469 µs against 452/465 and page-down + 370/378 against 371. Idle, it is 1553/2060 against 2033 and 1939/2102 + against 1921 (the `powersave` governor). The medians across both states + read 0.33 to 1.70 and mean nothing. +- Live GUI: present 32 to 38 ms on both (the offscreen software present), + core 220 to 560 µs on both. + +Installed 2026-10-30 05:27 into ~/.local/bin: pardes and pardes-gui +0.24 (bbcebf80c45e), ReleaseSafe. The previous ones (0.24 caffd9c1f874, +2026-10-29 08:57) are `*.bak-pre-daemon`, and pardes-v9fs is unchanged. |
