summaryrefslogtreecommitdiff
path: root/core/File.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-20 07:33:55 -0300
committerGabriel Schneider <[email protected]>2026-11-20 14:27:36 -0300
commit5671a8275203334594b6f3b548e6a6012ef9fae6 (patch)
treeee18ce296eea19620efdca231ee0de30b66c33f9 /core/File.zig
parent90ba0ef908dd65b322676f7a0f6edc5b7b976242 (diff)
downloadpardes-5671a8275203334594b6f3b548e6a6012ef9fae6.tar.gz
pardes-5671a8275203334594b6f3b548e6a6012ef9fae6.zip
ninep: a client that joins a session with 9P work under way has the 9P state the session has: what a step reads that the requests made is the core's state like any other (P30, P35), so the walk sees it: fs leaves Pardes's and Pane's authority lists and the 9P server's own part says so in its types (fs.Namespace: the sockets, mounts, log, the request being served's flags and the rest; pane.State: the event and pty readers' queues and counts, winsize, unannounced; Open: the listener's held read and a stream's last answer; LogOpen whole), so the open records, the writes held to go in as one edit (fs.batch) and each pane's addr, limit, dot truncation, wrsel, joined, nomark, noscroll, lock, run, unmarked, tag truncation and chord are in every dump and in the digest; the digest is cheap by type: a pane's 9P state adds nothing for a pane no script has touched and its fields as one run of bytes for the rest (pane.State.digest), the namespace the opens in use and held writes by their length (Namespace.digest: a 9P body append hashed its whole batch, +0.14% on body-appends), so the frame and perf gate's 121 per-operation counts are within 0.1% of tree2 (largest client-key-down +0.054%; the plain walk of the same state cost client-key-down +0.73%); an open's union is named (Open.What) and digests what a step reads of it (its kind, a run, an event reader's flag, a pager's serial, a port's index), never the text its reader is answered with, which each process makes of its own state (walk.hash takes a tagged union's own digest as it takes a struct's); the opens are taken as far as fs.opens_len (an idle session's none; the scans that read records bound by it, openOf too, and an open lets go of what a rollback left in its record past the length); a session revived from a dump (Restore, an Upgrade, a start from one: dump.loadAndRevive; a closed pane brought back: loadPane) drops the opens and each pane's 9P state, as today, its connections gone (fs.Namespace.forget): a client's join loads alone and keeps them; not the join's dump alone: the tape's dump round trip at a replay's end wants the image to carry what the digest covers; pty.Run's answer cut at its length; the wire version 24, so the semantics word moves 64e89d6b25a84796 -> 18636a639ac075de (it did not move with the walk alone: a base client would have digested other fields than its session; test/daemon.py's WIRE with it, and its upgrade case takes a client of the other side's protocol saying `run the same pardes at both ends`, as its third terminal already did); the eleven tests of the change before pass; a join's dump (the probe, Debug): idle 63258 -> 64612 bytes, 50 opens held 63270 -> 66744; the image idle 233426 -> 237001, 50 opens 233738 -> 295089; tui core-test 867/1022 (155 skipped), shell-test 1062/1065, behaviour-test 275/275 and --replay 275/275, replicas --clients 5 diverged 0/0/0, unequal 0, unlisted stops 0, corpus 22 of 22, no leak (load 30-40, before the digests were made cheap; the whole gate on the change after)
Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/File.zig')
0 files changed, 0 insertions, 0 deletions