summaryrefslogtreecommitdiff
path: root/docs
Commit message (Collapse)AuthorAge
* docs/next-daemon.md: fix's gates, run again over npzpposw and wxpkrpwoGabriel Schneider2026-10-30
| | | | Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: two leaks the soak showed after the first round, a ↵Gabriel Schneider2026-10-30
| | | | | | resize made inside a step and a loaded search's regex, their fixes and tests, and a breach not confirmed Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: fix's gates on uxwrlzlw, and the ReleaseSafe far joins' ↵Gabriel Schneider2026-10-30
| | | | | | RSS as measured there Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: fix3: a 9P write's Grep or Find, its search a tape siteGabriel Schneider2026-10-30
| | | | Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: fix2 on H18 (the same mechanism as fixer 1's, which ↵Gabriel Schneider2026-10-30
| | | | | | lands; its create must make resize_to null), the kept-rows read flag, and the round's gate Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: fix3's second round: H19 (an enum digested by its ↵Gabriel Schneider2026-10-30
| | | | | | number), the linger leak, H15 (Adopt), the web build, and a 9P Grep's untaped search found on the way Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: the remote bugs the user hit, fix's: the session's ↵Gabriel Schneider2026-10-30
| | | | | | abort after 15 far joins (c_heap), the window's rejoins at every tag hover and click (a hit resolved on this process's frame), a reflow's overflow of the screen state, a replay's panic at a site it lacked, a rejoin's lost layout, a client's end (its ssh, a gone session redialled 20 s, a dying session's links); each one's test and numbers, here and on the box, and what of the user's symptoms is left Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: the remote bugs the user hit, fix2's: what a step read ↵Gabriel Schneider2026-10-30
| | | | | | that only the authority holds (the store, Recent, the 9P server's readers and socket, the process's options) and the model for it (tape.authority), the rollback over the host's heap, units that ended with effects queued, the lowered copy's heap bytes, the live slot left aliasing; the tests, the gate, the soak twice and H17's own configuration, the copy before and after; H18 handed back with what was found (a resize leaves a replica's screen state stale for a round trip) and a fix to try Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: the remote bugs, fix3's: an error, a stat and a ↵Gabriel Schneider2026-10-30
| | | | | | search's budget that meant what their build said, the guard in semantics, the cross-build replays, a window client of the box before and after, and a MessageLinger 0 replay leak found on the way Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: the final gate on everything merged: Debug, the ↵Gabriel Schneider2026-10-30
| | | | | | installed ReleaseSafe binaries, the FreeBSD main test, the A/B against base with the edit cells rechecked, and the one divergence a window client of the box showed once and that has not come back Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: phase 6's GUI replica notes: the decisions at its forks ↵Gabriel Schneider2026-10-30
| | | | | | (the window client the tty's with a window for a terminal, replica.Link shared; the window's writes into its core one funnel, read over the client's own view; no pump in a client, its window's font, opacity and shader files its own; the wheel a row a turn there; a client's frontend said first; one desktop semantics, a view's words by its frontend; a window's session serving at its step boundary, a client's view no window there; its font and opacity answers taped; the far path amort's; a check once quiet), what was found (a run's output read off a replica's emulator, a cut-off client's silent end, a second's turn in the replica tests), the window client's numbers (keystroke to present at each RTT and through the box, echo predicted and not, its joins, the session's step while it lags), the gates in Debug, ReleaseSafe and on the box, the A/B against base (the core, live tty and live window, idle and busy cores), and what is not done Co-Authored-By: Claude Opus 5.5 <[email protected]>
* daemon: pardes --ps, --kill=<name>, --kill-all: the daemon's registry as a ↵Gabriel Schneider2026-10-30
| | | | | | tree (the daemon, each session with its pid, kind, state and name and the shells it holds, then the shells no session holds, which Adopt takes) and sessions ended with their shells: a TERM, a KILL 2 s later, gone once the daemon no longer lists them (a zombie still answers kill 0), a killed session's held masters closed rather than kept for an Adopt and --kill-all's every kept one; in --help, the guide and the reference; --help's ssh default no longer -C; test/daemon.py --manage Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: phase 6's content cache and zstd notes: the decisions ↵Gabriel Schneider2026-10-30
| | | | | | at its forks (far or near by the client's word, the session lists and the client asks, BLAKE3 hashed again on load, the core it leaves before the disk, the cache directory and its bound, zstd on the whole stream after the welcome, libzstd trimmed), zstd's numbers (gzip -6 against zstd's levels on four join streams, and their transfer through the box's link: level with -C without undo history, half its time with it), the first frames through the box and here for a first join, a second client, a rejoin and a client started again, the session's step during joins, the gates in Debug and ReleaseSafe, the A/B against base, what was found and what is not done Co-Authored-By: Claude Opus 5.5 <[email protected]>
* replica: a far client's content cache and zstd: the session lists its join's ↵Gabriel Schneider2026-10-30
| | | | | | blobs by BLAKE3 hash first (wire 16 `blobs`), the client finds each in the core it leaves or on disk ($XDG_CACHE_HOME/pardes/blobs, hashed again on load, a bad file a miss, the least recently used evicted past 1 GiB) and asks for the rest (`want`), and everything after the welcome goes in zstd envelopes (level 6 over 8 MiB for the join, an undo snapshot being a near copy of its text, then level 3), so `ssh -C` leaves the default command; a far client (through ssh, or PARDES_REPLICA_FAR) keeps what it was sent and, at its end, what it made; a hangup ends a remote client the normal way; through the box a client holding the blobs is drawn in 2.4 s where main took 7.0 to 11.9, and a first join of a session with undo in 7.1 s where main took 11.9; libzstd 1.5.7 vendored, its allocations on c_heap, a second copy refused by shared-libs-check; tests for the cache's verify-on-load, its eviction and a far join's blobs sent once; test/daemon.py's far clients Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: the final gate's notes: the three found on the way (a ↵Gabriel Schneider2026-10-30
| | | | | | terminal's paint walking the page list a cell, glibc's tcgetattr past Zig's termios, an optional slice loaded undefined in ReleaseSafe), the gates in Debug and against the installed ReleaseSafe binaries, the FreeBSD main test, the A/B against base, what was installed Co-Authored-By: Claude Opus 5.5 <[email protected]>
* terminal: a shell's cells painted from the row's own pin (cellAt), not ↵Gabriel Schneider2026-10-30
| | | | | | getCell's walk from the viewport's top to the row for every cell: a frame of a 120x40 terminal over 64 KB to 8 MB of scrollback 107-127 -> 94-102 us against base, ReleaseFast; the 'regression' phase 5B read against base was a Debug-core perf binary (core_optimize debug, terminal safe) beside a ReleaseFast one, file gestures level once both are ReleaseFast Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: phase 5 part B: the decisions at its forks (the stream, ↵Gabriel Schneider2026-10-30
| | | | | | terminals as screen state in rterm's order and the wait's split, the taped prompt, predicted echo wired, the join's state in the step and its blobs streamed pinned, the texts hashed first, the rejoin, an Upgrade's words, ssh -C), the main test on the FreeBSD box, keystroke to present at 0/30/80/207 ms and through the box, echo with and without prediction, the visible rollback rate, the join's cost before and after, the join through the box plain and compressed, the step while a client lags, the local A/B against base and main, the gates, what was found and what is not done (a GUI client first) Co-Authored-By: Claude Opus 5.5 <[email protected]>
* echo: a replica draws a key typed into a terminal at once, mosh's way (a ↵Gabriel Schneider2026-10-30
| | | | | | printable character at the cursor, Backspace, Left and Right, in tty mode on the primary screen), from an overlay of its own that no digest, dump or rollback copy sees, painted over the terminal's body at the end of renderBody (the tty's and the GUI's); judged at each delta once the authority has the key and 50 ms have passed, every prediction taken back on a mismatch; drawn at once at a prompt pardes's marks vouch for, elsewhere only once an echo was confirmed, never after a drawn misprediction until one is, so a password prompt or a program that ignores input shows nothing typed; the keys typed behind one not predicted (Tab, Enter) predicted over the screen that shows its doing; zig build replicas -- --echo types a corpus into a played shell at 30/80/207 ms: a key to its character p50 239 -> 8.9 ms and p90 248 -> 15.8 ms at 207, no wrong character drawn; docs/next-daemon.md: the decisions, the hook for the remote client, the numbers, the gates and what is not done Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: phase 6's 9P round trips: the decisions at its forks ↵Gabriel Schneider2026-10-30
| | | | | | (the server's order kept, what a park lets go ahead and how the client meets it, the flight, the end of a read, read ahead, kept connections, no stat cache, /n/<host> as ssh -L and Mount), messages, round trips and times before and after at 30/80/207 ms and on the FreeBSD box (plain and ssh -C), what the box's link costs beyond the round trips, the local A/B, the gates, and what is not done Co-Authored-By: Claude Opus 5.5 <[email protected]>
* 9p: a mount keeps its connection and sends each operation's walk, stat, open ↵Gabriel Schneider2026-10-30
| | | | | | and first read or write in one flight, a new connection's version and attach before them: an operation through it is one round trip where it was six or seven (a directory, or a file of no stated length, two: 9P's only end is an empty read); a file whose stat gave its length is read ahead, its Treads 14 at a time; reads are timed by their progress, so a large remote file opens at 80 and 207 ms (1.3 MB timed out); a write refused unopened behind a truncating open that parked is sent again after it; Unmount lets the connection go; the CLI, --wait and Handover dial afresh, pipelined; reference.typ says how a session elsewhere mounts through ssh -L Co-Authored-By: Claude Opus 5.5 <[email protected]>
* the walker's digest: a blob's hash made once and folded in as a word (a 100 ↵Gabriel Schneider2026-10-30
| | | | | | | | | | MB file was 5 ms a digest, two a unit, on the authority); blob fields annotated `.blob`, which the rollback copy's pins read too walk.zig: a field named in a type's `replica.blob` (a file's text, line index and location rows, an undo snapshot's text, a register's values and joined text, the rows an edit dropped, a query's saved rows) holds immutable blobs. A digest hashes one of 4 KiB or more once, keeps the word by its address and length, and folds the length and word in; `forget` drops the word, from memory.freeRaw and freeUnfilled, through which every such blob is freed raw. Only a Debug build (the tests, the harness, replay) hashes the bytes at every digest all the same and panics where the kept word is not their hash: a blob written in place, or freed past its word. A release build, ReleaseSafe the user's own as well as ReleaseFast, takes the word and never panics on a stale one: at worst a divergence, which a replica records and then stops at (nothing resets or rejoins it yet; the notes say so). File.zig: an edit's free of the old text went to `rawFree` itself and so kept its word; the next text of the same length at the same address folded in the old one (the ReleaseFast harness diverged in 162 of 180 replica runs, in `file.content`), and it goes through freeUnfilled now. Registers.zig: `put` makes a new values array rather than writing the old one. rollback.zig: the copy pins what `.blob` names (`pinned` and `pinnedDeep` gone). Measured, ReleaseFast on the perf cores: with a 100 MB file open (PARDES_DIGEST_BENCH=100, replica.zig's bench), a unit of a key into it went from p50 10.45 ms, p99 41.6 ms to p50 24 us, p99 6.1 ms (the first, which makes the word), a digest from 5.18 ms to 10 us. The harness (20 seeds x 120 inputs x 3 clients): rollback p99 9.5 -> 2.6 ms at 30 ms (1.5 and 1.4 ms at 80 and 207), copy p99 0.27 ms; none diverged, none unequal, no delta wrong. Tests: a blob hashed once, its kept word no longer its hash once written in place, its word gone when freed. docs/next-daemon.md: the follow-up. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* views and the rollback copy: a live view's slot keeps no pointer into what ↵Gabriel Schneider2026-10-29
| | | | | | | | | | the live core owns; a register's texts and a file's location rows are pinned, not copied views.zig: when a view goes live (to, close, drawOthers putting the live one back, only), its parked share is emptied (`emptied`): it was left holding copies of the pointers it handed the live fields (a column tag's text, a chord's argument, the presentation's), stale until it parked again. The rollback copy walks every slot: a stale pointer whose memory the live view had freed and another taken saved that other's bytes and put them back. A pane's share holds no pointer but its selections, which `unpark` already hands over. The test fails without it: a tag's text freed under view 0's stale slot, its memory taken by an allocation the copy has no business with, written under a held copy, and the copy put back. Registers.zig, locations.zig, rollback.zig: a register's values and joined text, and a file's location rows (the dropped ones, a query's saved), are replaced whole and never written, so the copy pins them as it does a file's text, freed raw (a safe build's free would write over one a copy still holds); rows pin whole with what each owns (`pinnedDeep`). In the harness at 30 ms the big copies were a file's location rows, 5-6 MB after the flood, not the register. ReleaseFast, 20 seeds, three clients, p99: copy 5.1 -> 0.22 ms at 30 ms (0.19-0.20 at 80 and 207); rollback 14.9 -> 9.5 ms at 30 ms (1.3-1.4 at 80 and 207), what is left being the replay's digests (half the harness's CPU is Wyhash over the whole core per replayed unit). Tests: a 2 MB register and 500 location rows pinned, not saved, and whole after a speculation drops them and the copy is put back. docs/next-daemon.md: the follow-ups. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: phase 6's upgrade by re-exec: the decisions at its ↵Gabriel Schneider2026-10-29
| | | | | | forks, what was found, the gates here and on the FreeBSD box, the startup A/B, and what is not done Co-Authored-By: Claude Opus 5.5 <[email protected]>
* upgrade: the Upgrade word (SPC s U, a tag, 9P) moves a running session onto ↵Gabriel Schneider2026-10-29
| | | | | | the pardes installed where it started, in place, by exec at a step boundary: its dump in the DumpDir, its pty masters, terminals, stubs and daemon link kept open and named on the new command line, every view and running shell its own again; the daemon re-execs too, its registry on its command line; a build that cannot load the dump falls back to the old binary, or starts afresh with the shells adopted and the dump kept (test/daemon.py --upgrade, --upgrade --gui) Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: Phase 5 part B terminal notes: what crosses and where ↵Gabriel Schneider2026-10-29
| | | | | | | | in the stream, the authority's steps batched, deltas in flight against the version last sent, the replica's terminal the authority's to the row, what a step reads sent before it, and the numbers ReleaseFast, 20 seeds of three clients at 30, 80 and 207 ms, the shell running a TUI, a session with clears and 8 MB of yes: no divergence, every terminal the authority's at quiescence and 23,508 deltas each the authority's screen at its version (and with a filled heap). Under the flood 72-76 deltas a second a replica (one in flight would be 4.8 at 207 ms), 10 KB/s of deltas and 101 KB/s of units a peer, encode a frame 15-16 us at three peers and 13-15 at one, apply 34-37 us p50. Bench 200x60: yes 65 KB/s a peer, apply 65-72 us (was 2.4 ms); varied text 356 KB/s, apply 0.47-0.49 ms. Local A/B against main within its runs; against base page-down and wheel are main's since. What is not done: kitty images, the units' bytes under a flood, the first text-mode step after a flood sending its history, a stale view slot the rollback copy follows (part A's), echo prediction. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: phase 2 on main with views and phase 5 part A: a slice ↵Gabriel Schneider2026-10-29
| | | | | | a len cuts, the drawn views' selections, and the gates again Co-Authored-By: Claude Opus 5.5 <[email protected]>
* dump: savePane puts back only the fields it changes, not a copy of the whole ↵Gabriel Schneider2026-10-29
| | | | | | 88 KB pane, and makes its empty undo history only for a slim record; the notes say what the small close after a big one measures Co-Authored-By: Claude Opus 5.5 <[email protected]>
* dump: a session's dump keeps every view, the ones not live parked again by ↵Gabriel Schneider2026-10-29
| | | | | | load; a session revived for one client is its live view alone, as view 0 Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: phase 2's upgrade (what a user loses: ZON dumps; the ↵Gabriel Schneider2026-10-29
| | | | | | store checked on a copy of a real one), the web shell, and the closes measured again Co-Authored-By: Claude Opus 5.5 <[email protected]>
* web: the browser shell builds again and loads a dump of a native build: a ↵Gabriel Schneider2026-10-29
| | | | | | | | | | theme by its name, a field compiled out passed over, no disk asked; touch.dump replaces the hand-written ZON fixture Fixed for wasm32-freestanding: counts as usize, no threads, stb_image, tape or host stat there. touch.mjs follows the renderer's 13 tag-layer fields, helix's retuned colours and the tag column. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: phase 2's gates and measurementsGabriel Schneider2026-10-29
| | | | Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: phase 2 notes (the walker dump, crossing builds, load ↵Gabriel Schneider2026-10-29
| | | | | | and revive, what the design missed); the GUI's Restore test keeps the dump's serial Co-Authored-By: Claude Opus 5.5 <[email protected]>
* dump: one walker dump of the whole session, by name across builds, for ↵Gabriel Schneider2026-10-29
| | | | | | | | | | | Restore, -l, Handover and the store; dump.zig's hand-written schema gone A dump is walk.zig's walk of the core with a table of every type it reaches (fields, enum and union names, number widths), read back by name; terminals are ghostty's snapshot (screens, history, kitty images); a failed load frees what it made. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* pdf: Esc in a PDF pane drops the selection or the search highlights the page ↵Gabriel Schneider2026-10-29
| | | | | | shows, and with none goes back a pane as Esc does everywhere else; Shift-Esc still goes at once Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: Phase 5 part A notes: the copy put back where it was, ↵Gabriel Schneider2026-10-29
| | | | | | | | speculation checked against the authority's tape, each client in its own view, what release builds read unwritten, and the numbers Three clients typing 100 inputs a seed at 30, 80 and 207 ms RTT, a view each: no divergence and every replica on the authority's digest at quiescence (Debug 12 seeds, ReleaseFast with a filled heap 20, ReleaseFast timed 20, and 20 in one shared view). ReleaseFast, p50/p99: a speculative apply 35-54/168-183 us, a copy (1.3 MB) 75-94/198-447 us, a rollback 342-569/818-1561 us, the worst a tenth of a frame; rollbacks per input 31%, 76% and 129%, nearly all for another client's unit first, which views do not change (they change what a rollback shows); 2-7% mispredictions, every one a message's HH:MM:SS read in another second. rollback-bench: a typical session's copy 980 KB in 0.044 ms, put back in 0.036; a big one's 1.49 MB in 0.071, 0.051. What proved wrong (a 100 KB copy, rare mispredictions), what is not done (transport, the view's events at once, echo prediction, a single-threaded epoch), and fs.py's mounted-startup hang still on main, shown with main's own binary. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: Phase 5 groundwork notes: the replica socket's ↵Gabriel Schneider2026-10-29
| | | | | | | | decisions, the round trips locally, through the relay and to FreeBSD, and open points 3 and 5 decided (walker copy for rollback and for join, no fork) A ping through `ssh -L` to a session on the FreeBSD box costs its RTT (median 205 to 210 ms against a TCP connect's 206 to 208) and a hello two (411 to 476 ms: ssh confirms the channel before it forwards a byte); through the relay at 30, 80 and 207 ms they are the RTT plus 0.3 ms. A rollback copy is about 80 KB (typical) or 96 KB (big) once file texts and undo snapshots are pinned, 0.02 to 0.045 ms; a fork of 1 GB stalls the authority 13 to 20 ms here and 20 on FreeBSD, and every page it writes while the child lives costs ~1.3 us more, so a join takes the same walker copy and a worker streams it. The tty A/B against phase 1's tip is within its A/A runs. Still open marks points 3 and 5 decided. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* the replica socket: the daemon listens on pardes-replica.sock, a stream `ssh ↵Gabriel Schneider2026-10-29
| | | | | | | | | | | | -L` can forward, refuses another build's hello in words and hands the connection to its session, which welcomes it and answers pings The daemon binds `pardes-replica.sock` beside its own (SOCK_STREAM, so ssh can forward it; the SEQPACKET socket that carries fds stays local) once it holds its lock. A replica's first message is a hello (detached/wire.zig, now version 14): the protocol version at offset 0, the client's semantics hash and the session's name. The daemon reads exactly that much and no further, so whatever the client sends next is the session's, keeps up to 16 hellos still on their way (ponytail: one that never comes holds its slot until it hangs up), and refuses in words another protocol, a session nobody has, or another build: every session now says its own hash in its registration (daemon protocol 2), so a mismatch never reaches it. An accepted connection goes to the session over its link (SCM_RIGHTS) and the daemon keeps no copy; the session welcomes it with its pid and name on a thread of its own and answers each ping with a pong, until bye or a hangup. ponytail: that stub is all a session does with a replica until phase 5 proper; it is what times a round trip through the handoff and `ssh -L`. The semantics hash (wire.semantics) is phase 1's undone item: the protocol, the release and commit, the platform, the build options, every dependency the manifest pins by its content hash (grammars, ghostty, the Unicode tables: build.zig's new `deps` option) and the walker codec's assumptions (pointer width, byte order). Not the OS: a Linux client of a FreeBSD session is the main case. ponytail: an unstamped build has no commit, so two dev trees of one release with the same options are not told apart. `pardes --version` prints it on a second line. The hello lost its grid (a replica's view takes a resize like any other input). test/daemon.py: a hello of this build welcomed by the session itself (its pid, one fd more in the session and none in the daemon, and back once it hangs up), 50 pings, another build's hello and an unknown session's refused, and `--ping <socket> <session> <pardes> [n]`, which times a hello and n pings on any replica socket (a forwarded one, say). Co-Authored-By: Claude Opus 5.5 <[email protected]>
* views: a terminal shown in a view shorter than it is passed down to its ↵Gabriel Schneider2026-10-29
| | | | | | | | | | | | cursor, a shell's prompt never out of sight, an arrow in the gutter where rows are above; a name drafted in a tag is the view's that opened it A terminal takes the size of the view that typed into it last; a shorter view used to show its top rows, the prompt below them cut. It now passes over as many as keep the cursor's row in sight, as tmux pans a bigger window in a smaller client: `Pane.pan` (per view, derived) is made in the step's sync and again when a view is drawn out of turn (views.unpark), by terminal.panFor (0 in the view that sizes it, in one tall enough, or folded), and read where the body's rows start: `Pane.scroll`, the body walk in tty mode, the visible cursor. One view never pans: the view that sizes a terminal returns 0 at its first test. A `.name` prompt (a file's name drafted in its tag) is the view's that opened it (`Pane.prompt_view`): another view's step, where that pane has not the keyboard, no longer drops it; its view closing does. views-pan.snap: a shell sized for a 24-row view, its last lines and prompt in a 12-row one under the arrow, then typed into from the short view and sized for it. A unit test: the short view's frame has the cursor's row, and the line on it, inside the pane. docs: the notes, the reference. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: phase 4's gates and perf (every cell inside its A/A), ↵Gabriel Schneider2026-10-29
| | | | | | and what is not done; ponytail marks for the shortcuts left (a paste shared by every terminal, a second window's hit test, one display density per process) Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs: views in the guide and reference (a session attached already takes ↵Gabriel Schneider2026-10-29
| | | | | | another view, up to four; Detach lets one go); phase 4 notes in docs/next-daemon.md; tty: Screen.hungUp reads a test terminal's fd as the test build has it Co-Authored-By: Claude Opus 5.5 <[email protected]>
* screen_state.zig: a terminal crosses to a replica as its screen's state, ↵Gabriel Schneider2026-10-29
| | | | | | ghostty's own records by content address, a delta a screen of row hashes and the blobs the peer lacks, history fetched by absolute row Co-Authored-By: Claude Opus 5.5 <[email protected]>
* tty: a flooded pane's output is drawn a frame a tick at most, two of its ↵Gabriel Schneider2026-10-29
| | | | | | reads queued at most, so it costs no frame a 4 KB read and holds no key or echo behind it Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: Phase 1 notes: the forks decided, what the census ↵Gabriel Schneider2026-10-29
| | | | | | | | | | | | | | | missed, what is deferred, and the gate's numbers How the tape and the walker came out (a tree at the host boundary, the replay a mode of the same binary, three replicas, digests per field), the annotations the walker needed (`len` besides local, derived and authority), the render-time writes moved into the step, the clock and host facts taped, the unit tests that had passed on a stale frame, and the two per-frame costs the A/B found and that are gone (the geometry key fed field by field, the paint-ahead worker started inside the render). The gate's numbers close it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* daemon.zig: a forked session takes its stub's death, a SIGKILL too, as the ↵Gabriel Schneider2026-10-29
| | | | | | | | | | | | | | | | | | terminal's HUP and detaches PR_SET_PDEATHSIG (FreeBSD: PROC_PDEATHSIG_CTL) in the session child, cleared again at Detach so the stub's own exit then is no hangup; a stub dead before it was set hangs up at once. It is the HUP the signal thread already takes (blocked in every thread, sigwaited), and setsid does not touch it. An --attach stub is no parent of its session: one killed so still leaves the session drawing until the terminal closes or Detach. test/daemon.py kills a session's stub outright under a shell that keeps the terminal (on FreeBSD the session leader's exit revokes it), waits for the session to put the terminal back and detach, and attaches it again; without the death signal it times out. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* test/fs.py: a new +Pager each run, its colours through the theme until ↵Gabriel Schneider2026-10-29
| | | | | | | | | | | | | | | Filter, SYSTEMD_PAGER read by the shell, and no pager of the caller's Since 046979b8 (committed 2026-10-22) `pardes -` makes a new +Pager for each paged text, one already there keeping its page, and maps its colours through the theme as a terminal's until Filter shows them as sent; the test still expected one +Pager refilled and the colour as given. coreutils 9.12's printenv quotes a value with a blank on a terminal, so the shell prints SYSTEMD_PAGER instead. And a session's shells no longer inherit the caller's pagers: a PAGER naming the user's own pardes-gui ran instead of the binary under test. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* 9p_io.zig: a session's liveness is a flock on its socket's .lock, not a ↵Gabriel Schneider2026-10-29
| | | | | | | | | | | | | | | | | | | connect, which FreeBSD refuses to a full listen queue as to a dead socket The owner holds `<socket>.lock` flocked from before it binds until after it unlinks (claim, release; the fatal-signal path unlinks it too). The startup sweep, the registry sweep, a registry entry's replacement and `taken` ask that lock: held is live, free is dead. They unlink only while holding it, so no new owner comes between the judging and the unlink, and two starters of one name are told apart by who took it. A socket with no lock, a pardes from before the locks, is still judged by a connect. The daemon's own start was already decided by its flock. The sweep test gains a live session whose socket refuses connects on every system (bound, not listening, its lock held) and a dead one's free lock, which goes with it; it passes on the FreeBSD box now. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: FreeBSD notes, for phase 5 (building, deploying and ↵Gabriel Schneider2026-10-29
| | | | | | running on the box, what differs there, what 207 ms costs) Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs: the daemon, Detach, --attach and Adopt; phase 3 notes in ↵Gabriel Schneider2026-10-29
| | | | | | | | docs/next-daemon.md building.typ's detached sessions are the daemon and its sessions; the guide, cheatsheet and reference say what Detach, a closing terminal, --attach of each kind and Adopt do, and that attaching from another machine waits for phase 5. docs/next-daemon.md records the forks taken (sessions register and are not the daemon's children, and why; how it starts; masters; Adopt as a word; the stub's signals and job control; --detach; the Attach word; the harness switch), the known gaps, and the termios trap. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* sessions register with the daemon: a terminal's session forked off its stub, ↵Gabriel Schneider2026-10-29
| | | | | | | | | | | | | | | | Detach and --attach in place for terminals and windows, pty masters kept, Adopt pardes in a terminal reaches (or starts) the daemon, opens /dev/tty and forks: the child is the session, in a session of its own (setsid), drawing on that terminal (tty.Term.fd, a raw vaxis Tty made from the fd); the parent stays as its stub, the job the shell waits on. Not the daemon spawning it from a passed fd, env and argv: the user's terminals each run in a 9ns user and mount namespace, which a session spawned by a per-user daemon would not share, and a fork costs one small process's page tables where the spawn cost an IPC and an exec. GUI windows and --detach sessions just register. tty: Detach (and a terminal's end: EOF, EIO, a hangup the stub passes on, taken on the signal thread) puts the terminal back, drops it and the stub's stdio, tells the stub (which ends, exit 0), and leaves the session running with nothing drawn (Host.watched), its messages on the clock and `size` its own. pardes --attach[=name] hands its terminal through the daemon; the session enters it as the first one, sized, queried and drawn whole, and that process is its stub until it leaves. A hangup never ends a kept session; TERM and INT do, telling the daemon so the shells go with it (one async-signal-safe send). gui: Detach closes the window (its swapchain or renderer) and keeps the device, atlas and pipelines; the loop sleeps on SDL's queue; pardes-gui --attach[=name] opens a window again. Closing a window still quits. --detach is a session started detached: the tty host with no terminal yet, the GUI with a hidden window closed at once. forkShell sends the daemon a dup of every master and the hosts tell it what they close, so a session killed outright leaves its shells running; the new Adopt word takes them in as terminal panes (the Tty word's pane, its spawn taking the pty, a 1x1 size then the pane's to make it redraw). The Attach word, which switched a session's own terminal to a detached session through the frames, goes, with its effect and request in the core. PARDES_DAEMON=off (the e2e harness's) runs a session as before. test/daemon.py: 50 detach/attach cycles at a level fd count with no stale socket, kill -9 and Adopt, and nothing left; --gui the same for a window. test/fs.py: a forked session's socket is found by its own pid, and a hangup leaves a kept session running. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: the daemon and multi-client design, argued 2026-10-29 ↵Gabriel Schneider2026-10-29
| | | | | | (deterministic replicated core, kakoune-style views, one daemon per user, phases) Co-Authored-By: Claude Opus 5.5 <[email protected]>