<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pardes.git/src/9p_io.zig, branch macos</title>
<subtitle>Pardes</subtitle>
<id>https://git.0x4200.cafe/pardes.git/atom?h=macos</id>
<link rel='self' href='https://git.0x4200.cafe/pardes.git/atom?h=macos'/>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/'/>
<updated>2026-10-30T14:03:58Z</updated>
<entry>
<title>9p_io: the parked-write test rests again until the client's release has landed before it reads the body: a write through an open is held (pane.zig batchFor) until the open is let go, and the client lets it go without waiting, so under load the test read the body truncated and the bytes not yet in (it failed on the first run of a loop beside builds, then 30 of 30)</title>
<updated>2026-10-30T14:03:58Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-10-30T14:03:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=c6fa3545cc7b500c0b2b1a754ff7d46abf1d3768'/>
<id>urn:sha1:c6fa3545cc7b500c0b2b1a754ff7d46abf1d3768</id>
<content type='text'>
Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>9p: a mount keeps its connection and sends each operation's walk, stat, open 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</title>
<updated>2026-10-30T03:57:20Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-10-30T03:01:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=79efd33ba0964796d4dc4653b68435755b35f834'/>
<id>urn:sha1:79efd33ba0964796d4dc4653b68435755b35f834</id>
<content type='text'>
Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>upgrade: the Upgrade word (SPC s U, a tag, 9P) moves a running session onto 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)</title>
<updated>2026-10-30T02:37:00Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-10-30T01:18:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=ddcfd860ef05c37f5536038d8828cc81c0c4125c'/>
<id>urn:sha1:ddcfd860ef05c37f5536038d8828cc81c0c4125c</id>
<content type='text'>
Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>9p_io.zig: the /os table is not swept while a request is out in a syscall, which made a walk of a directory just made answer ENOENT</title>
<updated>2026-10-29T17:27:42Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-10-29T17:27:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=46c3c5db5a9a32ec6c43ad23ba041126ead5bd07'/>
<id>urn:sha1:46c3c5db5a9a32ec6c43ad23ba041126ead5bd07</id>
<content type='text'>
The tty frame's tick sweeps the table with the turn, but the turn comes
back to the editor after a step of its own with a 9P request still out
in a stat: the entry that request's walk had just made, which no fid
named yet, was freed under it, and the next element looked up nothing.
That was fs.py's one-in-a-few `/os` listing failure; walks of a fresh
directory against file churn in the session's directory failed 144 in
2799, and none in 4440 after.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>9p_io.zig: a session's liveness is a flock on its socket's .lock, not a connect, which FreeBSD refuses to a full listen queue as to a dead socket</title>
<updated>2026-10-29T17:27:36Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-10-29T16:27:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=e9328a417ef82d72a73f5e3e7d182591616137de'/>
<id>urn:sha1:e9328a417ef82d72a73f5e3e7d182591616137de</id>
<content type='text'>
The owner holds `&lt;socket&gt;.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 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>FreeBSD: the tty pardes builds for it and runs there, terminals, 9P and the daemon included</title>
<updated>2026-10-29T16:11:16Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-10-29T15:32:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=6b89fed454fd56a3af4b576646538b45d3315146'/>
<id>urn:sha1:6b89fed454fd56a3af4b576646538b45d3315146</id>
<content type='text'>
Cross-compiled with -Dtarget=x86_64-freebsd.15.0 (15 ships libutil.so.10;
Zig's default 14.0 links .so.9) and run on the FreeBSD 15.1 box:
- 9p_io serves there: fstatat, not Linux's statx. madvise is Linux's.
- WINCH reaches the sigwait thread through a handler that does nothing:
  FreeBSD drops a signal ignored by default as it is sent.
- A dead terminal answers a write with ENXIO, which std does not expect: a
  Debug build traced it to stderr, that same terminal, and recursed until
  the stack ran out (a session whose ssh dropped hung). No tracing there.
- waitid's FreeBSD numbers and 64-bit id: a command pane's exit is seen.
- No /proc: a shell's directory and program by sysctl, ttyTaken by the
  foreground group, the foreground job's name by its program.
- File watching by FreeBSD 15's inotify.
- ghostty's kitty loader: off Linux a stat comes before a t=f open (a FIFO
  hung it); FreeBSD's shm_open refuses O_NONBLOCK.
- vaxis's test terminal has no read off Linux: no input thread for it.
- test-install: the test-build programs installed into &lt;prefix&gt;/test, to
  run where the build cannot.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>sessions register with the daemon: a terminal's session forked off its stub, Detach and --attach in place for terminals and windows, pty masters kept, Adopt</title>
<updated>2026-10-29T15:01:27Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-10-29T13:48:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=4ffe5c93b3087f245f5b57a822ab0ecf41cc085c'/>
<id>urn:sha1:4ffe5c93b3087f245f5b57a822ab0ecf41cc085c</id>
<content type='text'>
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 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Audit (misc): std mkdir -p and JSON escaping, a 9P late failure's errno from ctl.failureErrno, dead switches and dumpHex out</title>
<updated>2026-10-23T20:10:58Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-10-23T14:00:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=80314064f6e81c8828340e010202b446f0e1f36d'/>
<id>urn:sha1:80314064f6e81c8828340e010202b446f0e1f36d</id>
<content type='text'>
Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Audit (core, modal): goto/insert/select tables, edit through sam.Op and sam.apply, Turn.bump and awaitPast, dead helpers out</title>
<updated>2026-10-23T20:10:58Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-10-23T13:56:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=a0d367b6c54ff29737662fd7cf5a78d4d183cb20'/>
<id>urn:sha1:a0d367b6c54ff29737662fd7cf5a78d4d183cb20</id>
<content type='text'>
Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Callstack lists every caller and pages a tree too big for one query; memory bounds and resident-size fixes</title>
<updated>2026-10-23T20:10:58Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-10-23T20:10:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=0073d05329335dbb0eb85f5c3044e42805d144e5'/>
<id>urn:sha1:0073d05329335dbb0eb85f5c3044e42805d144e5</id>
<content type='text'>
Callstack walks while the server answers, counts on the message row past a
second, puts test callers last at each level, and ends a tree past one
query's memory (memory.limits.arena.lsp_query, a 256 MiB region taken and
given back per query) in a row whose Callstack shows the next page. Grep
reads whole files. New hard limits: undo text per file, image decode
pixels, the LSP snapshot of other open files, one paste. Safe builds no
longer fill worst-case buffers with 0xAA (memory.unfilled), big regions are
kept off transparent huge pages, and malloc_trim runs after big results.
Also: Look's git show pages into a +Diff, and dropped marks in File.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
