summaryrefslogtreecommitdiff
path: root/core/Effect.zig
Commit message (Collapse)AuthorAge
* the Changes layer's lines are the pane's text, read-only, and nothing is cut ↵Gabriel Schneider4 days
| | | | | | | (the user's rulings of 2026-11-23: "all text is regular text", "the ghost line should be regular text too ... but I cant edit them", "don't cut them ... break them following the regular softwrap"; the coordinator's model P71): while a pane's layer is shown, a line a change took away, a changed line's old text and each change's description (`id title author age`, its whole title and its whole author) are lines of the pane's buffer, and the buffer carries their places (`File.State.read_only`, `File.ReadOnly`, whose layer `File.State.layer`), so every motion, selection, search, text object, count, yank, B2 and B3 works on them because they are text, and they wrap by the pane's soft wrap; ONE check where every edit passes (`File.edit`'s `readOnly`: a file at a revision is its whole text, the layer's lines each one; an edit that changes a byte of one, puts any in at its start or inside it, or leaves one on the end of the line above is refused whole, in words on the notice line), edit.zig's second revision check deleted; THE FILE'S TEXT by one function (`File.fileText`, `FileParts`, `fileHash`, `fileEql`, `fileLen`: the buffer itself with no layer, a file with none pays nothing) and two maps (`fileOffset`/`bufferOffset`, `fileRow`/`bufferRow`: a place in one of the layer's lines is after the file line above it), read by every sink: Save and Save-as (Effect.zig), `body`, `addr`, `data`, `xdata`, `sel` and `dot` over 9P (ninep/pane.zig `bodyOf` is the file's text, `fileDot`/`setFileDot`, a 9P write is `File.replaceFile`, a read of a pane with the layer a copy, never a region of the buffer), the dirty checks, Get and a disk reread (`File.load`: the layer out and back), Edit (sam over the file's text, its result a load, its `w` the file's), the language server (its source, the offset asked at, its edits, its places), the syntax parse (`highlightLayered`: the file's text parsed, its colours laid around the layer's lines; context declarations; a worker's parse; query rows' colours and line numbers), jj's own provenance and churn, `Look :N` and `path:N` (the file's line N), the undo journal (an edit journaled in the file's offsets, an undo taken with the layer out; `Journal.record` takes the removed bytes); the layer in and out by `jj.showLayer`/`jj.hideLayer` through `File.relayer` (an edit of kind `.layer` that nothing reading the file hears of, every view's cursor, selection and top line kept by the file's offsets); the layer is the pane's: shown in every view of it and of its twins (`jj.setLanes`); when the editor's whole new text's shortest splice runs into a read-only line where an equal splice does not, that one is taken (`File.clearOfReadOnly`, never back across a read-only line); deleted: `File.fillBody`'s ghost branch, `File.hasGhosts`, `File.bodyWidth`, `jj.fitted`, `jj.row_max`, `jj.showGhosts`, `jj.wordAt`, `Pane.ghosts`/`ghost_text` and `wrapAt`'s `ghost`, Core's per-step sync; the gutter numbers the file's lines; `]g`/`[g` land on a layer's line as on any; the arrow keeps the user's bend (`╰─→`, as nmwnvrow); WIRE 34 (a file pane's `read_only` and `layer`, a description ghost's `author` in the dump and the digest; a clean file's text is dumped while the layer's lines are in its buffer; a dump of 31 loads, a pane whose view showed the layer showing it again: `jj.loaded`); tests (core/jj.zig): the layer's lines as text, read-only (terminal and window), THE FILE'S TEXT (every sink with the layer off and on, byte for byte), the undo across hide and show, 9P in the file's offsets, a client replaying them and a join loading them, a wire-31 dump, a description whole and wrapped in 50 columns, and the old tests of the per-view rows made the pane's; its gate (.scratch/sketch/reorg/pardes-layers-8/g8a, loads 3-7): core-test 942/1108 (166 skipped; the base 936/1102) and shell-test 1150/1153 (3 skipped; the base 1144/1147) in Debug and in ReleaseSafe, behaviour-test 276/276 and --replay, pane-test 182/183, the soak --clients 5 (diverged 0, unequal 0, unlisted 0 at 30/80/207 ms, the corpus 22 of 22, no leak), the gui unit-test 1747/1751 (the known BaselineHarnessMismatch alone), the frame gate 77/77 frames, 0 differ; the perf counts against tree6 40 of 121 over 0.1% where the base's own gate (merge63-g) has 33: against the base this adds body-appends +0.42%, client-key-down +0.18%, terminal on all +0.155%, client-delete-undo +0.14%, deep-sel +0.12%, client-edit-char +0.11% (cause not found yet) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* integration: the pair's chain on the gathered line: pardes-pair-10 ↵Gabriel Schneider5 days
|\ | | | | | | | | | | | | (`vxutwuwz`, the pair's ten changes on pardes-merge50 past the four already gathered: a window's facts its client's (P47: WindowOpacity applied by a client window, `Font` gated by the desktop builds' capabilities, not the frontend's build), a window pair's session listed as a window's (P49), the user's terminal put back when a pair's client dies with no word (P48), a pair's user told a newer build is installed, an addon's landing on the tape and a client on the session's machine running a kind loaded by path (`Site.landing`, P51), an upgraded pair's session attended until its client is back, and test/daemon.py's `--with-pair`, `base_env`, `listed_as` and the Restore test as P44) on pardes-merge57 (the terminals' old road deleted, the wire at 30); two textual conflicts: core/replica.zig `Peer`'s fields (the pair's `bye` and `pair` kept, the deletion's removal of `sid` with its `Screens` kept) and test/daemon.py's head (the pair's `WITH_PAIR`, `base_env` and `listed_as` kept where the deletion had removed `KEEP`); the semantic ones the text did not show: the pair's `zwrkukrx` (`PARDES_TERM_BYTES`, its switch to the bytes road) merged without a conflict into core/replica.zig `takeJoined` (setting `r.t.screen_state`, a field the deletion removed), runtime/session.zig (`Peers.bytes`, removed) and test/process.zig (its passthrough): all three taken out, the gathered line's text there exactly, no road to choose (core/root.zig's machine_lines for replica.zig stays at the gathered line's 76: the pair's +1 was that getenv); test/daemon.py's two functions the gathered line added after the pair's base (`kept_views`, `kitty_image`) built their environment in the idiom `base_env()` replaced at every other site: now `base_env()` (the same without `--with-pair`; with it they run as a user who exported PARDES_PAIR, as every other mode does); the pair's `Peers.input` focus line, written after `screensOut` (deleted), stands alone before the step; `Site.landing` stays at the enum's end after `medium` (`images` gone): `wire.semantics` moves as any tape change does, no version line; and found by the gate: test/panes.zig's P51 test (the pair's, written on its old base) called `Authority.init` and `Replica.init` with the road's flag the deletion removed (pane-test did not compile): the argument removed, as merge57 did in core/jj.zig; nothing in core/tape.zig, abi/wire.zig or core/views.zig resolved by hand; gate (Debug tui in the workspace, loads 2-10): core-test 916/1073 (157 skipped), shell-test 1115/1118 (3 skipped), pane-test 182/183 (1 skipped: the base's + the P51 test), term-test 15/15, kitty-test 45/45, addon-test 5/5, behaviour-test and --replay 275/275, consumer-test, process-test own 0 of 146 and as pairs 0 of 146 (themesel first time as a pair, alone 0 of 5 first time and 5 of 5 on the runner's retry: pair-8's open case); the soak --clients 5 diverged 0, unequal 0 at 30/80/207 ms, unlisted 0, the corpus 22 of 22, no leak; daemon.py on Debug and ReleaseSafe: plain 3 of 3 each, --restore PASS each (P44's test, failing on the base), --pair, --attach-upgrading, --clients 3 of 3 each, --far PASS on ReleaseSafe and on Debug 3 of 3 alone (once at load 10 by_hash saw a client join again); --upgrade from the installed build PASS; with --with-pair every mode passes on both builds (plain, clients, manage, launch, relink, far, restore, attach-upgrading, pair, window-clients, gui, games, kitty-image), its --upgrade both ways past pair-10's wall and failing later (far_exec; a client's check differing after a ReleaseSafe-to-Debug Upgrade); the frame and perf gate against tree3 (gpu/pp11-g): 77/77 frames, perfab corpus2x +0.105% (noise 0.048%), 121 counts within 0.1% (largest terminal-on-all +0.085%) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| * replica: an addon's landing is on the tape, and a client on the session's ↵Gabriel Schneider6 days
| | | | | | | | | | | | | | machine runs a kind loaded by path from that path while its bytes are the session's (P51): `Addon load <path>` typed in a session with any client attached parted every client (core/Effect.zig ran `Addon.perform` inside the core's pump entry, where the nested `update(.addon)` is no recorded input (core/tape.zig `enterInput` records none on the core's side) and a replay skipped the perform: the session's core took the kind, no client's did); the perform is now a recorded value call of the core's (`p.tape.value(.landing, Addon.perform, ...)`, `Site.landing` at the end of the tape's sites: the tape's shape and so `wire.semantics` change, the wire's version does not), its event recorded inside it and applied by a replay, a speculation waiting for the session's (`authorityOnly`); and `Addon.plainOps`, after a client's own addons, reads the library at the kind's path (its own copy, head and init as a load's) and runs it when its BLAKE3 is the one the session lists, else lets it go and the pane shows the kind's line, which now says so (core/Kind.zig `draw`); nothing is fetched over the link and no bytes the session sent are run; test/panes.zig: a session's `Addon load` of the image addon at a temporary path lands on its in-process client with no divergence (it diverged before), the client's picture pane runs the kind's code from that path (it fails with the path load taken out), and a client joining after the file was written over (one byte more) shows its line; the corpus through a client window (PARDES_PAIR, terminals by bytes) now runs to its end, 77 frames, 68 byte-identical to tree3's (63 the veil, 64-65 the snake loaded and its first frame, 75-76 the 2x display), 66-74 the snake's own pictures four animation steps ahead (the session's clock, not a client's: the same in two runs); the own window through the same prefix 77/77 Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | pty: a shell forks at its pane's grid, and the core hands its host every ↵Gabriel Schneider5 days
|/ | | | | | | pty's size, pixels too (pardes-term-join-9, item 2 (B), points (a) and (c)): the spawn host call took no size and both hosts forked at the session's live screen (dev/Ptys.zig `spawn`, runtime/macos.zig `spawnShell`: `core.view().screen_h/w`), so a shell started again into a pane already sized (pty/ctl's exec, a finished command pane run again by exec.zig `runCommand`, a Restore's `revivePane`) ran at the screen's size and nothing resized it, the grid unchanged and `sync` emitting nothing (`stty size` said 50 160 in a 44x158 pane); and a pty's pixels were the live view's (host_io.zig `ptyWinsize` read `core.view().cell_pixels`) whichever view sized it; now `Effect.PtySize` (cells and pixels) is what the core gives its host for `spawn` and `pty_resize`, made by `Core.ptySize` from the pane's grid (or 9P's numbers) at the cell of the view that sizes it, a spawn performed after its step's `sync` reading the laid-out grid, and the hosts fork and size from it alone (`Ptys.take` sizes an adopted shell from it too: 1x1 then the size, once, its forced redraw kept, an ioctl to the size a pty has already sending no SIGWINCH); test (test/process/terminals.zig, a new case): a Term pane's shell, the same shell started again by pty/ctl's exec and a finished command pane run again each say the grid their pty/ctl reads back (fails on the base: 50 160 against 44 158); not covered: a new command pane made over 9P is placed a step after its fork, so its first size can still be the screen's Co-Authored-By: Claude Opus <[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
* tape: Effect.perform's 20 calls out to the host and pump's 8 through the ↵Gabriel Schneider8 days
| | | | | | | tape's one call, step 6b (reports/pardes-handle-69-design.md): each arm is p.tape.host(p, .name, .{ args }) with its absent arm after orelse (nothing, the in-process fallback, an answer at once, a message), Effect's two replaying() are the handle's, and the pump's other view presents through a four-line presentTaped so the present stays inside views.within; a new core test pumps a core twice with one host and once with another (the mask said at the first and the third, the clock, watch and present at each, a replica replaying the three units to the same digest); 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
* integration: a far client's seven small faults on the renamed tree: ↵Gabriel Schneider8 days
|\ | | | | | | | | | | | | pardes-far-faults (a refocus that no longer asks the session's host about a newer build; a drag in a kind's pane grown too short; a draw's token that no rollback takes back; a text's declarations dumped so a joined client's query reads what the session's does; a search that goes on at once on a far client; two tests of what cannot happen) and pardes-merge24, merged without a textual conflict; the coordinator's gate in the ledger (reorg/merge25) Co-Authored-By: Claude Fable 5.2 <[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
* | core, docs: the control tree's test harness is core/ninep/harness.zig, no ↵Gabriel Schneider8 days
|/ | | | | | | longer core/ninep/testing.zig (P18, the user's ruling on the tree step's name collisions: the file's name collided with the future `core.testing`): the file moved whole in this change, so its history follows it (no line of it changed), and its 27 imports follow, nine `@import("testing.zig")` in core/ninep (addr, cols, ctl, events, pane, pty, screen, sources, tree) and 18 `@import("ninep/testing.zig")` in core (Addon, Core three, Dir, Effect, Query, dump three, edit_cmd, fs, keys, look two, mouse, sam_edit, tape), with the two design notes naming it (docs/next-tests.md, docs/next-terminal.md); the build and the root's test lists never named it; a rename only, nothing else on any line; tui core-test 848/991 (143 skipped), shell-test 1027/1030, the window builds (`install -Dplatform=gui`), the macOS library for Linux and aarch64-macos and the FreeBSD cross-build rc 0, under a load of 22 to 60 Co-Authored-By: Claude Opus <[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
* tape: the core's entries are written once (P22, pardes-entries part 2, its ↵Gabriel Schneider8 days
| | | | | | | first half; the owner's mechanism C and names): each of 36 entries is its public name made by `pardes.tape.taped` from the private body directly under it (`pub const setCwd = pardes.tape.taped(setCwdInner);` then `fn setCwdInner(p: *Pardes, id: usize, cwd: []const u8) void { body }`, the doc comment on the public line), so the entry no longer opens with `tape.enter` and a deferred `tape.leave` and has no replay arm of its own: `taped` makes a function of the inner's own parameters (one per arity, 1 to 4, `tape.Taped((function 'setCwdInner')).f3` in a profile) that records the variant of `tape.Input` whose line names the entry (`set_cwd: Args(Pardes.setCwd)`, a type of that entry's own, found by the function itself in the wrapper's body: at the declaration it would be a dependency loop between the union and the entries), defers the leave and calls the inner with `@call(.always_inline)`, so an entry compiles to what one written with its own pair did; the replay's `apply` keeps its hand-written arms (init, init_from_dump, restore, deinit, pump, render, to_view) and calls every other entry from its variant in ONE `inline else`; the six kept by hand say why in one line each (init and initFromDump: no core yet; deinit: what it records is no argument and it leaves on no core; pump: the host is set before the enter and is no input; render: the arena is no input; toView: the live view asked again records nothing, and a frontend asks before every input), and restore is taped with an arm of its own (it swaps the replay's core); an entry in 36 places went from 4 lines in 3 places (variant, enter, leave, arm) to 2 in 2 (the public line beside its body, the variant's line), and an argument left out or passed in another order can no longer be written: a variant naming the wrong entry or an entry with no variant does not compile, the error naming the inner ("tape: two variants of Input name the entry tape.Taped((function 'setStatusInner')): set_message and set_status", "tape: no variant of Input names the entry tape.Taped((function 'rejoinViewInner'))"); the payloads are now the entry's arguments in order (`args[0]`), read so in the tape's three readers (a screen-state output's bytes stripped, the input's name for a divergence, `describe`), `Input.Font` gone; the bytes a tape holds are the same (walk writes no field names) but its shape is not, so the semantics word moves, 2f615168fe07b35f -> 313a99190b93a8c5; `update`, `presented` and `dumpFailed` read `p.view()` before their enter and now after it (the enter writes only the tape's own state and the host it wraps, nothing a view holds); no call site changed, no line outside core/; core/ 203 lines added, 187 deleted (tape.zig 204 of them: the helper 58 code lines, 36 arms gone). Gate: tui core-test 838/981 (143 skipped), shell-test 1016/1019, 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), replicas --clients 5 diverged 0, unequal 0, deltas wrong 0 (1705/0, 1722/0, 1714/0), quiet 526/0, 652/0, 811/0, stops not at may_wait 0; a session recorded and replayed by itself (test/cross_replay.py: 28 digests agree in each of the three replicas); gui unit-test 1614/1618 (the perf check's BaselineHarnessMismatch, the base's); daemon.py plain, --far, --games, --window-clients pass; the macOS library for Linux and aarch64-macos and the FreeBSD cross-build configure and build; frames (gpu/entries-1 against tree1) 77/77 byte-identical in Debug, gui unit-test 1614/1618 there too, perfab corpus2x +0.100% (session noise 0.031%, threshold 0.4%), pictures identical in all 10 runs, perfops 97 counts within 0.1% (largest image-frame on medium +0.0246%); every entry is one function in the ReleaseFast pardes-perf (36 symbols `tape.Taped((function '<inner>')).f<n>`); update's count, key-down on medium per operation, 10,040,394 at pardes-handle-1's step 2 -> 10,040,439 (+0.0004%; 10,040,102 at tree1), render's, render on medium per operation, 11,456,076 -> 11,456,085 (+0.0001%; 11,455,763 at tree1) Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* fs: the file system's sites are read through the tape a step is handed, and ↵Gabriel Schneider8 days
| | | | | | | the reads no tape saw are listed (the handle's step 2, P20, pardes-handle-sizing's second noun): every site of core/fs.zig is the handle's, the core's (`p.tape`: /os's stat, listing and read, a mount's read) where a function holds the core, else a `tape: *Tape` parameter, taken by 16 functions (fs.makeDirs, expandHome, expandHomeFrom, resolveOs, readFile, readFileLimit, readRestore, restorePath; exec.kindOf; up to a core: dump.directory, restoreFile, onDisk, Db.statePath, Core.recentKeeps, Core.parentTrouble, config.Runtime.apply); fs.resolve takes its optional core's tape, `none` without one; sam's World carries the session's tape for `~user`; the bodies of make_dirs, read_file and kind take Zig's io from the tape, and /os's stat and listing are handed it, so fs.zig and exec.zig read the process's io nowhere; the finding, what stopped compiling for want of an io: fs.readHost's two direct callers, both host halves (the tape's own read by path of a record sent by hash, which takes its tape's io; a client's join reading a plain kind's file through the walk's dump hook, whose mode `join_files` is now the host's io), and by reading one step's read no tape saw, ninep/ctl.zig's bare deniedAbove in a /pager open (served in serveFs, which a client replays), now taped as its neighbours are (`p.tape.value(.denied, ..)`, no new site); the host's own calls of these (the launcher, a -l dump, fonts, theme files, Upgrade, a dump failure's message, gui tests) pass `&tape.none`, recorded by nobody as before; and the replay's dump check now puts the core's tape aside with `on` (its dump's `onDisk` replayed a site the tape did not have: every --replay seed diverged at its end in the first gate). The five numbers: (1) functions that gained the parameter 16 (row: 19 + 7); (2) perfops 97 counts within 0.1%, largest image-frame on small +0.0295%, none on a per-row path gained it; (3) stopped compiling for want of an io: fs.readHost from tape.byHash and from dump.slotWrite (host halves), osHandle's io local (fed only sites); (4) global io uses 6 (10), calls into the free functions 80 (92), machine_lines fs.zig 39 -> 38, exec.zig 4 -> 3; (5) lines changed: tests 33, code about 130 (20 of them in host files). Lines in files not this work's: dev/tui/tui.zig 990, dev/gui/gui.zig 613 629 1054 3057 6171 6264 7494 8290, dev/file_watch.zig 612 644, dev/host_io.zig 1521, runtime/main.zig 1373 1391 1398, runtime/macos.zig 646 668, runtime/upgrade.zig 349 396 (each one argument). 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; pagercolor flaked once, passed alone three of three), replicas --clients 5 diverged 0, unequal 0, deltas wrong 0 (1731/0, 1620/0, 1737/0), quiet 545/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.057% pictures identical in all 10 runs, perfops PASS 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: 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