summaryrefslogtreecommitdiff
path: root/core/replica.zig
Commit message (Collapse)AuthorAge
...
| * | | last word: a session's last frame on a link says which of two things ↵Gabriel Schneider7 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | happened (wire `ended CODE` 0x0b and `left NAME` 0x0c, working names): a Detach typed in a client queues `left` and lets its writer end after it (Peers.detach, Peer.last), a session's end tells every client `ended` with its code before the links are let go (Peers.ended, from runtime/session.zig after the loop; refuseAll and it share the 200 ms flush); a client that typed Detach prints "pardes: detached from 'NAME', which is still running; come back with `pardes attach NAME`" and exits 0 again (the attach's regression to exit 1 and "let this client go" undone, for every client, no variable), a client whose session ended exits with the session's code quietly, a pair's client after reaping its session (EDITOR=pardes waits for the session's end); client.Ended a union (left, ended CODE); a Detach with no daemon is refused in a client too (tui.zig `detach`: the daemon checked first), since a pair with none ends with its last link; test/daemon.py: the client Detach expectations (0 and the line), a session's Exit (0, no let-go line), `pair` Exit 0 and the session reaped, `pair_rows` the rows of the design's tables 1.1 and 2.2 B (Detach said, exit 0, the session listed; a client ended by TERM with its terminal put back, by KILL and by its terminal's HUP: the session runs on; no daemon: Detach refused, the terminal closed ends the session; nothing left); docs/next-run.md and core/CHANGELOG.md say so (the CHANGELOG's `new --detach` line is the first change's); `kept` NOT built: no terminal behaviour turns on it while a hangup and a killed client are losses and Exit ends the session (see the report) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| * | | first client: a session takes a client on a socket it was started with ↵Gabriel Schneider8 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | BEFORE its first effects, by the join a later client gets (Peers.join, now pub, called from runtime/session.zig between the frontend's open and the first effects when Options.pair is set), and a client's first join is made on its end of the pair with no hello (replica.join reads Options.pair; joinOn's session name optional), so a first client has every terminal from its first byte (P32); two tests through the replica's surface, a session core with a boot shell and real Peers threads over a socket pair, the first effects after the join: screen state (replica.join end to end) and bytes (loaded as the soak's bytes clients): the spawn taped, the shell's first bytes in the client's terminal, the digests equal at the client's check, and under bytes no reload of any byte (the session's one reload at the join is of the boot shell's emulator before anything was written, the client's none; a client after the bytes: every side reloads); core/root.zig's machine-lines count for replica.zig 70 -> 74 (the tests' sockets) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | | | integration: a client that joins during a 9P pty/run replays it as its ↵Gabriel Schneider8 days
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | session does, and a far client's Del question is instant, on the build's second pass: pardes-faults-3 (a 9P open's handle is the session's recorded answer; a run reads its terminal's prompt marks through the tape's prompt site; a rejoin that lands as the session ends says so; Del sets question_asked and the host's pump gives it its time: the step reads no clock, so the bytes soak's one stop off may_wait, now, is gone) and pardes-merge32, merged without a textual conflict; the coordinator's gate in the ledger (reorg/merge33) Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| * | | | builtins: a far client's Del with a pane above and below is instant: the ↵Gabriel Schneider8 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | step that asks which way the space goes reads no clock (it asked the host's `now`, an answering entry a speculation stops at: the bytes soak's one stop off may_wait, a client's key d), its question's time is `Pane.question_asked` until the next advance, which counts the delay from its own time (Core.advance, the host's clock in its pump, right after the key's step; a client has the session's advance in its unit), so the question still shows 400 ms after it was asked in an idle session whose core time is seconds old; not a guessed clock: the core's clock is its host's (SDL's ticks on the window) where a guess is the session's CLOCK_MONOTONIC, so a guessed due time would be in another base than the clock it is compared with; nextWake skips a question not timed yet; a host with no clock (macOS's) never advances, and its question waited for ever before as now; test: a far client's Del with panes above and below applies both keys at once (failed on the base: 1 applied of 2, stopped at `d`), confirms with nothing mispredicted, and after the session's next pump its question's time is the session's clock plus the delay on both; the keys test of the delay times it with an advance; no layout moves (the field keeps its type), the semantics word stays 92963bab2e4436fb; exec.clockNow keeps its two REPL callers (a paste's Enter: a pty write that stops a far client anyway, and the session's own output steps); tui core-test 857/1010 (153 skipped), shell-test 1050/1053 (load 10-15) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| * | | | ninep: a client attached while a script's pty/run runs in a shell replays it ↵Gabriel Schneider8 days
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | as its session does: the open's handle is the session's 9P server's answer (tape.authority), not the client's first free open record, which a client joined since (holding none of the opens made before its join) chose otherwise, so its write named no record and its run never went (the base, the attach agent's probe: 6 of 6 runs a client diverged, "the core called prompt where the tape has a done"); and a run's step reads the shell's marks through the tape's prompt site (pty.marksOf, as the greeting and the run's answer did), not the emulator here, which on a client of screen-state terminals is the last delta's and comes a frame after the unit that replays the output (with the handle alone 3 of 6 still diverged: sent_command's count and the busy check read marks behind the session's); Pane.noteCommand takes the count from its caller; a client whose rejoin lands as its session ends goes as at a hang-up, in the same words ("let this client go"), never "could not join again: the session hung up before the dump was whole" (replica.ended: hung up, nothing answers, no such session); tests: a client joined from a dump with a listing open held across the join takes a run as the session does (failed on the base: its digest), the same with screen-state terminals and their deltas after each unit (failed with the handle fix alone: "the core did not make the host call the tape has, in output"), and the rejoin test says a session gone and one hung up mid-dump are its end; the tape's results list Term.Prompt, so the semantics word moves: 7a610621b2f37456 -> 92963bab2e4436fb; probe (exitclient.py, 6 runs): 0 of 6 diverge, 0 of 3 with a digest every unit (PARDES_REPLICA_TRACE); a pty/data-only variant diverged 0 of 2 on this build too; tui core-test 856/1009 (153 skipped: the two new tests need a shell), shell-test 1049/1052 (load 15-20) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | | | integration: the build's second pass on the handle and the devices once: ↵Gabriel Schneider8 days
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | pardes-build-pass2 (pardes-isolate and the tree-sitter=disabled tier deleted; one option, grammars = none | minimal | full; build.zig with the consumer's lines as its head comment; test/lib -> test/consumer; the manual's library section) and pardes-merge31, merged without a textual conflict; one line follows a deletion: dev/file_watch.zig's end-to-end test of a session's watches (written since on the base) guarded on fs.platform_has_fs, which the first of these changes deleted: the guard reads as the file's other tests' (comptime !supported); tui core-test 857/1008 (151 skipped), shell-test 1048/1051, the window builds; the coordinator's gate in the ledger (reorg/merge32) Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| * | | build: the `-Dtree-sitter=disabled` tier is deleted (pardes-build-2 item 2; ↵Gabriel Schneider8 days
| | |/ | |/| | | | | | | | | | | | | | | | P31's Q5, decided on the evidence 2026-11-20): a pardes with no tree-sitter at all, whose syntax.zig stubbed `ts` with four opaque types and answered every call empty; it did not compile on the base (`zig build install -Dplatform=tui -Dtree-sitter=disabled`: core/indent.zig:48 `struct 'syntax.ts__struct_3541' has no member named 'Tree'`, since indent.zig reads the parse tree the stub never had) and nobody set it; out with it: the `disabled` value of `TreeSitterGrammars`, build/core.zig's `treeSitter` made always (its module and its queries no longer optional, so `TreeSitter.wire` and `core.module` add them plainly), the stub `ts` and `ts_queries`, `syntax.enabled` and every branch that was for it: 32 guard lines and 16 terms of a condition in core/syntax.zig (its `start` and `stop` unwrapped), whole test guards in core/draw.zig, Stream.zig, File.zig, Query.zig, Core.zig (2), mouse.zig, replica.zig (2), test/output.zig (7), test/panes.zig (11) and test/behaviour/{panes,settings}.zig, a term in Stream.zig's two worker tests, `TreeContext.enabled` (builtins.zig) and the config table's condition on it (config.zig), test/output.zig's two conditions on the grammars; abi/wire.zig hashes the grammar set as the same four words (`true true` for highlighting and the Zig grammar, which every set has now), so `pardes version`'s semantics line did not move: 8b6382fddba7b382 on tui, gui, the bare build's two, both statics and FreeBSD, 0520895ac88d25ad with -Dtree-sitter=minimal, as at item 1; the manual's option table and the changelog say it; build.zig and build/ 2,981 -> 2,974 lines; every shape configures (11) and builds (tui, gui, bare, static musl and gui, FreeBSD, -Dtree-sitter=minimal, the macOS library for Linux and aarch64-macos); tui core-test 856/1006 (150 skipped), shell-test 1046/1049, pane-test 183/184, behaviour-test 275/275 and -- --replay 275/275, term-test 17/17, kitty-test 45/45, addon-test 5/5, lib-test, hxlib 538 cases 0 mismatches, process-test 0 of 144 failed (diffstack failed once and passed on the runner's own retry), gui unit-test 1643/1647 (the perf check's BaselineHarnessMismatch, the base's); load 5-26 on 16 cores Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | | integration: the core's calls out to the host go through the tape's handle, ↵Gabriel Schneider8 days
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | on the devices once and the attach that is always a client: pardes-handle-6 (6a, 6b, 6c, 8a: p.tape.host(p, .name, .{ args }) derived from the Host table; Wrap, hostOf and wrap deleted; no line of core/ outside the tape names the host's table, held by root.zig's scan; the tape's bytes unmoved) and pardes-merge30, merged without a textual conflict; tui core-test 857/1008 (151 skipped), shell-test 1048/1051, the window builds; the coordinator's gate in the ledger (reorg/merge31) Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| * | tape: the wrappers deleted, step 6c (reports/pardes-handle-69-design.md): a ↵Gabriel Schneider8 days
| | | | | | | | | | | | | | | | | | | | | core's host is always its own (a replica's none), the tape only says which functions it has when the core holds another than the last said (noteHost, today's comparison, so a mask lands where it did) and a replica answers by that word (the bool replica, set by its first replay or its join; Tape.has), so Wrap's arity table, hostOf, wrap, the tape's vtable, resync's and Peers.stop's unwrap and apply's three hostOf go; the 9 presence questions are p.tape.has(p, .search); keeps_stopping and forTheView are lists of the table's names, a renamed field no longer compiling there; root.zig's machine scan names host.vtable and host.ctx, which only tape.zig's noteHost line names now (40 lines of core/ named the table at the base); the tape's bytes do not move (semantics 32640d4a722b811c unmoved, cross_replay both ways) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | | term: a kitty image's medium (a file, a temporary file, shared memory) is ↵Gabriel Schneider8 days
| |/ |/| | | | | | | | | | | the session's read and a recorded answer on the tape, so every replica's emulator is handed the bytes the session read, or its failure, and never reads its own machine: ghostty's loader gets the bytes through `LoadingImage.read_medium` (an Edit in build/patches.zig, ghostty's own read handed to it, the report in docs/ghostty-kitty-medium.md), which the terminal module sets to the core's `Term.media`, a `tape.valueIn(.medium, ...)` site (a new Site; `valueIn` is `value` with the answer's slices in the loader's allocator, no yield inside a feed), so a read crosses to a client as a file read does (inline under 1 MiB, by hash at or over it), a temporary file is deleted and shared memory unlinked once, on the session, and the program is answered by the session alone; a replica no longer loads by direct data only: `Term.direct`, `State.direct` and the `direct` entry go (`media` in their place); under screen state the read stays the authority's (a screen-state replica feeds no emulator); FIRST the test through the replica's surface (a session and a bytes replica, four images shown, by a file, a temporary file, shared memory and a missing file): on the base the digests parted (expected 8810391091473565423, found 2236913079067993401: the replica's loader said "unsupported medium" and did not move its cursor), now they agree, the terminals dump the same bytes, the temporary file and the object are gone and the replica read nothing (ghostty's FileNotFound warned once); tui term-test 17/17, kitty-test 45/45, core-test 856/1007 (151 skipped), shell-test 1043/1046, unit-test -Dtest-filter=bytes: 23/23 (the perf check's BaselineHarnessMismatch, as on the base) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| |
| \
| \
| \
*---. \ integration: a terminal joinable and exactly reloadable with the engine's ↵Gabriel Schneider8 days
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | bytes kind made right, a client's kept list let go for free at its bound, the build's options said once, and ghostty's page and zstbi's resize the same on every machine, on the far client's fixes: pardes-term-1 (the terminal by the pty's bytes, steps 1 and 2), pardes-perf-fix, pardes-build-options, pardes-patches and pardes-merge25, merged without a textual conflict; tui core-test 856/1006 (150 skipped), shell-test 1042/1045, term-test 17/17 before the patches joined; the coordinator's gate in the ledger (reorg/merge26) Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| | | * replica: the bytes kind of replica made right and joinable (P29, P32; the ↵Gabriel Schneider8 days
| | |/ | |/| | | | | | | | | | | | | | | | brief's step 2: 2a, 2b, 2c and 2d in one change): the one rule in place of two, the faults shown first (a session's output kept over a copy held ahead was fed again by a rollback: the digests apart; the pages an emulator gained while a copy was held were the epoch's and freed with it: a crash in PageList.increaseCapacity in the rollback's replay): every replica's emulators on the C heap (panes.emulatorGpa), Term.writes counting the writes into emulators, a unit whose replay wrote one never kept over a copy taken ahead, never taken as moving nothing (tape.feedsTerminal), a client's input that owed a reflow always replayed when confirmed; a speculation moves a terminal's view under bytes as under screen state; tape.unit_max (1 MiB) and Tape.cut, which the session's Peers sets, so a pump's reads are cut into units under it; the join: whole terminals in a joiner's dump, every replica the session included reloading each live terminal in the step that opens or reopens a view (panes.reloadTerminals), the session's hash taped (Site.reload) and compared, kitty records left out of it, the cell pixels set first as a feed does; .positions and .prompt compared with the replica's own emulator on replay; replicas load kitty images by direct data only (Term.direct); Peers.bytes for the soak; six tests (core/replica.zig, bytes:); tui core-test 848/997 (149 skipped), shell-test 1033/1036, pane-test 183/184, term-test 17/17, kitty-test 45/45, behaviour-test 275/275 and --replay 0, process-test 2 of 144 (the base's), image- and kitty-harness pass, unit-test bytes: 22/22; gui unit-test 1633/1637 (the perf check's BaselineHarnessMismatch); the soaks in klrvlrly's Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| | * replica: a client's kept list that reaches its bound (rebase_after, 32 ↵Gabriel Schneider8 days
| | | | | | | | | | | | | | | | | | | | | units) while a key of its own is applied on top is let go free at the next unit that leaves nothing applied (the key's own unit, next in the stream), not put back with the 32 units replayed and the key applied again; with inputs on top all the while it is put back at twice the bound, so a rollback still replays a bounded list: before the session sends its pump's unit (it moved nothing, kept as neutral) ahead of every client key, so two units are kept a key and whether the 32nd is the pump's (the whole replay, about 50 to 100M instructions on the 3.2 MB file) or the key's own (free) is the parity the client's first units set, which made a near client's `edit` key 14.3 or 16.7 to 18.8M a block of 20 and `key-down` 3.8 or 8.8M by chance of the run, in either order of the send (`klmtkkpz` did not cause it: base against base with the order turned back, 6 runs each, edit medians 17.05 and 17.06M, 4 of 12 blocks over 1.05 in both); the kit (pardes-perf-sendfirst), base against this, 6 runs alternated, 12 blocks each, ReleaseFast, load 16 to 47: client edit 16.88M median (14.28 to 18.78, 5 blocks over 1.05) to 14.28M (14.26 to 14.30, none), key-down 3.83M (3.81 to 8.78, 2 over) to 3.84M (3.81 to 3.99, none), type 11.24M (11.00 to 12.88, 1 over) to 11.15M (11.01 to 11.29, none), rebases 1 to 5 a run to 0, the own path and the session unchanged; a test through the replica's surface (hand-ordered: a pump unit then the key's unit, 31 keys) fails before (one whole replay) and passes; tui core-test 849/992 (143 skipped), shell-test 1028/1031, pane-test 183/184, term-test 15/15, kitty-test 45/45, behaviour-test 275/275 and --replay 275/275 Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| | * replica: a client's stats line (PARDES_REPLICA_STATS) prints its rebases, ↵Gabriel Schneider8 days
| |/ | | | | | | | | | | | | copies and checks, and `rebases` counts only a rebase that puts the copy back under inputs applied on top (the kept units replayed, the inputs applied again), not the free let-go with nothing applied: the three counters that name a heavy block of the client path were kept and never printed (pardes-perf-plan section 1 repair 3); no behaviour changes Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | far client: PARDES_NOTIME is read by no step, said where it is read, and a ↵Gabriel Schneider8 days
| | | | | | | | | | | | | | test that a client whose environment differs replays the session's stamped text (no fix: the fault does not happen on this tree): `Messages.Message.noTime` is called by `clockText` alone, whose callers are `timeOfDay`, called by `stamp` alone, which only hosts call (dev/file_watch, dev/host_io's save and dumped themes, tui's, gui's and macos's lsp status and reloads: between steps, or inside the host's own entry during one, where the text then enters the tape as the setMessage the host makes, a nested input), and tape.zig's `guessed` for a `[8]u8` clock read, a branch no site instantiates (the clock sites return i64: the message's monotonic ms); dev/lsp's `hideTime` is a host's too; so the knob needs no option handed in: root.zig's machine_lines reason for Messages.zig, which said a step reads it, and noTime's doc say what is so; found dead, not changed: the `[8]u8` guess in tape.zig's `guessed` and with it `Guess.gmtoff`, the replica's `gmtoff()` and the welcome's `gmtoff` (abi/wire.zig), there for a message time of day guessed in a speculation, which no step reads any more; the test `a far client's replay of a message its session's host stamped takes the session's text, whatever its own PARDES_NOTIME says` (end of core/replica.zig: the session's host stamps a yank's message with PARDES_NOTIME set, the client replays it with it unset) passes on the base; gates on the seven together (the stack's top, load 18 to 50 beside them): tui core-test 855/999 (144 skipped), shell-test 1035/1038, pane-test 183/184, term-test 15/15, kitty-test 45/45, behaviour-test 275/275 and --replay 20 seeds 0 failures, process-test 3 of 144 (lspcomplete and lspcompletemoved, the base's, and headersweep-restored, which passes alone), gui unit-test 1633/1637 with the base's BaselineHarnessMismatch; replicas --clients 5 and --seeds 8: diverged 0, unequal 0, deltas wrong 0, quiet checks differed 0, unlisted stops 0, corpus 22 of 22, no leak report; the walk over every word and key passes; frame and perf gate against tree1 (farfaults): frames 77/77 byte-identical in Debug, unit-test 1633/1637, perfab corpus2x -0.087% (noise 0.092%, bar 0.4%, pictures identical), perfops 97 counts within 0.1% (largest +0.0329%) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | far client: a step that asks the session's host for a search goes on at ↵Gabriel Schneider8 days
| | | | | | | | | | | | | | once, and a host that runs one on its loop hands its rows in as inputs: `search` was on tape.zig's keeps_stopping because a host with no worker (tui's and gui's `search` before their threads, and Stream.start when no worker can be had) runs the search in its entry and writes the rows into the core outside any record (Stream.runHere's `receive`); but then no client had those rows, stopped or not (a replay answers the entry from the tape and runs no host), so the stop protected nothing and cost every `/` in a file (its parse asked of the session's host) and every query whose rows ask colours a round trip; whether the session has the entry at all a client already knows (the host's mask, told at the join: a client's tape offers only the session's entries), and with no entry the search runs in the step under `tape.site(.search)`, which still stops; the same host also let go a paint (`rows_paint`, digested) or a parse it had no worker for by writing the core in its entry; now `runHere` takes `in_call` (comptime): from a host's entry each batch goes in as `p.update(.{ .search = b })`, a nested input the tape records and every replica replays, as a worker's batches are, and a paint it cannot run is let go by an input too (a worker's answer of nothing); Stream.start, when no worker can be had, does the same for a paint, a parse (an answer that found none) and a search (tui's and gui's entries and Stream.start pass true; Stream.step and Effect's perform, in a step, false); `search` leaves keeps_stopping, and may_wait's row `Search *` at `search` goes (the walk would call it stale); the test `a far client's step that asks for a search goes on at once, and a session whose host searches on its loop gives every client its rows` (end of core/replica.zig: a `/` in a file, then a Grep the session's loop runs at its ticks) failed on the base with `expected 0, found 1` (stopped), and with the host writing as before (`runHere(.., false)` in its entry) the client's digest differed after the `/` (the paint the host let go) and never had the Grep's rows; it passes; a user could hit the second only with a window or tty session whose worker could not be had (std.Io's concurrency refused) while a client was attached; gates on the seven together (the stack's top, load 18 to 50 beside them): tui core-test 855/999 (144 skipped), shell-test 1035/1038, pane-test 183/184, term-test 15/15, kitty-test 45/45, behaviour-test 275/275 and --replay 20 seeds 0 failures, process-test 3 of 144 (lspcomplete and lspcompletemoved, the base's, and headersweep-restored, which passes alone), gui unit-test 1633/1637 with the base's BaselineHarnessMismatch; replicas --clients 5 and --seeds 8: diverged 0, unequal 0, deltas wrong 0, quiet checks differed 0, unlisted stops 0, corpus 22 of 22, no leak report; the walk over every word and key passes; frame and perf gate against tree1 (farfaults): frames 77/77 byte-identical in Debug, unit-test 1633/1637, perfab corpus2x -0.087% (noise 0.092%, bar 0.4%, pictures identical), perfops 97 counts within 0.1% (largest +0.0329%) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | far client: a text's declarations a worker parsed are a dump's (its revision ↵Gabriel Schneider8 days
| | | | | | | | | | | | | | dumped and digested, the declarations parsed again from the text at the load), and a query's rows read no others, so a client joined from a dump makes a `/` query's rows as its session does: a `/` (or Symbols) in a file groups its rows under the declarations they are in once a parse of the text exists (Query.ownerDecls), the pane's `context` (sticky headers', a worker's answer, sync's) or the locations cache's (a Diff's); both were kept out of the dump as made again from the text, which a worker's answer is not (an input a client joined since never saw), so a client joined after the session's worker parsed a file found none, and its replay of the session's next row in that query asked for a parse the session never asked: `diverged: the core called search where the tape has a host` (a real session's: tty and window run parses on workers; a user with a far client who had typed a `/` in a file before it joined, then any key in that query, saw the client join again); now `File.State.context` leaves File.State's `.derived`: `ContextCache.revision` is dumped and digested, its `declarations` derived and its `allocator` local (root.zig's kept_out says why), and a load (dump.zig's loadKnowing and loadImage) parses the declarations again from the text, with the syntax allocator, where the dumped revision is the text's (`ContextCache.reload`): never loaded with the core's allocator (dump.zig's test of that, which pinned that the context was not restored at all, now pins it parsed again; a first try that dumped the declarations themselves crashed a Restore's rollback in `owned cwd restore ...`), and `ownerDecls` takes the pane's context alone (the cache's loop and the never-used `small` parse here deleted: a Diff's parse no longer groups a query's rows, the worker's does); the test `a client joined from a dump makes a `/` query's rows as the session does, though only the session has the owner's declarations from a worker's parse` (end of core/replica.zig, a host whose parses run on a worker as a tty's, their batches the session's inputs) failed on the base with that divergence and passes; Places' rail ticks: by reading `gen` moves wherever the hits do (clear, feed, shift, restart, a search's new hits, the current one), and the test `a client joined from a dump lands a click on a rail's tick as the session does, the session's ticks drawn before the places changed` (the session draws its ticks, the client changes the places and clicks every row of the rail) passes on the base; it shows a fair misprediction of the key that changed the places, 3 runs in 4: a step's places are a frame's time of search (`tape.over`), and the session's drawn caches find more in it than a cold client; gates on the seven together (the stack's top, load 18 to 50 beside them): tui core-test 855/999 (144 skipped), shell-test 1035/1038, pane-test 183/184, term-test 15/15, kitty-test 45/45, behaviour-test 275/275 and --replay 20 seeds 0 failures, process-test 3 of 144 (lspcomplete and lspcompletemoved, the base's, and headersweep-restored, which passes alone), gui unit-test 1633/1637 with the base's BaselineHarnessMismatch; replicas --clients 5 and --seeds 8: diverged 0, unequal 0, deltas wrong 0, quiet checks differed 0, unlisted stops 0, corpus 22 of 22, no leak report; the walk over every word and key passes; frame and perf gate against tree1 (farfaults): frames 77/77 byte-identical in Debug, unit-test 1633/1637, perfab corpus2x -0.087% (noise 0.092%, bar 0.4%, pictures identical), perfops 97 counts within 0.1% (largest +0.0329%) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | far client: a test that a click into a shell whose output queue is backed up ↵Gabriel Schneider8 days
| | | | | | | | | | | | | | cannot leave a client unlike its session, and why (no fix: the fault does not happen): Core.reportFocus skips the focus write in a client's speculation, and on the session the write parks behind what is already parked for the pane (`pending_write`, digested), so a client confirmed on the fast path would lack those bytes; but bytes are parked between steps only by a step that does not drain the queue (a 9P write, serveFs, past the 4096 effects the ring holds: every pump drains it whole), that step reaches the client as the session's unit, so the client holds the same queue, and its own step settles as the session's does (replica.speculate: update, then step, which drains it): the parked write into the shell stops it at `pty_write`, and it waits for the session's step, focus report and all; the test `a far client's click into a shell whose queue is backed up: ...` (end of core/replica.zig, shell-test: a 9P write of 1 MiB + 100 bytes into the shell, then the client's click) passes on the base: the click stops at pty_write alone, the program gets the parked bytes then ESC [ I, mispredicted 0, the client's digest the session's; gates on the seven together (the stack's top, load 18 to 50 beside them): tui core-test 855/999 (144 skipped), shell-test 1035/1038, pane-test 183/184, term-test 15/15, kitty-test 45/45, behaviour-test 275/275 and --replay 20 seeds 0 failures, process-test 3 of 144 (lspcomplete and lspcompletemoved, the base's, and headersweep-restored, which passes alone), gui unit-test 1633/1637 with the base's BaselineHarnessMismatch; replicas --clients 5 and --seeds 8: diverged 0, unequal 0, deltas wrong 0, quiet checks differed 0, unlisted stops 0, corpus 22 of 22, no leak report; the walk over every word and key passes; frame and perf gate against tree1 (farfaults): frames 77/77 byte-identical in Debug, unit-test 1633/1637, perfab corpus2x -0.087% (noise 0.092%, bar 0.4%, pictures identical), perfops 97 counts within 0.1% (largest +0.0329%) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | Kind: a draw's token is this process's count, which no rollback takes back, ↵Gabriel Schneider8 days
| | | | | | | | | | | | | | never its slot's: the token api.draw gives was the slot's `draws` (core/Kind.zig, the `.draw` entry of the api), which the rollback copy holds with the slot, so a frame drawn under a speculation that is rolled back asked token T, the copy put the count back, and the next frame's draw, of the state the replay came to, was given T again; both answers come to the kind's job_done as T, in the order its workers finish (`deliver` matches a job by core, pane, serial, gen and ops, not by token), and a kind with one draw outstanding takes the first and drops the second: it showed the discarded state's picture while asking nothing more, until its state moved again; the count is now `drawn`, beside `ready` (this process's draws), on root.zig's allowed_vars with why, and the slot's field and its kept_out entry are gone; the test `a far client's frame drawn under a speculation that rolls back asks a picture whose token the next draw is never given again: ...` (end of core/replica.zig: a plain kind drawing its count from its paint, a frontend's workers held so the discarded picture lands first) failed on the base with `expected 3, found 1` (the picture of 1 shown, its count 3) and passes; a user could not have hit it with the kinds in the tree (image draws in its open, from the file's bytes, the same picture whichever answer comes, and ignores the token; the pdf kind is not plain, so a client runs none of its code), only with a plain kind that draws from its paint and keeps its last token; gates on the seven together (the stack's top, load 18 to 50 beside them): tui core-test 855/999 (144 skipped), shell-test 1035/1038, pane-test 183/184, term-test 15/15, kitty-test 45/45, behaviour-test 275/275 and --replay 20 seeds 0 failures, process-test 3 of 144 (lspcomplete and lspcompletemoved, the base's, and headersweep-restored, which passes alone), gui unit-test 1633/1637 with the base's BaselineHarnessMismatch; replicas --clients 5 and --seeds 8: diverged 0, unequal 0, deltas wrong 0, quiet checks differed 0, unlisted stops 0, corpus 22 of 22, no leak report; the walk over every word and key passes; frame and perf gate against tree1 (farfaults): frames 77/77 byte-identical in Debug, unit-test 1633/1637, perfab corpus2x -0.087% (noise 0.092%, bar 0.4%, pictures identical), perfops 97 counts within 0.1% (largest +0.0329%) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | mouse: a drag or release in a kind's pane it grabbed, the pane since too ↵Gabriel Schneider8 days
| | | | | | | | | | | | | | short (or narrow) for a cell of body, is told its body's edge instead of tripping std.math.clamp's assertion: a press on a kind's body grabs it (`kind_grab`), and the drag and release after it are the kind's wherever they land, so `kindMouse` (core/mouse.zig) clamped the pointer into the body's range, which a step between the press and the drag (a resize, a pane put above it) can leave empty: `clamp(m.row, top, r.y + r.h -| 1)` with `top > r.y + r.h - 1` (the soak's one `lo <= hi` assertion, in a client's speculation at rtt 207: its typists press at random, resize the window to 16 rows and open panes; the same in the session, which a user could hit with a mouse kind's pane (a PDF) and a resize while a button is held, in Debug a panic, in ReleaseFast a wrong row); now `@min(m.row -| top, (r.y + r.h) -| top -| 1)` and the same for the column: equal to the clamp where the range has a cell, 0 where it has none; the test `a far client's drag in a kind's pane it grabbed, the pane since too short for a row of body: ...` (end of core/replica.zig, with a plain kind that takes the mouse and `runsHere`, its code in the client as a client with its library runs it) aborted on the base at core/mouse.zig's clamp (the press, a resize to 4 rows leaving the pane its tag alone, the drag) and passes: applied at once, confirmed, the client's digest the session's; gates on the seven together (the stack's top, load 18 to 50 beside them): tui core-test 855/999 (144 skipped), shell-test 1035/1038, pane-test 183/184, term-test 15/15, kitty-test 45/45, behaviour-test 275/275 and --replay 20 seeds 0 failures, process-test 3 of 144 (lspcomplete and lspcompletemoved, the base's, and headersweep-restored, which passes alone), gui unit-test 1633/1637 with the base's BaselineHarnessMismatch; replicas --clients 5 and --seeds 8: diverged 0, unequal 0, deltas wrong 0, quiet checks differed 0, unlisted stops 0, corpus 22 of 22, no leak report; the walk over every word and key passes; frame and perf gate against tree1 (farfaults): frames 77/77 byte-identical in Debug, unit-test 1633/1637, perfab corpus2x -0.087% (noise 0.092%, bar 0.4%, pictures identical), perfops 97 counts within 0.1% (largest +0.0329%) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | far client: a window's keyboard found again no longer asks the session's ↵Gabriel Schneider8 days
|/ | | | | | | host whether a newer build is installed: the core's focus step called the Host's `newer_build` (core/Core.zig, the `.focus` branch of updateInner), an entry that answers, so a far client's refocus stopped and its first keys after it waited a round trip, for a question about the SESSION's binary that the client's window has nothing to do with (and a client's own binary nobody looked at: tui's entry said false for a client); each process's build is now its own frontend's to look at, at its own focus-in, between steps: the tty session calls `upgrade.noticeNewer` as the window session already did (gui.zig), its line an input (`setMessage`, taped) that its clients replay; a client's refocus asks no one; the entry `newer_build` is gone from dev/Host.zig and tui.zig, and its row "focus lost and found" from may_wait (the walk would now call it stale); the test `a far client's window found again is instant: ...` (end of core/replica.zig) failed on the base with `expected 1, found 0` (applied: the refocus stopped) and passes; the walk over every word and key passes in core-test and shell-test; gates on the seven together (the stack's top, load 18 to 50 beside them): tui core-test 855/999 (144 skipped), shell-test 1035/1038, pane-test 183/184, term-test 15/15, kitty-test 45/45, behaviour-test 275/275 and --replay 20 seeds 0 failures, process-test 3 of 144 (lspcomplete and lspcompletemoved, the base's, and headersweep-restored, which passes alone), gui unit-test 1633/1637 with the base's BaselineHarnessMismatch; replicas --clients 5 and --seeds 8: diverged 0, unequal 0, deltas wrong 0, quiet checks differed 0, unlisted stops 0, corpus 22 of 22, no leak report; the walk over every word and key passes; frame and perf gate against tree1 (farfaults): frames 77/77 byte-identical in Debug, unit-test 1633/1637, perfab corpus2x -0.087% (noise 0.092%, bar 0.4%, pictures identical), perfops 97 counts within 0.1% (largest +0.0329%) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* integration: a pane's and a view's slot as types, with the ↵Gabriel Schneider8 days
|\ | | | | | | | | | | | | regular-expression fixes and the fixes the real loops asked for: pardes-ids (Pane.Id and View.Id through the entries, the events, the effects, the Host table and the device messages) and pardes-merge21, merged without a textual conflict; one call site written since on the old type follows (core/draw.zig: the twin test's file_changed event, .pane = .at(0)); tui core-test 848/991 (143 skipped), shell-test 1027/1030, the window builds; gates in the coordinator's ledger Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| * core, dev: what carries a slot across the core's edge carries its type (P21, ↵Gabriel Schneider8 days
| | | | | | | | | | | | | | pardes-ids change 3): `Pane.Id` in Event's six variants that carry a pane (output, eof, exited, file_changed, addon, job), in the fourteen effects that do (spawn, write, resize_pty, signal_pty, close_pty, start, save_file, save_text, lsp, watch, dump_themes, detach, addon, job), in the fourteen Host functions that take one (dev/Host.zig: adopt, upgrade, spawn, pty_write, pty_resize, pty_signal, close_pty, tty_taken, fg_name, kill_job, write_file, watch_file, dump_themes, job; tape.zig's Wrap follows with no edit), in the device messages that carry one into the core (the inbox's output and eof and the five reader functions that make them, dev/Lsp.zig's Request, host_io's Adoption and Adoptions.take, which hold what adoptShell answered); `View.Id` in abi/wire.zig's welcome.view (its bytes on the wire unchanged: one byte, hand-encoded, `.at(takeByte())`/`writeByte(view.index())`); every producer converts at its own line (`.pane = .at(id)`, a script that refuses any path outside the workspace, `fields.py`), every consumer where it indexes or compares (`o.pane.index()`), every Host implementer at its own first line (`fn spawn(ctx, id: pardes.Pane.Id, ..) { const pane = id.index(); ..}`: the terminal's 14, the window's 14, the Mac's 10, and the tests' hosts), and an id that went integer and back is passed through whole (`s.core.readerFailed(e.pane, err)`); the compiler caught no pane's slot passed as a view's or the reverse, only integers meeting the type; kept integers on purpose: KindJob.pane (core/Kind.zig, another agent's, reads it four times; converted at KindJob's and Effect's lines), the Watch table (file_watch: its last slot is the theme's, no pane), the hello's view and the replica's Peer/Joined/Replica views (core/replica.zig, another agent's), the C ABI's `pardes_watch_changed(uint8_t pane)` (abi/pardes.h unchanged; runtime/macos.zig converts at its Host functions); in files another agent is in, each conversion on the line that was there: core/Kind.zig 2 lines, core/Addon.zig 4, core/replica.zig 31 (the welcome's view, 3 test hosts, test literals), test/replicas.zig 12 (4 host functions with their first lines, 1 signature, the welcome's view, 5 literals); the tape's shape moves (Event is update's input), so the semantics word moves, c47ecf638b3f4b9f -> 38b5ae573b965550; test/perf.zig follows on 6 lines its Event and effect literals forced, so its harness id moves, be7cc504010471bc -> 1ed95030eb768eae (unit-test's perf check was BaselineHarnessMismatch already); 607 lines added, 562 deleted in 48 files. Gate (load 4 to 8): tui core-test 841/984 (143 skipped), shell-test 1020/1023, term-test 15/15, pane-test 183/184, kitty-test 45/45, behaviour-test 275/275 and --replay 20 seeds of 70 steps, 0 failures, process-test lspcomplete and lspcompletemoved (the base's; hscroll failed once and passed on the runner's retry), gui unit-test 1618/1622 (BaselineHarnessMismatch, the base's); replicas --clients 5 (TMPDIR /tmp/claude-1000/ids): diverged 0, unequal 0 at rtt 30, 80, 207, deltas checked/wrong 1811/0, 1838/0, 1660/0, quiet checks 567/0, 650/0, 655/0, stops not on may_wait 0 (corpus through a client fails at step 21 as on the base with that TMPDIR); daemon.py plain, --far, --games, --window-clients, --upgrade both ways against pardes-tree's base prefix pass (the semantics words differ: the upgrade carries the session by its dump); test/cross_replay.py (tui records, gui replays): 27 digests agree in each of three replicas; rollback-bench runs; the macOS library for Linux and aarch64-macos and the FreeBSD cross-build build; frames (gpu/ids-3 against tree1) 77/77 byte-identical in Debug, unit-test 1618/1622 there, perfab corpus2x -0.021% (session noise 0.036%, threshold 0.4%), pictures identical in all 10 runs, perfops 97 counts within 0.1% (largest image-frame on longline +0.0231%), key-down on medium 10,040,108 -> 10,039,990 an operation (-0.0012%), render on medium 11,455,765 -> 11,455,683 (-0.0007%), terminal on all +0.0030% Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| * core: the entries that take or answer a slot take and answer its type (P21, ↵Gabriel Schneider8 days
| | | | | | | | | | | | | | pardes-ids change 2): a pane's slot is `Pane.Id` in the twelve entries that took it, six as `usize` (setCwd, acknowledgeShell, setMessage, setStatus, reportError, noteLateFailure) and six as `u8` (readerFailed, shellFailed, restartFailed, saveFailed, reloadWatchedFile, File.deleted), and in what adoptShell answers (`?Pane.Id`); a view's slot is `View.Id` in closeView, leaveView, awayView, rejoinView and the hand-written toView (its `to_view` variant is `Pardes.View.Id` now, and its replay arm unchanged) and in what openView answers (`?View.Id`); the tape's other variants follow their inners' types with no edit (`Args`); each inner converts where its body indexes (`id.index()`), passes the id itself to another entry, and the core's own code stays integers; every caller converts at its own line, `p.reportError(.at(id), ..)` (the decl literal of the parameter's type), 514 calls in 56 files written by a script that refuses any path outside the workspace (`.scratch/sketch/reorg/pardes-ids/wrap.py`), 46 `.index()`; nothing the compiler caught was a pane's slot passed as a view's or the reverse: what it caught were a script's wrong guesses (Editor.reportError(err) and macos.zig's own reloadWatchedFile, same names, undone) and the integers a view's id met (views.zig's tests, replica.zig's Authority and Peers.join, host_io's Adoption); in files another agent is in, each conversion on the line that was there: core/Kind.zig 5 lines, core/Addon.zig 4, core/replica.zig 23 (Authority.openView and join, closeView/toView/awayView/rejoinView/leaveView calls, Peers.join's `openView`, tests), test/replicas.zig 1; the tape's records are smaller (a `usize` is a byte in six inputs) and its shape moves, so the semantics word moves, 313a99190b93a8c5 -> c47ecf638b3f4b9f; test/perf.zig untouched (its harness id does not move); the Mac: runtime/macos.zig 16 call lines, abi/pardes.h unchanged; 581 lines changed in 56 files, no line added. Gate (load 4 to 28: a drat build and other agents' gates beside): tui core-test 841/984 (143 skipped), shell-test 1020/1023, term-test 15/15, pane-test 183/184, kitty-test 45/45, behaviour-test 275/275 and --replay 20 seeds of 70 steps, 0 failures, process-test lspcomplete and lspcompletemoved (the base's), gui unit-test 1618/1622 (BaselineHarnessMismatch, the base's); replicas --clients 5 (TMPDIR /tmp/claude-1000/ids, alternated with the base twice, both pass both times): diverged 0, unequal 0 at rtt 30, 80, 207, deltas checked/wrong 1811/0, 1838/0, 1715/0, quiet checks 567/0, 650/0, 544/0, stops not on may_wait 0 (its corpus-through-a-client scene fails at step 21 as on the base with that TMPDIR); two earlier runs of this tree under a load of 10 to 28 ended in a leak of Places' compiled regex (Places.derive from Query.produce) and one rtt-207 run in an assertion in mouse.kindMouse's clamp during a client's speculation, the leak not seen in the eight runs of this tree after them (the full soak, each rtt alone, single seeds), the assertion not in the two full runs after it, and neither in three full runs of the base (by reading neither touches a slot: in the report); daemon.py plain, --far, --games, --window-clients, --upgrade both ways against pardes-tree's base prefix pass; test/cross_replay.py (tui records, gui replays): 27 digests agree in each of three replicas; rollback-bench runs; the macOS library for Linux and aarch64-macos and the FreeBSD cross-build build; frames (gpu/ids-2 against tree1) 77/77 byte-identical in Debug, unit-test 1618/1622 there too, perfab corpus2x -0.059% (session noise 0.134%, threshold 0.4%), pictures identical in all 10 runs, perfops 97 counts within 0.1% (largest image-frame on longline +0.0274%), key-down on medium 10,040,104 -> 10,039,959 an operation (-0.0014%), render on medium 11,455,764 -> 11,455,707 (-0.0005%) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | replicas: an idle client's check answered covers the units that came while ↵Gabriel Schneider8 days
|/ | | | | | | it was asked, so an idle pair stops waking (the user's bar: an idle editor does not wake): every unit a client took marked a change (`Link.take`), and the session's pump that answers a check sends one before the answer (its clock read and its advance, taped: the clock is digested, so "an empty pump sends no unit" is not safe), so each answer was followed by another check 300 ms later, for ever: a check, a session's wake and pump, a unit and an answer every 0.3 s per idle client; strace of a real idle pair (my own detached session and one terminal client, 30 s) showed every wake of both processes was that cycle (the client's timer thread's 298 ms futex wait, its main loop asking, the session's reader taking the 5-byte check, its loop pumping, its writer, the client's reader taking unit and answer) and nothing else; now a unit taken while a check is asked marks no change (the answer comes after it in the stream's order and its digest covers it), and an answer let go (the client not quiet then) marks one; the test `an idle client's check answered covers the units that came while it was asked: it asks no other until something changes` (a Link on a socket pair over a replica joined from an Authority's dump: a change, a check asked, the pump's unit, the answer, then ten quiet seconds ask nothing; a unit after it asks again; an answer let go marks a change) failed on the base and passes; measured on that real pair idle 60 s after a 5 s settle: session 120 ms of CPU and 1236 context switches (20.6 a second: its loop 3.9, its client's writer 6.8 and reader 9.9 a second), client 140 ms and 1656 (27.6 a second) before; 0 ms and 0 switches in both, and in the daemon, after; the gates on the three changes together (i3): tui core-test 843/986 (143 skipped), shell-test 1022/1025, term 15/15, pane 183/184, kitty 45/45, behaviour-test 275/275 and --replay 275/275, process-test the base's two, gui unit-test 1620/1624 + BaselineHarnessMismatch; replicas --clients 5: diverged 0/0/0, unequal 0/0/0, deltas checked/wrong 1907/0, 2028/0, 1812/0, quiet checks 623/0, 835/0, 771/0, stops not on may_wait 0/0/0, corpus 22/22; daemon.py plain, --far, --games, --window-clients, --upgrade both ways pass, and --games 10 of 10 under 24 busy processes (load 11-37); cross_replay 27 digests agree each; the frame and perf gate against tree1 (d2-i3): frames 77/77 byte-identical, corpus2x +0.005% (noise 0.044%), the 97 per-operation counts within 0.1% (largest +0.031%) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* replicas: the soak's session is THE session loop (the reorganisation's ↵Gabriel Schneider8 days
| | | | | | | runners, step 10c, its second part; the user's rule: replica bugs caught by a soak that does what real use does): test/replicas.zig runs runtime/session.zig's Loop over a frontend of its own (Soak) whose host's wait_input is the soak's delayed net, with its clients' links in memory (Peers.threads false: the soak is each Peer's reader, Peer.take then a posted gone, and its writer, the welcome and the dump with its blobs put back then the Peer's queue, a frame a message down the link; a socket pair a dial, its dup handed as the daemon hands one, so a refusal, a Detach's shutdown and a let-go close are the real ones), so the session's pump, Peers.boundary's order (the pump's unit, then joins, inputs, checks and leaves as posted), Peers.input, join (its dump, pins, refusal), leave (a view kept or closed), detach and the teardown in the loop's order are the shipped ones, not Authority's imitation; what a soak's session opens is what run opens (the allocators and their Debug leak check, the workers, the addons' scan, the prompt files and a 9P listener, both in the soak's own runtime directory, XDG_RUNTIME_DIR set to it): no branch for a test in the loop; the two traps the agent before named are handled at the wait's end (the tape stepped, the session core's field and the held trees put back) and a third found (a client's own frame is drawn with no tape stepped, so client-side work inside the wait runs with tape.on null); the wait ends where a terminal's would (its own input, an echo, a client's post, a dial, a worker's draw, the core's timeout; a pty's output paced to the frame's tick, a person's input held behind it as tui.zig's split holds it); the run ends inside its last wait when nothing is in flight (every typist done, the flood over, two seconds of frames: the session's own wakes and the clients' quiet checks no longer taken, as each idle client's check wakes the session whose pump's unit asks the next check, a loop found here); core/replica.zig: Peers.threads, Peers.flushed (each terminal's version recorded after a flush), Peers.post and Peer.take pub; core/Kind.zig (a line the soak forced: its region allocator's leak check found it): a draw that lands after its pane closed is dropped, never kept in Kind.ready for the life of the process; replicas --clients 5 (4 seeds, Debug): diverged 0/0/0, unequal 0/0/0, deltas checked/wrong 1776/0 1832/0 1638/0, quiet checks 694/0 654/0 694/0, unlisted 0/0/0 at rtt 30/80/207 (inputs 1721/1864/1499, units 25712/27409/22491: a unit a pump now, as a session sends them); the corpus-through-a-client check fails at its step 21 (a resize) on the base as here; tui core-test 838/981 (143 skipped), shell-test 1017/1020 (the base's 1016/1019 and change 3's test), term-test 15/15, pane-test 183/184, kitty-test 45/45, behaviour-test 275/275 and --replay 275/275, process-test 2 of 144 failed (lspcomplete and lspcompletemoved, the base's; lsp-client failed once and passed again in the run), gui unit-test 1615/1619 and BaselineHarnessMismatch (the base's), replicas --clients 5 as above (the corpus through a client 22 scenes the same: its step 21 differs only when TMPDIR is a longer path, on the base too), daemon.py plain, --far, --window-clients, --upgrade both ways (pardes-tree's pfx-base) pass, --games failed in the gate's run (a client's keys at a kind's pane, as the base's do under load: reports/pardes-runners-d.md), cross_replay tui and gui 27 digests agree, macOS library (Linux and aarch64-macos) and FreeBSD tui build, rollback-bench runs (the suites run on this change with change 3 on top); the frame and perf gate against tree1 (run5-1, on the tree with both changes): PASS, frames 77/77 byte-identical, corpus2x -0.151% (bar 0.4%), the 97 per-operation counts within 0.1% (largest +0.031%) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* integration: the one client loop that the soak runs, with the tape as the ↵Gabriel Schneider8 days
|\ | | | | | | | | | | | | handle a step is given: pardes-runners-b (10b: runtime/client.zig run by the terminal's client, the window's and the soak; a client's clipboard and links its own frontend's; an input sent before it is applied) and pardes-handle-1 (the handle's steps 0 to 2: p.tape, the directory listing and the file system read through the tape they are handed), merged without a conflict; gates in the coordinator's ledger Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| * tape: a core holds its tape as it holds its allocator, `p.tape` (the ↵Gabriel Schneider8 days
| | | | | | | | | | | | | | handle's step 0, P19/P20, pardes-handle-sizing section 1): Pardes.tape: *Tape, never null, set when a core is made (Options.tape for init, else tape.on's, else tape.none; tape.adoptCore for a client's join, tape.adopt for a Restore, the tape's own apply for a replay's init and restore, replica.zig's Peers when a session's first client joins and when its last leaves), tape.none the tape of a session nobody records (Tape.through: every call goes through, nothing is taped, nothing writes it), Tape.io Zig's io for a site's body (the process's, as every global read of it was), the entry points as methods on the tape (site, value, authority, over, replaying, stray, stepping, screenReplica, screenAuthority, poison, authorityOnly, viewOnly, touchTerminal, adopt, current, forget; `speculating` and `screen_state` are its fields; `diverged` stays free, its name being the field it writes) and the free functions kept beside them, each now the method on `on orelse &none`, so every caller exercises the methods; the field is this process's own, in no digest, dump or tape (Pardes.replica.local, Options.replica.local) and no rollback copy (rollback.zig's `unsaved`), with a test that neither the digest nor the dump moves with it and that a copy put back leaves it as set; a safe build checks at every entry that a core's field is the tape `on` steps it on (or, with none on, an idle one): it found that a client's own frame drawn between its steps (Replica.draw, an entry with `on` null) is entered on its idle tape, which `enter` must not record into once it reads the field (step 9), and that a replay's dump check loaded its core on the session's tape through its options (now on none); Core.zig names the module `pardes.tape` (82 lines), its import `tape` colliding with the field; `init` and dump's `initFromDump` leave the tape once, deferred, with the core made or none (they left it twice, one per way out: the owner's reading); Stepping's swap and the three tests' save-and-restore stay: the free functions still read `on`, so a replica's step needs it pointed at its tape until the last of them goes. The five numbers: (1) functions that gained the parameter 0 (row: 0); (2) perfops 97 counts within 0.1%, largest image-frame on large +0.0215% (the base's own spread), none on a per-row path gained anything; (3) nothing stopped compiling for want of an io (none was removed); (4) global io uses 11 plus the tape's field default, calls into the free functions 93 (each now a method's), machine_lines tape.zig 10 -> 11 (the io field); (5) lines changed: tests 32, code about 580 (164 of them Core.zig's module name, about 250 bodies moved into methods; tape.zig 1533 -> 1623 lines). Gate: tui core-test 837/980 (143 skipped), shell-test 1015/1018, pane-test 183/184, behaviour-test 275/275 and --replay 20 seeds 0 failures, process-test lspcomplete and lspcompletemoved (the base's), replicas --clients 5 diverged 0, unequal 0, deltas wrong 0 (1646/0, 1620/0, 1737/0), quiet 484/0, 554/0, 651/0; daemon.py plain, --far, --games, --window-clients pass; semantics 2f615168fe07b35f (unmoved); frames 77/77 byte-identical in Debug, gui unit-test 1613/1617, perfab corpus2x +0.028% pictures identical in all 10 runs, perfops PASS Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | replica: a client's input is sent before it is applied (the reorganisation's ↵Gabriel Schneider8 days
| | | | | | | | | | | | | | runners, step 10b, its fourth part; the design round's step 1): Replica.input is now its two halves, pend (working name: the input stamped, numbered and pending, its message for the session in r.out) and applyPended (working name: settled, applied at once when it can be, its echo predicted), and Link.input sends between them, so the session starts its step while the client speculates (a key into a shell stops at pty_write and is undone, which the session no longer waits behind); Replica.input stays both halves for the tests and the walk; the client-path kit's key into a shell pane (a pardes --detach session and pardes --attach in a terminal, ReleaseFast, 6 blocks of 30 keys, before and after interleaved twice, the machine loaded 5 to 12): with the predicted echo off, the shell's own echo (the whole round: the client's input sent, the session's step, the pty, the delta, the client's frame) first shown at min 16.05/16.00 -> 15.83/15.83 ms, median 16.30/16.27 -> 16.15/16.15 ms, the client's instructions a key 8.46M/8.77M -> 8.46M/8.52M, the session's 1.138M -> 1.138M; with the echo on (the predicted echo drawn at once) median 0.74/0.71 -> 0.95/0.70 ms, within its noise. Gate: tui core-test 837/980 (143 skipped), shell-test 1015/1018, term-test 15/15, pane-test 183/184, kitty-test 45/45, behaviour-test 275/275 and --replay 275/275, process-test lspcomplete and lspcompletemoved (the base's) and `Lspinfo opens one +Lsp pane` (a Hangup in the loaded run; alone three times of three PASS); gui unit-test 1613/1617 with the base's BaselineHarnessMismatch; the soak (--clients 5) as change 3's, diverged 0, unequal 0, deltas wrong 0, quiet checks 526/0, 550/0, 811/0, unlisted 0 (its delayed link reads the socket after the loop's pass, so the order of send and apply is not visible to it); daemon.py plain, --far, --games, --window-clients, --upgrade from pardes-tree's pfx-base to this and back; the macOS library for Linux and aarch64-macos and the FreeBSD tui configure; rollback-bench runs; gate-w run3-4 against tree1: frames 77/77 byte-identical in Debug, unit-test 1613/1617 (no failure the base has not), the alternated windows' pictures identical in all 10 runs, corpus2x +0.061%, perfops 97 counts within 0.1% (largest image-frame on longline +0.032%) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | client: a client's yank, paste and link are its own frontend's, through the ↵Gabriel Schneider8 days
| | | | | | | | | | | | | | client loop (the reorganisation's runners, step 10b, its third part; the user's ruling: a client's yank fills the CLIENT's clipboard, always): since 12a the session's host no longer makes them for a view a client draws, and its view counts each request (View.yanks, pastes, links and the link), so until now a far client's yank, paste and link did nothing on either machine; after each settle the loop compares the view's three counts with those it has acted on (Link.yanks, pastes and links, from the joined dump's at each join, so a join does none again; only a count that moved forward, so a rollback that puts one back and makes it again is not a second) and its frontend acts on the machine it is shown on: copy (register `+`: the terminal's OSC 52 through vaxis, the window's SDL clipboard), paste (the terminal asks its clipboard and the answer comes back as a paste through the loop's input, the window sends the clipboard's text as a paste at once), open (look.openLink); three more frontend calls, the soak's frontend counting them (y/p/l in its stops line) and answering a paste with one; the soak types ClipYank and ClipPaste now and then; a test through the loop over a frontend that draws nothing (runtime/client.zig: a client's ClipYank, ClipPaste and Look of a URL each reach its frontend once, at once and not again when the session's unit confirms it, the link as typed, and the session's host is asked none of them). Gate: tui core-test 837/980 (143 skipped: the base's and the new test), shell-test 1015/1018, term-test 15/15, pane-test 183/184, kitty-test 45/45, behaviour-test 275/275 and --replay 275/275, process-test 2 of 144 failed (lspcomplete and lspcompletemoved, the base's; headersweep, winch and lsp-client failed once and passed again in the run); gui unit-test 1613/1617 with the base's BaselineHarnessMismatch; the soak (--clients 5) diverged 0, unequal 0, deltas wrong 0, quiet checks 526/0, 550/0, 811/0, unlisted 0, the clients' frontends did 3 yanks and 9 pastes (2/3, 0/3, 1/3), stopped 41/72/71 of 1846/1727/2015, mispredicted 29/40/39 at rtt 30/80/207 (its random inputs changed: ClipYank and ClipPaste among them); daemon.py plain, --far, --games, --window-clients, --upgrade from pardes-tree's pfx-base to this and back; the macOS library for Linux and aarch64-macos and the FreeBSD tui configure; rollback-bench runs; gate-w run3-3 against tree1 PASS: frames 77/77 byte-identical in Debug, unit-test 1613/1617 (no failure the base has not), the alternated windows' pictures identical in all 10 runs, corpus2x -0.105%, perfops 97 counts within 0.1% (largest image-frame on longline +0.026%) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | replicas: the soak runs THE client loop, the one the terminal and the window ↵Gabriel Schneider8 days
|/ | | | | | | run (the reorganisation's runners, step 10b, its second part; the user's rule: replica bugs caught by a soak that does what real use does, twice hidden by a hand-written imitation): each client of test/replicas.zig is runtime/client.zig's Loop over a frontend of the soak's own (a terminal's or a window's by turns: it draws no pixels but counts its frames and keeps the facts a window reads; a window's size posted from its own pass; a terminal holds a key already one pass in four, so no copy then; its wait is the delayed link's next message, a wake it asks for one timer at a time on the soak's clock), driven as a loop woken from outside (Loop.pass up to its wait, Loop.woken after what woke it), so its mirrors of the two loops are deleted (Client.draw, own, within, pass, and the quiet check imitated on the soak's clock: the link's own quietCheck now runs, its clock the soak's through Link.now as Echo.now is); its host has every entry (replica.everyEntry, which 12b's FullHost is now too: pty_resize, watch_file, watch_theme, open_link, pipe, search and the rest do nothing unless the soak's), and an input whose stop's name replica.may_wait does not list fails the run, said with its input (replica.mayWait; the soak's random inputs cannot be named as the walk names them, so by the name alone): the soak found seven names the list did not have, all a far client's by design, now rows with why (Search's rows, a session worker's: `search`; a +Preview's file, the session's disk: `preview`; a kind whose state is its own on the session, a PDF's, its search, a place in it, its word, its open and its close: five rows on a new pane kind `addon`, which the walk does not stand in and never judges stale); the stops by name, the wakes asked and the frames drawn are a line per rtt; the leftovers go (Stats.unspeculated and its column, Proc with enter and current: the distrusted list is the client's, the stale comment about config.tab_now); and a new check, the frame corpus through a client (corpusCase): the corpus's scenes (a wheel, a click, a jump, TaglineSize, a markdown file, three columns, a dirty pane, InactiveDim, WindowOpacity, ligatures, Zerox, a resize) typed into a session's own view drawn by its own pump and, the same, through the client loop into a client's view of a second session of the same files, the session's unit back at once; after each, the two frames a frontend draws from (cells, cursor, chrome, regions, the facts beside them, the placements) are the same: 22 scenes, 25 frames own and 24 through the client, every one the same. Gate: the soak on the shared loop (--clients 5, 4 seeds) diverged 0, unequal 0, deltas wrong 0, quiet checks 489/0, 556/0, 700/0, mispredicted 32/36/43, stopped 87/43/81 of 1784/1806/1977 at rtt 30/80/207 (pty_write 54/9/47, the kinds' 20/19/20, resolve 6/8/4, search 2/4/4, the authority's own state 3/2/3, close a terminal 0/0/3, kind 1/0/0, detach 1/1/0), unlisted 0, 216 s (the base's 230 s); tui core-test 836/979 (143 skipped), shell-test 1014/1017, term-test 15/15, pane-test 183/184, kitty-test 45/45, behaviour-test 275/275 and --replay 275/275, process-test 2 of 144 failed (lspcomplete and lspcompletemoved, the base's); gui unit-test 1612/1616 with the base's BaselineHarnessMismatch; daemon.py plain, --far, --games, --window-clients, --upgrade from pardes-tree's pfx-base to this and back; the macOS library for Linux and aarch64-macos and the FreeBSD tui configure; rollback-bench runs; gate-w run3-2 against tree1: frames 77/77 byte-identical in Debug, the alternated windows' pictures identical in all 10 runs, corpus2x -0.055% (PASS), perfops 97 counts within 0.1% (largest image-frame on large +0.031%); its unit-test 1608/1616: the gate was started in the background (`&`), so SIGINT was ignored down to its test shells and the four host_io tests whose Ctrl-C must end a foreground job failed; the same unit-test run detached but not so (setsid, no terminal) 1612/1616 with the base's BaselineHarnessMismatch only Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* frontends: the terminal and the window draw and turn input into events from ↵Gabriel Schneider9 days
| | | | | | | the frame and one record beside it (the reorganisation's runners, step 10a, on the line as it is now): surface.Facts, the core's (Pardes.facts) and pointed at by the frame it is filled for (Surface.facts), filled by draw.place in the walk over the panes it makes anyway and by a runner after an input it applied (draw.facts), carries what a frontend took from the core (the view's size, cell pixels and row metrics, each open pane's rectangle, tag rows, context rows, serial, whether a terminal whose program takes the wheel or a kind's, its mode, the jumps' back and forward, the settings it draws by); the window keeps a copy (Gui.facts) with the frame it shows (Gui.frame) and its hit tests, wheel, touchpad rows, timedemo, blink, overlays and dim read only those; Host.present returns whether the frame was shown, so present_skipped leaves the core and nothing writes it; the frame statistics are the runner's (Options.frames, Pardes.frames a pointer to them), which the frontends write and the core's draw reads; Replica.draw returns the shown and keeps needs_frame itself, so the two client loops put nothing back; OwnView and Replica.within are deleted (the window client's own pass reads its facts, its inputs fed after each event as before); rollback-bench compiles again; the tape's watched fields lose present_skipped and present answers a bool, so the semantics word moves (0900e560fd6395ef, pardes-seam-b's, -> 2f615168fe07b35f). The first version (psvoxrup, on pardes-tree) kept the record by value in every Surface, and every Surface a tag line builds for a moment copied its 1.3 KB more: +1,556 instructions an image-frame, +3,763 a render (perf record: memcpy); now perfops against tree1 97 counts within 0.1%, largest image-frame +0.029%. Brought onto pardes-seam-b: the client set-up keeps the Distrusted list beside the runner's frame statistics, Options' local fields both, and the rollback test's present answers a bool. Gate: frames 77/77 byte-identical in Debug, the alternated windows' pictures identical in all 10 ReleaseFast runs, corpus2x -0.039% (PASS); tui core-test 836/979 (143 skipped), shell-test 1014/1017, term-test 15/15, pane-test 183/184, kitty-test 45/45, behaviour-test 275/275 and --replay 275/275, process-test lspcomplete and lspcompletemoved (the base's) and grep (passed alone three times of three); gui unit-test 1612/1616 with the base's BaselineHarnessMismatch; replicas --clients 5 diverged 0, unequal 0, deltas wrong 0, quiet 470/0, 600/0, 764/0; daemon.py plain, --far, --games, --window-clients, --upgrade both ways (from pardes-tree's pfx-base); the macOS library for Linux and aarch64-macos and the FreeBSD tui configure; rollback-bench runs Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* core: the reads no tape saw are taped, and a check counts what core/ asks of ↵Gabriel Schneider9 days
| | | | | | | the machine (the reorganisation's 12b, the design round's step 4 and its finds): DumpDir's check whether its directory may be written (fs.deniedAbove in config.Runtime.apply, two `access` calls in a step) is the session's disk's answer, tape.value(.denied) as a failed save's is, and Font <name> and Fonts, which walked the machine's font directories in a step (dev/fonts.list), ask the session's machine through a new site, `fonts` (a far client's Font or Fonts waits a round trip; its replay takes the session's answer); each was a real fault: a client on another machine diverged at its replay of the session's unit, a test each at the end of core/replica.zig (a directory the session may not write and the client may, the setting refused on both; a face the session's machine has and the client's lacks, its family renamed so no installed face shares it, listed and chosen alike on both), each shown failing on the change before (the digests differ); Edit's pipe environment (host_io.commandEnv) is shown harmless and left as it is: it is kept in Pipe.edit_run, `.authority` state (Pipe.zig:21: in no digest and no copy), read only by the host's `pipe` entry, which a client never calls (a speculation records the void call, a replay answers from the tape); the check, the twin of allowed_vars, at the end of core/root.zig: per file of core/, the lines outside tests naming std.c., libc., std.posix., getenv, std.Io's File, Dir, net or Threaded (not Dir.path, a path's text, nor max_path_bytes) or importing dev or runtime, against one list, machine_lines, 34 files and 313 lines, each file with why; a file whose count moves is named with its lines, shown failing once (a getenv added to Messages.zig: 7 lines against 6, its line 891 named); found by it and not changed: Messages.noTime reads PARDES_NOTIME in a step (a test's knob: set on one side only it would diverge); may_wait gains Font and Fonts at `fonts` in a window's build; Stats.unspeculated is not deleted: its only reader is the soak's (test/replicas.zig: the field, its sum, the view column), a file another agent is rewriting; the semantics word moves again (a site added), 517cd1c276996a3c -> 0900e560fd6395ef; tui core-test 836/979 (143 skipped), shell-test 1014/1017, pane-test 183/184, behaviour-test 275/275 and --replay 275/275, process-test 2 of 144 failed (lspcomplete, lspcompletemoved, the base's), replicas --clients 5 diverged 0 unequal 0 deltas wrong 0 (1827/0, 1596/0, 1803/0) quiet differ 0 (422/0, 563/0, 655/0) at 30/80/207 ms, stopped 89/73/108, mispredicted 37/34/36, gui unit-test 1612/1616 (its perf check's BaselineHarnessMismatch the base's), daemon.py plain, --far, --games, --window-clients pass; gate-w seam-b-4 against tree1: 77/77 frames byte-identical in Debug, its unit-test 1612/1616, perfab corpus2x +0.047% (pictures identical in all 10 runs), perfops 97 counts within 0.1% (largest +0.0199%, body-appends on longline) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* core: the session's facts are the core's state, read once at its start (the ↵Gabriel Schneider9 days
| | | | | | | reorganisation's 12b, the design round's step 3; the user's ruling P16 and the lean put with P17: a far client's `~`, default shell and "is this shell installed" are the session's): its home (`~`) and the shell its terminals run when no `Shell` is set ($SHELL if executable, else /bin/sh) are fields beside `session_dir`, `session_home` and `session_shell` (working names, the user's to rule), each read once with `session_dir` by Pardes.readSessionFacts (tape.value(.env): a replay of the boot reads the session's answers), at the session's start and after a load of a dump made before they were dumped, and carried by the dump; `sessionDir` no longer fills itself at first use (it was filled at the start already), and a client's step reads the session's, never its own machine's: Pardes.expandHome (`~` the session's home; `~user` a passwd read, taped, as before) at Save, a tag's name, Theme's path, Get, Incl, a Look of `~/x`, a 9P name and pager, Dump's path, sam's B, e, r and w (sam_edit.World.home) and DumpDir's check (config.Runtime.apply takes the home); bare `Shell`, the shell a terminal runs, the settings report and its 9P twins read `session_shell`; "is this shell installed" (Shell <bin>, Term <bin>, a 9P exec) is a question to the session's disk, tape.site, so far away it waits a round trip instead of answering from the client's machine and rolling back; deleted: the value reads at config.defaultShell (now the process's read, made at the start alone) and at Core.sessionDir, and the tape's `cwd` tag (the directory is read under `env` at the start); fs.expandHome stays for this process's own home, the launcher's (runtime/main.zig) and the state file's directory and a Restore's name (the session's side: a client's Restore waits, its replay reads the tape); the tape's shape changes (`cwd` gone, `shell` a site), so the semantics word moves (the tape's shape now hashes the sites too: it did not see a site gone or added, and this change alone left it as it was), adacca2db2b39264 -> 517cd1c276996a3c: an old build and a new refuse each other's clients, in words; a test at the end of core/replica.zig (a joined client's own `Look ~/x`, bare `Shell` and Tutor, a word run in the session's directory, record no `env` read; the client's shell and directory are the session's), shown failing on the change before (`Look ~/x` read the environment); not handled: a Restore of a dump carries that dump's facts (as `session_dir` did); tui core-test 833/976 (143 skipped), shell-test 1011/1014, pane-test 183/184, behaviour-test 275/275 and --replay 275/275, process-test 2 of 144 failed (lspcomplete, lspcompletemoved, the base's; hscroll flaked once), replicas --clients 5 diverged 0 unequal 0 deltas wrong 0 quiet differ 0 at 30/80/207 ms, stopped 89/73/108, gui unit-test 1609/1613 (its perf check's BaselineHarnessMismatch the base's), daemon.py plain, --far, --games, --window-clients pass; gate-w seam-b-3 against tree1: 77/77 frames byte-identical in Debug, its unit-test 1609/1613, perfab corpus2x +0.095% (pictures identical in all 10 runs), perfops 97 counts within 0.1% (largest +0.0198%, body-appends on longline) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* core: a far client's pane switch beside a shell that asked for focus events ↵Gabriel Schneider9 days
| | | | | | | is instant (the reorganisation's 12b, the design round's answer 1; the user's rulings P14 and P16: motions and layout instant far away): `update` and a 9P request end in reportFocus, which tells a program that asked (DECSET 1004) that its pane took or gave up the keyboard, a pty write, so on a client every switch into or out of such a shell (a click, Up, Del of the pane beside it, Esc or Last out of it, a word that opens a pane, the window's keyboard lost) stopped at `pty_write` and waited a round trip; now a client's own step (screen-state, speculating) records what it told and writes nothing, and the session's step makes the write, off the tape on both sides already (tape.hostCall's pty_write), so the switch shows at once and the program hears of it a round trip later; a write parked behind an earlier one (`pending_write`, digested) would differ between the two and is not handled: it needs the shell's queue full at the switch; the three `pty_write` rows of `may_wait` that item 1 listed for it are gone (the walk named them stale), and a test at the end of core/replica.zig (a client's click into the shell applied at once, the session's two units confirming it fast, the program told `CSI I` once, no misprediction), shown failing without the change (stopped 1); with 12a's Recent stat put back the walk now names Del, DelAbove, DelBelow and Delcol of a file pane at `kind` (7 unlisted); the semantics word did not move; tui core-test 832/975 (143 skipped), shell-test 1010/1013, pane-test 183/184, behaviour-test 275/275 and --replay 275/275, process-test 2 of 144 failed (lspcomplete, lspcompletemoved, the base's), replicas --clients 5 diverged 0 unequal 0 deltas wrong 0 (1827/0, 1596/0, 1803/0) quiet differ 0 (422/0, 563/0, 655/0) at 30/80/207 ms, stopped 89/73/108, mispredicted 37/34/36 (the soak's shells ask no focus events), gui unit-test 1608/1612 (its perf check's BaselineHarnessMismatch the base's), daemon.py plain, --far, --games, --window-clients pass; gate-w seam-b-2 against tree1: 77/77 frames byte-identical in Debug, its unit-test 1608/1612, perfab corpus2x -0.044% (pictures identical in all 10 runs), perfops 97 counts within 0.1% (largest +0.0095%, image-frame on large) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* replica: the line a far client draws pinned by one test (the ↵Gabriel Schneider9 days
| | | | | | | reorganisation's 12b, the design round's step 2; the user's ruling P14: on a far client motions, edits and layout are instant, what has a side effect on the system may wait): one list, `may_wait`, at the end of core/replica.zig, each row a word, key or gesture, a kind of pane, the stop's name and why, and one test that walks, through the replica's own surface (a client joined from the session's dump, its own input, did it stop and at what, taken back before the next), every word of the builtin registry (the enum walked at compile time, a sample argument where one is required) and every key (printable, the specials, F1-F12; plain, with Ctrl, with Alt; and after each prefix key, config's `*_prefix`, the leader and Ctrl-w) on a file's pane, a plain kind's, a shell's raw and a shell's in normal mode, and the gestures between panes (a click on each pane's body, each grip dragged, the window's keyboard lost, and found again) beside a shell whose program asked for focus events (DECSET 1004), against a session host with every entry (FullHost: a client's tape offers only the entries its session's host has, so the old test host hid every pty write); an input that stops at a name not listed fails it, naming what far away waits a round trip, and a row nothing walked stopped at fails it as stale (where every kind of pane was walked: with a terminal compiled in); 8,228 inputs in core-test (no terminal), 16,464 in shell-test and the window build, about 3 s; shown failing twice before it lands: with 12a's Recent stat put back in noteClosed (Delcol and DelBelow of a file pane stopped at `kind`, 5 unlisted, and Delcol's `close a terminal` row stale) and with the focus report's three rows taken out (53 unlisted: a click into or out of the shell, Up, Del and DelAbove of the file beside it, Esc, Last, Newcol, New and every word that opens a pane from the shell in normal mode, the window's keyboard lost, each stopped at `pty_write`: the focus report, which the next change fixes); what the walk does not reach: a word's other arguments, a key after two prefixes (a count, `mi`, a leader path's second level), Del of the last pane, an undo of a rename, a kind's own keys (Still takes none), the mouse beyond the gestures named, an input stopped at two names (the tape keeps the last); also found: a window's keyboard found again asks the session's host whether a newer build is installed (`newer_build`), so a far client's first keys after a window refocus wait a round trip; no product line changed; tui core-test 832/974 (142 skipped), shell-test 1009/1012, gui unit-test 1607/1611 (its perf check's BaselineHarnessMismatch the base's) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* look: n and N in a kind's pane are a motion that reads no disk (the ↵Gabriel Schneider9 days
| | | | | | | reorganisation's 12a; the user's ruling P14: motions instant on a far client): they walked Look's candidates across every result and output pane, and a word or a row with no place of its own was look-able only if the disk said it named a file (look.wordSpan and lineSpan through look.resolve to fs.resolve's realpath: 33 of the soak's 43 `resolve` stops); lookWalk now takes `disk`, and the key in a kind's pane walks without it: only the places the rows already hold (a row's location, a command row's whole line), so it steps the kind's +Search, references, errors and the like at once and skips words that might name a file, while LookNext and LookPrev (words, a Look's walk, which may wait) and the walk to a kind's first hit keep asking the disk as before; a test at the end of core/replica.zig (a client's n in a plain kind's pane, a scratch whose words name files standing first in the walk, lands on the kind's +Search row at once, confirmed fast), shown failing on the change before (stopped 1); the semantics word did not move; tui core-test 831/973 (142 skipped), shell-test 1008/1011, pane-test 183/184, behaviour-test 275/275 and --replay 275/275, process-test 2 of 144 failed (lspcomplete, lspcompletemoved, the base's; headersweep and cmdexit flaked and passed again), replicas --clients 5 diverged 0 unequal 0 deltas wrong 0 quiet differ 0 at 30/80/207 ms, stopped 89/75/108 (the base 104/133/147), mispredicted 37/34/36 on a run whose inputs now differ from the base's (the probe's 2-seed run with every host entry classed each one, before and after: a join's view, a clock's millisecond, a file's second, never a host call's: reports/pardes-seam-a.md), gui unit-test 1606/1610 (its perf check's BaselineHarnessMismatch the base's), daemon.py plain, --far, --games, --window-clients pass; gate-w seam-a-3 against tree1: 77/77 frames byte-identical in Debug, perfab corpus2x +0.045%, perfops 97 counts within 0.1% (largest +0.0012%) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* core: the Recent stat leaves the step (the reorganisation's 12a; the user's ↵Gabriel Schneider9 days
| | | | | | | ruling P16: closing a pane instant on a far client): whether a pane's file is one Recent keeps is now a fact the core holds, File.State.on_disk, learned where a read or write of the file already runs (File.open, a get, a preview promoted, a Put, an Edit's clean write, a scratch saved to a path; a name given by the tag or 9P keeps its stat, being a name's question to the disk), carried by Zerox and kept equal among twins, dumped with the pane; Pardes.onDisk reads it (a kind's pane: its path a local one, its open having read it), so noteClosed (Del, Delcol, a pane's close), events.announce (Zerox and every pane installed) and with them the path every step can take through bootFirst ask the disk nothing, and a client's own Del and Zerox of a file pane are instant; Recent shows what it showed but in one case: a file deleted while open that the watch has not said gone is noted closed all the same (Recent's reader, Jump.jumpBy, still skips a deleted file, asking where the list is read); a test at the end of core/replica.zig (a joined client's Zerox, Del of the twin and Del of the file each applied at once, confirmed, none stopped or mispredicted, the session's Recent holding the file), shown failing with noteClosed's stat put back; test/panes.zig's PDF test that counted the Del's stop (the stat's) now says the Del goes at once, its kind's close still never guessed; the semantics word did not move; tui core-test 830/972 (142 skipped), shell-test 1007/1010, pane-test 183/184, behaviour-test 275/275 and --replay 275/275, process-test 2 of 144 failed (lspcomplete, lspcompletemoved, the base's), replicas --clients 5 diverged 0 unequal 0 deltas wrong 0 quiet differ 0 at 30/80/207 ms, stopped 94/112/138, mispredicted 44/33/29 (the base's), gui unit-test 1605/1609 (its perf check's BaselineHarnessMismatch the base's), daemon.py plain, --far, --games, --window-clients pass; gate-w seam-a-2 against tree1: 77/77 frames byte-identical in Debug, perfab corpus2x +0.141%, perfops 97 counts within 0.1% (largest +0.0079%), its unit-test the PDF test's before it was changed Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* tape: a host call that returns nothing no longer stops a client's ↵Gabriel Schneider9 days
| | | | | | | speculation (the reorganisation's 12a, S1; the user's rulings P14 and P16): in tape.hostCall a speculating client records such a call as made and goes on, and the session's unit confirms the record, or records more where its host wrote the core during the call (an input it made inside it, a watched field) and the client rolls back as for any misprediction; one list, `keeps_stopping`, names the entries that still stop, each with its reason (pty_write: a shell's input, a device by P14 and off the tape with screen-state terminals; spawn, write_file, write_dump, dump_themes: their hosts write the core on every call, write_file also outside any record; upgrade, hand_over, detach: the session's own; search: a host with no worker writes the rows outside any record and a client cannot know which host the session has; wait_input, present, post_present, poll_frame: the loop's), and watch_theme stops only turned on (its host loads the theme file into the core outside any record); and a client's yank, paste and link are its own frontend's (P16): Effect.perform counts each in the view the step is in (View.yanks, pastes, links and the link itself, digested, the same on both sides), and the session's host is not called for a view a client draws (`undrawn`), the record unchanged so nothing mismatches; the frontends that act on those counts are another agent's files (the lines are in reports/pardes-seam-a.md); four tests at the end of core/replica.zig through the replica's surface (a ClipYank goes on at once and is confirmed fast; the same with a host that says something into the core during the call rolls back once and agrees; ThemeFile stops and the Theme after it does not; a joined client's ClipYank and ClipPaste move its view's counts on both sides and the session's host is asked neither, while the session's own view's yank is still its host's); the semantics word did not move (adacca2db2b39264); tui core-test 829/971 (142 skipped), shell-test 1006/1009, pane-test 183/184, behaviour-test 275/275 and --replay 275/275, process-test 2 of 144 failed (lspcomplete, lspcompletemoved, the base's), replicas --clients 5 diverged 0 unequal 0 deltas wrong 0 quiet differ 0 at 30/80/207 ms, stopped 104/133/147 -> 96/114/140, mispredicted 44/33/29 -> 44/34/29, gui unit-test 1604/1608 (its perf check's BaselineHarnessMismatch the base's), daemon.py plain, --far, --games, --window-clients pass; gate-w seam-a-1 against tree1: 77/77 frames byte-identical in Debug, perfab corpus2x -0.106%, perfops 97 counts within 0.1% (largest +0.0173%) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* core: nothing of a core is a process global, the three that were ↵Gabriel Schneider9 days
| | | | | | | (pardes-probes P3, the reorganisation's 12c): config.tab_now goes, a tab's width is the core's settings.tab handed to every width function as `tab` (File.graphemeDisplayWidth and the 73 functions above it, test helpers among them, that had no core to read it from gained the parameter; an Editor, a Surface and the hunks' Ctx carry it; render sets Surface.tab; graphemeDisplayWidth asks its one printable ASCII byte before the tab, the two disjoint: with the tab first, as before, the parameter cost 0.2-1.7% instructions an operation in pardes-perf, with ASCII first the measured cells use 2-16% fewer than the base), so a rollback can no longer leave a stale width and replica.zig's hand-made put-back in toConfirmed goes; Addon.distrusted/ndistrusted become Addon.Distrusted, the client's own list, which its frontend owns across its joins and hands each core as Options.distrusted (in no tape, dump or digest: Options' replica .local); Kind.draw_tokens becomes each slot's `draws` (local: a draw is a frame's, so each process's count differs and no digest may hold it; the copy saves it with the slot); the two turn reads in a step stay, being shown unable to reach a client's state (the report); the soak's Proc keeps only the client's list (its tab_now and the global swaps go, forced); test/perf.zig follows three signatures, so unit-test's perf check now says BaselineHarnessMismatch until the baselines are recorded again; tui core-test 824/966 (142 skipped), shell-test 1001/1004, pane-test 183/184, behaviour-test 274/274 and --replay 274/274, process-test 2 of 144 failed (lspcomplete, lspcompletemoved), replicas --clients 5 diverged 0 unequal 0 deltas wrong 0 quiet differ 0 at 30/80/207 ms, gui unit-test 1598/1602, lib-test, daemon.py plain, --far, --games, --window-clients pass Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* core: the rollback's two faults read by the probe (pardes-probes P4 b), each ↵Gabriel Schneider9 days
| | | | | | | shown by a test that fails on the base, and fixed: (a) a terminal's kitty-image cache (TerminalImages.converted, RGBA made of an RGB or grey image) was made with the drawing core's allocator, so on a far client, whose emulator is outside its rollback epoch, a frame drawn under a speculation left the emulator holding epoch-born memory that the rollback freed (reachable since a closed terminal brought back loads the session's dump of it, its images with it): the next frame read the freed map (SIGSEGV in TerminalImages.draw on the base), so the caches are now the emulator's own allocator's and a terminal's close takes none; (b) a far client's slot of a kind whose state is not plain was on the C heap (initDump's image_allocator), so its own Del of such a pane freed the slot outside the epoch, and the rollback by another client's unit put back a pane pointing at it (a general protection fault in Jump.trackJump on the base), so a far client's image_allocator is now its epoch, as every other of its allocators: the free is put off and the Del stays instant; two tests at the end of core/replica.zig; tui core-test 824/966 (142 skipped), shell-test 1001/1004, pane-test 183/184, behaviour-test 274/274 and --replay 274/274, process-test 2 of 144 failed (lspcomplete, lspcompletemoved; winch failed once under load and passed alone), replicas --clients 5 diverged 0 unequal 0 deltas wrong 0 quiet differ 0 at 30/80/207 ms, gui unit-test 1598/1602 with its perf check passing, daemon.py plain, --far and --games pass (--games once timed out at its teardown and passed again; --window-clients failed on the gate's own TMPDIR, a socket path past 108 bytes, and passed on the next change) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* core: src/ becomes core/, pardes.zig its root.zig (the reorganisation's ↵Gabriel Schneider9 days
tree, step 2d), and every mention of a src/ path follows: the build's paths, the core's imports of its root, the tests that read the repository's files by path (lspbench's, look.zig's spans over core/look.zig), the comments that cite files, the documents and the manual (the typst corpus reads core/tutor.txt and core/plumbing); left as they were: the /src tree's served names (src/pardes.zig and the rest are the 9P tree's, not the repository's), the CHANGELOG's history, fixtures that are only strings; fs-unit-test runs from the core's root (a module of the core rooted at fs.zig had the runtime's and the devices' `core` be fs.zig); nothing else changes: the ledger (pardes.test.* now root.test.*), frames byte-identical, replicas and process-test the base's Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T