diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-20 15:49:10 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-20 19:42:24 -0300 |
| commit | 774efcc950662cd20c1b4a41d002ce421067564f (patch) | |
| tree | 3dd309f7b9c006e4c3393e003179dff84d2f3f85 /dev/root.zig | |
| parent | 8a8ce0a6740e9a98ea37a70d401c3ba3fffe0ee1 (diff) | |
| download | pardes-774efcc950662cd20c1b4a41d002ce421067564f.tar.gz pardes-774efcc950662cd20c1b4a41d002ce421067564f.zip | |
pair: the boot as input zero (the last step's design 3, way a2): under PARDES_PAIR the client no longer waits for its session's init, dump and socket before its first frame: it makes its own core from the same options and arguments (replica.ownBoot, Replica.initBoot: Pardes.init on no tape, as the session's start, its file read on its own machine, then the view the session's join opens for it, Peers.viewFor, shared by both), draws it, and says its digest before its `far` (a new client word, `boot`, 0x0a: 0x09 is the server's zstd envelope, which a stream's reader unpacks whichever way it runs; wire protocol 26, after the other line's 25); the session's writer sends no dump when the joiner's boot digest is its own at the join, and the client, reading the welcome once its first frame is drawn (replica.confirmBoot, client.zig `confirm`, the start's inputs held until then: Link.held, Link.release), goes on from its own core, or, unequal (the file edited between the two reads, anything else a start reads otherwise), loads the dump in its place and starts again; what made boots unequal by construction, found by the digest's parts compared in a scratch build: a join's view settled the session's first effects (Pardes.settle in openView: its boot shell spawned and acknowledged inside the join), which a client cannot perform; the effects queued before a join are now performed after it, on the tape the client is sent (viewFor, queueFirst), so the boot shell's spawn and first bytes reach the client as units, as P32 asked, and the dump path gets them so too; and a boot stepped on the replica's own tape read the machine as a replica's step would (the shell, the directory): Pardes.init runs on no tape, the view on the replica's tape (no terminal reloaded there, as on the session's screen-state tape); confirmed over 100 starts of a file and 100 of a shell (see the report); a boot's terminals are made on the C heap (panes.emulatorGpa reads dump.terminal_gpa); a window's pair's client boots unwindowed, as the terminal binary its session execs (main.zig `pair`, Options.windowed); tests: core/replica.zig "a pair's client makes its own core ...: no dump is sent" and "... the file edited between ...: the dump is sent, loaded in its place, and the client shows the session's file", and firstOnPair's screen-state client now its own boot, confirmed with no dump, the boot shell's spawn and first bytes after, digests equal, no reload; the start (ReleaseFast, medium.zig, one build alternated, NOT quiet: loads 8-16): the pair's first frame best 9.5 ms against the own path's 9.9 (median 10.2 against 11.4), the client 45.0-53.8M instructions:u (the bar 56.7M), its session 17.2-17.6M beside it, the own path 53.5M bit-equal to the base's; confirmed 100 of 100 starts of a file and 100 of 100 of a shell, a window pair 17 of 17; tui core-test 863/1018 (155 skipped), shell-test 1060/1063, term 17/17, pane 183/184, kitty 45/45, behaviour-test and --replay 275/275, process-test 0 of 144 failed, as a pair (PARDES_PAIR=1) 16 of 144 failed (the base 17), both soaks diverged 0, unequal 0, checked/wrong 0, unlisted 0, corpus 22 of 22, no leak, daemon.py plain, --far, --pair, --relink, --launch, --games, --window-clients, --gui, --upgrade both ways (new->old failed once on a client's key under load, then passed twice) pass, an idle pair 0 and 0 wakeups in 2 s, gui unit-test 1656/1660 with only BaselineHarnessMismatch, the frame and perf gate against tree2 PASS (77/77 frames, corpus2x -0.008%, 121 per-operation counts within 0.1%), macOS lib (Linux host), aarch64-macos and FreeBSD build (loads 5-23)
Co-Authored-By: Claude Opus <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'dev/root.zig')
0 files changed, 0 insertions, 0 deletions
