diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-29 19:36:11 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-29 21:13:33 -0300 |
| commit | ad0d3f61f310ca0cc3a1ab2c36edcafb5c44b97a (patch) | |
| tree | 041b4f04a25e89b96a2b63cd1cebf788e49cb83b /docs | |
| parent | cc26fe74e092803ac2977801bf6510e05b394c29 (diff) | |
| download | pardes-ad0d3f61f310ca0cc3a1ab2c36edcafb5c44b97a.tar.gz pardes-ad0d3f61f310ca0cc3a1ab2c36edcafb5c44b97a.zip | |
docs/next-daemon.md: phase 2's upgrade (what a user loses: ZON dumps; the store checked on a copy of a real one), the web shell, and the closes measured again
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/next-daemon.md | 85 |
1 files changed, 66 insertions, 19 deletions
diff --git a/docs/next-daemon.md b/docs/next-daemon.md index fc9bdf64..95713b42 100644 --- a/docs/next-daemon.md +++ b/docs/next-daemon.md @@ -1402,8 +1402,9 @@ dump hooks; `pardes-snap --dump`, `pardes-monkey --dump`, and both in process's (the old carried dump brought the source window's theme and settings along). Panes carried now keep their undo. - **No v1 reader.** A ZON dump is refused before anything is replaced - (`not a pardes dump: it does not begin as one`), and a ZON record in - the store does not reopen. Dumps are `.dump` files now. + (`not a pardes dump: it does not begin as one`); a ZON record in the + store is an old build's session's, which no new one lists (below). + Dumps are `.dump` files now. What proved wrong or missing in the design: - The walker's list rule (exactly `items` and `capacity`) never matched in @@ -1426,11 +1427,52 @@ What proved wrong or missing in the design: hidden in text mode (OSC 133 marks are in the snapshot), its Filter, a pane's message and typed text over its history are kept, and a query pane comes back a live query, not plain text. -- Not done: the web shell (`-Ddump=` embeds a dump) was not built; a - native dump should load there by name. A dump is read whole, not - decoded as it arrives (the join can stream it; decoding as it arrives - needs a reader over a stream, not a slice). Native byte order: every - host pardes runs on is little-endian. +- The web shell had not built on main for a while (u64 counts on a + 32-bit target, threads, stb_image and the tape's host calls). It builds + again and loads a native build's dump by name: `-Ddump=` embeds + test/web-snapshots/touch.dump, made by tools/web_fixture.py, in place + of the hand-written ZON fixture. A field this build compiled out (void + on wasm) is passed over, and the theme goes by its name, a fourth + session root, since the theme table differs between builds. web-snap's + touch check passes; its drift was the test's (13 tag-layer fields, + helix's retuned colours, and a pane resized by its grip, there being no + rule between panes to drag). The web shell's own `chromeTarget` still + calls an upper pane's last row a handle, which the mouse code no longer + resizes on. +- Not done: the website's replay (pardes-website/replays/00) still runs + its July wasm; the dump it was built from is gone. `node --test + test/web_driver_test.mjs` fails "CDP closes a stalled connection after + its deadline" every time, a test of the harness's CDP client, not of + pardes. A dump is read whole, not decoded as it arrives (the join can + stream it; decoding as it arrives needs a reader over a stream, not a + slice). Native byte order: every host pardes runs on is little-endian. + +Upgrading from a build before phase 2, a user loses: +- A ZON dump: Restore and `-l` refuse it, the session they are in + unchanged. A pane carried between an old window and a new one stays + where it was (a failed handover). +- Nothing in the store. Its framing and records are as they were; only a + closed pane's dump inside its record changed. A closed pane is listed + only by the session that closed it (a session's id is new each + process), so a new build never lists, opens or reports an old build's + records, and an old window still running brings back its own. Both + builds' compactions keep the records of every running session and drop + those of sessions that ended, as before. + +Checked on a copy of the user's real store (14.4 MB: Recent's 234 paths, +140 ZON records of 8 sessions, three of them running), the copy under the +workspace's scratch, the real one never opened: a new build starts on it +with no error or message, /recent lists the same 200 entries as the base +build's on the same copy, Panes shows none of the old records, a pane +closed and brought back comes back. A compaction forced by a record cut +short (as a writer that died leaves one) gives the same file in both +builds but for each one's own records: the running sessions' 72 records +byte for byte, Recent folded to the same 200, the ended sessions' 68 +dropped. The base build then runs on a store the new one wrote, with its +walker records in it, without an error. One cost moved: a closed small +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, @@ -1447,24 +1489,29 @@ session read by name. 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 -own spread as the A/A): the perf harness's core cells 0.91-1.01 of base -(p90 0.95-1.08) at an A/A of 5-109%. A session of 16 small files, a +own spread as the A/A): the perf harness's core cells 0.92-0.99 of base +(p90 0.80-1.03) at an A/A of 15-70%. A session of 16 small files, a 100 MB file and a terminal with `seq 1 3000000` of scrollback, through 9P in a real pty: | | base | new | A/A | |---|---|---|---| -| Dump, the big file clean | 9.5 ms, 0.2 MB | 83 ms, 105 MB | 19% | -| Restore of it | 71 ms | 98 ms | 10% | -| Dump, the big file unsaved | 507 ms, 140 MB | 185 ms, 210 MB | 8% | -| Restore of it | 1841 ms | 316 ms | 2% | -| a closed pane kept: the terminal | 122 ms | 128 ms | 49% | -| the 100 MB file | 438 ms | 84 ms | 4% | -| a small file | 10.5 ms | 18 ms | 23% | +| Dump, the big file clean | 8.8 ms, 0.2 MB | 83 ms, 105 MB | 21% | +| Restore of it | 69 ms | 105 ms | 4% | +| Dump, the big file unsaved | 514 ms, 140 MB | 191 ms, 210 MB | 1% | +| Restore of it | 1845 ms | 310 ms | 0% | +| a closed pane kept: the terminal | 131 ms | 143 ms | 4% | +| the 100 MB file | 433 ms | 127 ms | 3% | +| a small file, the step after that | 9.6 ms | 17 ms | 44% | +| a small file, alone | 1.0 ms | 1.0 ms | 7% | A clean file's text is in the dump now (what makes it complete), and an unsaved one's undo (the 100 MB file's one edit keeps the text before it); binary, not base64 in ZON, so the rest is faster. A small pane's close -pays its type table (a pane's dump is self-describing) and the generic -walk: 8 ms. The live keystroke cells were not run (perf rule: `--live` -only for a change to terminal output); a dump is off the hot path. +costs what it did: the 17 ms is the 100 MB pane's teardown (panes are +freed two syncs after they close, its undo's text with it) landing in +the next close's time; three small closes after two others take 1 ms in +both builds. The type table is made once a process (it was made at +every store record: 123 µs to 33 µs a small pane's record in Debug). The +live keystroke cells were not run (perf rule: `--live` only for a change +to terminal output); a dump is off the hot path. |
