# Loose ends What is known to be wrong, unfinished or decided and not built, as of 2026-11-24, written down so that none of it has to be found twice. Nothing here blocks daily use; each entry says where it was seen and what is known. An entry leaves this file in the change that settles it. The work stopped on 2026-11-24 with nothing running and nothing half done: what was begun and not merged is whole on a bookmark, named in "Work on bookmarks, not merged" below. Nothing of it is pushed. ## Work on bookmarks, not merged - **Client connections** (`pardes-links-4`, wire 36). A link's lifecycle as one state on both ends; a refusal and a link's last word carry a code beside their words (`wire.Told`), which a client acts on; an Upgrade and a Restore carry their clients' links across, so a client is not cut and joined again; a pair's session keeps a client's view across an Upgrade; the fix of Restore on a release build (below). Its gate was stopped part way: on the tip the Debug suites, process-test by both roads (0 of 146 failed) and six soaks (three plain, three as a pair) were green; the ReleaseSafe suites, the window rows, the upgrade rows and the frame gate were NOT run on the tip. `pardes-merge71-ungated` is that line merged onto `main` with its two conflicts resolved (the wire's number, the test's): never built, never run. To land it: a whole gate of the merge. - **The pair as the default frontend** (`pardes-pair-14`, on the build before this one: to merge again). A window as a pair (a session and its client in two processes) by default, the own path kept. Not ready by its own bar: a client's key cost 12% more than the own path's (8.48M against 7.57M instructions) measured on a loaded machine, the bar is 5%: what is left of it is frames presented, to count on a quiet machine; and a Restore as a pair passed 8 runs of 10. ## Faults known, not fixed - **Restore on a release build fails one process test.** `process-test` on ReleaseSafe, the root-ctl case "Restore asks once about unsaved text, is answered before it cuts every connection": the request is answered `Refused`. A request on a connection the Restore is cutting gets an error in the 200 ms cut window (runtime/9p_io.zig `onServe`). Debug passes, which is why every gate missed it until the release row was added. A fix is written on the client-connection line (`pardes-links-4`: a connection being cut is hung up, never answered with a refusal), not merged. - **A damaged session image can panic the database reader.** The dump fuzz's image road reaches xitdb's own reader (`switch on corrupt value` in `HashMap.init`, `readBytesObjectAlloc`, from core `Db.Read`) past its fixed seeds. pardes's own decoders refuse a damaged dump naming the field; this one is the dependency's. It wants an Edit in build/patches.zig and a report beside the other dependency reports. - **A client that replays after it diverged can overflow an integer.** `Core.advanceInner` (`due - p.clock.stepped_ns`): seen only by the soak's witness replaying a client that had already parted. A client that diverges is dropped and joins again, so a user does not reach it today. - **A detached session loses the words of an Upgrade that could not load.** With no frontend of its own, "no build could load" is shown to nobody; it should reach the log and the next client. - **After an Upgrade a window says the pointer is inside.** `/status` read "pointer in" in two windows right after their exec with the pointer in neither (2026-11-24); one went back to "out" by itself. - **A client left once across a build whose wire number differed.** Seen once on the client-connection line, not reproduced. - **In a terminal client a column's border did not drag** by B1 on the second column's tag gutter (measured while testing several clients). Whether a terminal has another handle for it was not looked at. - **A file's markdown tables are cached without the tab's width.** `Tables.current`'s key does not hold it, as the geometry's did not until the view's scroll by rows was fixed: after `Tab` changes, a table's widths can be the old ones until the text changes. ## Decided, not built - **A pane opens in the view that asked for it** (ruled 2026-11-24). Today an open with no view of its own (9P's `/pane/new` and a `look`, `pardes FILE` typed in a terminal pane) lands in the session window's view whatever client asked: a window's session makes its own view the live one on every event, a wake among them. The ruling: from a terminal pane, the view that typed there last; with no pane of origin, the view of the last input, in a window's session and a terminal's alike. - **A terminal's size is the smallest of the views showing it** (ruled 2026-11-24: tmux's rule). Today the view that typed last sizes it: a narrower view sees its rows cut with no mark, a shorter one is panned to the cursor, a larger one shows blanks. The ruling: columns and rows are each the minimum over the views that show the pane; the sizing by the last typist, the cut and the pan (`Pane.pan`) go. It changes the dump and the wire's number. - **An addon's panic closes only its pane** (ruled 2026-11-24). Today an addon's panic is pardes's panic: a crash record is written, the terminal is put back, and the session ends. The ruling: the pane of the addon that panicked is closed with its words in the log, the session goes on. - **A client's send queue bounded by back-pressure.** The session writes no more than a window W past what the client has read and queues the rest; a client is cut to a fresh dump only when the queue also passes W. Designed with a draft on the client-connection line; today a far client under a flood is cut by the older lag rule, which works. - **The 200 ms flush before a link is dropped** becomes a wait that each writer's end wakes, and every other time bound gets one line saying why real time is right there. Designed, not built. - **More than four views a session.** A fifth view is refused (the session's own and three clients, or four clients of a detached one). Measured: a view is 130 KB; eight views is one literal (`views.max`), 522 KB more a core and a digest 61% slower with every view open; sixteen also needs the views' masks widened to u16. - **Help wraps mid-word.** It waits on wrapping at word boundaries, which no pane has yet. - **A pane's rectangle inside its column, checked at a load.** A view's rectangles off its screen are refused; this narrower check is not built because a pane placed and not yet laid out has an empty rectangle inside a step, and a dump is written inside a step. ## Prices accepted (to turn if they are felt) - A view's scroll by rows: selecting deep into one 2 MB line costs about 75% more a frame (it draws the rows the selection is on; the old view did not show them). Every ordinary key, wheel, page and edit: no dearer. - The same change costs `body-appends` 0.11% more an operation (the tab's width is a word more in the geometry's key: 29 to hash for 28); packing it beside the scroll row's word would give it back. - One terminal cell of the performance table is 0.14% to 0.16% over its old count since the change layers; the baseline was recorded again. ## The structural queue Three pieces of organization meant to make whole kinds of fault impossible to write, each to start with a read-only survey and a plan: a client's lifecycle as one state with codes on the wire and every time bound named; what a field of the core costs (the digest, the dump and the copy declared together); the test harness (the Python daemon tests moved to the Zig runner, mode by mode). Three questions go with it: the terminal boundary enforced by type or by a counted list; the codes' names; whether the Python harness goes entirely. ## Tests and gates - The frame and performance gate against the recorded baseline (`tree7`) now fails by what was accepted: one frame of 77 (frame 76) and eight cells of 121 (`deep-sel`, `body-appends` on a long line). A baseline recorded on this tree clears it. - `test/daemon.py --client-resize-real` is skipped where the window build's prefix holds no `pdf.so` (a Debug gate's does not). - The gui `unit-test` step exits 1 with every test passing: its performance check reports a baseline recorded by another harness. A baseline recorded with the current one clears it. - `test/daemon.py --upgrade --gui` assumes `wayland-0` when `WAYLAND_DISPLAY` is unset; it should find the compositor's socket. - `test/daemon.py --window-clients` skips its PDF case when the terminal build's prefix holds no `pdf.so`.