summaryrefslogtreecommitdiff
path: root/docs/next-daemon.md
Commit message (Collapse)AuthorAge
* docs/next-daemon.md: the remote-bugs log gains fix4, the kinds work's two (a ↵Gabriel Schneider7 days
| | | | | | | kind's open was the one call into a kind a replica guessed, now authority-only in Kind.reopen; a view's facts read Pane.notices, derived and undumped, so a joiner's kind was told other rows and the join diverged, now Messages.bands from dumped state), and restates the rule they broke Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* client #2, one frontend a session: the daemon answers `other <name>` for an ↵Gabriel Schneider11 days
| | | | | | | attach to a session attached already (as it did for one of the other kind), so a second `pardes --attach` or `pardes-gui --attach` on this machine is a replica client through the replica socket, the path a remote one takes; a session tells the daemon its clients (SO_PEERCRED on each replica socket, at every join and leave) and `--ps` lists `client <pid> <command>` under it; the tty's per-terminal Screens (Screen.create/drop/destroy, primary, its stub and Killed slot), the Poster and its `from` input, the Gui's window-fields swap (window_fields, GuiWindow, copyWindow, freshWindow, follow, route, openAnotherWindow, closeView, windowsOpen, closeOtherWindows, resumeWindows), drawOthers and every harness's extra terminals (snapshot.zig's `start ... views=N` and `view <k>`, e2e_harness's initView and drainOthers, PARDES_TEST_VIEWS in both frontends, the GUI feed's `view;<k>`, the monkey's --views) go; the pump draws the one view this process shows (views.shown), through drawOne when a client's input was the last; an Upgrade from a build that kept a second terminal of its own lets it go (its stub told it is detached) and closes its view; deleted: views.snap, views-term.snap and views-pan.snap with their goldens (the in-process second terminal they drove is gone; views.zig's unit tests keep the per-view cursor, layout, register, sizing, closing and panning behaviour, test/replicas.zig and the soak the views of clients); the two views.zig tests that drew through drawOthers draw through drawOne; daemon.py's second terminal is a client listed by --ps, typed into in both terminals, detached from inside and closed; its second window a client listed by --ps and closed; the reference and next-daemon.md say so; no golden changes; gates: core-test 956/956 both, behaviour-test 248/248 both, unit-test 1487/1488 tui and 1530/1531 gui, pane-test 171/172 both, snap all 102 ok, process-test 0 of 37 failed on both, hxdiff 19 and hxparity 6 mismatches (the base's names), hxgolf 0, replicas, addon-test, gui-golden and monkey-gui 0 of 1 failed, daemon.py main, --window-clients and --gui ok, soak local pass (differ, mispred, view_bad, lost 0) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* docs: step 6 of the architecture as it landed (next-daemon.md's notes on the ↵Gabriel Schneider11 days
| | | | | | | rollback and the digest through the journal): a replica's core writes its texts in place and its rollback writes back what a speculation wrote, a digest takes a blob of 4 KiB and up by its length, and what stays and why: the epoch and the copy's walk until the core's state is pointer-free, the join's pins and its stream (its writer reads texts after the step, and the journal cannot say what changed since a revision), and so the byte walker; the costs from the replicas harness and a join of a session with a 1.1 MB file before and after Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* rollback: a replica's core writes a file's text and its line index in place, ↵Gabriel Schneider11 days
| | | | | | | as the session's does, and its rollback copy keeps none of their bytes: the epoch notes what each write into a text or an index that was there when the copy was taken took out (rollback.Epoch.wrote, from File.edit and shiftIndex), and putting the copy back writes that back, the newest first, before the saved bytes go back (unwrite), where a replica's edit made a whole new text and a whole new index at every key so that the copy could pin the old ones; the bridge the journal left for this goes with it: rollback.isEpoch, File.keepsBytes (a text a join is still sending is copied on write as before, memory.isPinned), the replica's copy-on-write in File.edit and shiftIndex's `keep` (its in-place shift is File.shiftStarts, which the rollback runs turned round); the journal's steps, its `done` and its entries come back as the copy saved them, an entry a speculation merged into and the redo entries it dropped being saved bytes and put-off frees; File.State's content and line_starts are annotated `.journal`, which the copy neither saves nor pins (line_starts leaves `.blob`); a write that could not be noted (no memory) fails the replica at its rollback; tests: rollback.zig's 'a text written in place under a copy comes back byte for byte: typed into its room, undone, cut, and grown past it' is new, and File.zig's 'a line index shifted in place equals a rebuilt one' becomes '..., and the edit turned round gives the one before back' (its every tenth shift made anew, as a replica's core made them, gives way to the shift turned round in a copy, as a rollback makes it) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* rename: the terminal frontend is the tui (-Dplatform=tui, src/tui/tui.zig, ↵Gabriel Schneider12 days
| | | | | | | --tui with --tty kept as its old spelling, the process tests' backend .tui and --backend=tui, docs/typ/builtins-tui.json, the Settings report's platform), and the builtin Tty is Term (its registry entry, SPC n t, every default tag, the docs, tests and snap scripts), Tty still run as Term through exec.acme_words, Tty+fish too on a tag and a ctl; tty as a pane's raw mode and as the OS's terminal unchanged Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* docs/next-daemon.md: the query pane's two: a speculated Enter that panicked ↵Gabriel Schneider2026-10-31
| | | | | | in Query.land (a current item outliving its row: a frozen pane's rows edited, an Esc's `saved` of them), and a window joined from a dump making a `/` query's rows plain where its session had coloured them (a row's colours painted from the derived highlights and locations cache); the fixes, the tests, the gates and the seed-7 box soak with no rejoin Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: a window that joined late diverged at the next key that ↵Gabriel Schneider2026-10-31
| | | | | | moved another view's pane (`pane 23.file.scroll`: a pane's `view` was derived, never dumped, read before the step's sync, the default in a core loaded from a dump; the tty's `SPC t w` at 243 s, its lines unwrapped in the session and wrapped in the joiner), the fix, the test, a 120-seed exploration before and after; not this one: the box run's query-pane divergence (`location_rows`) and `Query.land`'s panic; the gates Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: the box soak's divergences and its clean quit: the ↵Gabriel Schneider2026-10-30
| | | | | | session that quit at its 1093rd input was asked to (window mode left open took `imike quebec `, `SPC q` in a tag); a FreeBSD session's +Help one row short of its Linux clients' (Tty9p a Linux build's word alone), the hunt's `pane 2.file.scroll` gone with it, before and after at seeds 32 and 41 on the box; a Debug replica of a release session at every Grep (Names' query buffer past its length); the gates Co-Authored-By: Claude Opus 5.5 <[email protected]>
* views: a client that joins again has its own view back, layout, focus and ↵Gabriel Schneider2026-10-30
| | | | | | the panes opened in it: an Upgrade's clients and one whose bye says it joins again (a divergence's, wire 19's `bye.again`) leave their view kept for them (`views_away`, digested and dumped, so an Upgrade's new build has it; taped `awayView`), the client names it in its next hello (`Hello.view`, handed on by the daemon with the connection) and its join takes it back (taped `rejoinView`) rather than a copy of the session's; the live view is never a kept one, `views.count` counts the others, and a join with every view taken lets one go (every Upgrade made each client's own panes leave its view: the hunt's 80 ms cell lost `+Search` and `+New`) Co-Authored-By: Claude Opus 5.5 <[email protected]>
* dump: a closed terminal brought back on a screen-state replica gets its ↵Gabriel Schneider2026-10-30
| | | | | | emulator on the C heap, as terminal.create makes one (terminal.emulatorGpa): loadPane named no `.terminal` allocator, so its emulator was the rollback epoch's, and its screen replica's blobs, made with State.gpa, were freed with the C heap's behind the epoch at a client's end and again by it (H21: `double free or corruption` in Epoch.deinit at a hangup, `free(): invalid pointer` at a rejoin), and a rollback freed what a delta under a held copy made of them Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: phase 6's instant interaction notes: what stopped each ↵Gabriel Schneider2026-10-30
| | | | | | input, counted by name; pardes's own steps over a terminal speculated (H14), its view moved here and put back on a rollback, applied again over each delta; a pane's teardown no stop; the echo's lost predictions waiting for their keys; the authority's yes or no guessed; an input's time its client's; mosh's rules checked; before and after per action class at 0/30/80/207 ms and through the box, the soak's blink, the replicas harness; what is left Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs/next-daemon.md: fix3: a +Search's rows recoloured in place (dropped_marks)Gabriel Schneider2026-10-30
| | | | Co-Authored-By: Claude Opus 5.5 <[email protected]>
* 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]>
* 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]>
* 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]>
* 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]>
* 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]>
* 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]>
* 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]>
* 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]>