<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pardes.git/src/Db.zig, branch main</title>
<subtitle>Pardes</subtitle>
<id>https://git.0x4200.cafe/pardes.git/atom?h=main</id>
<link rel='self' href='https://git.0x4200.cafe/pardes.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/'/>
<updated>2026-11-10T02:15:53Z</updated>
<entry>
<title>a session's end leaves a slim dump and History lists them, the tags gain Follow, History and the window's Fonts: every way out (Exit, the last pane's Del, the host's quit) runs Pardes.endSession, which puts a dump of the session in the state file under the usual label before quitting, slim by the dump's own means (dumpJoin's slim_terminals, and Store's slim-file swap now a Slim struct: no undo, a clean file's text read from its file again by revivePane, a terminal a size for a new shell), none for a session of shells alone; the dump's image carries the panes' names, which /dumps rows end with; the History builtin (SPC f h) lists the state file's dumps in a +History pane and a look at a row is a Restore of its label; the default tags: Follow after Collapse on text panes, History before Debug on the workspace row, Fonts after Themes in a window's view alone (tagline.topbarDefault picks the row per view; both rows are known defaults to the docs and tutor tests); the tty goldens re-recorded (the new words; a narrow pane's tag wraps to a second row, so its body rows shift), builtins JSON regenerated</title>
<updated>2026-11-10T02:15:53Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-10T02:15:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=0b4cfd4b416d03ef64ccd908dfee810c6a498569'/>
<id>urn:sha1:0b4cfd4b416d03ef64ccd908dfee810c6a498569</id>
<content type='text'>
Co-Authored-By: Claude Fable 5.1 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
</content>
</entry>
<entry>
<title>tests: at the end of their files: every top-level test block of the 46 files that had one mid-file (the locality analysis's 45 and test/hxdiff.zig; gui.zig, macos.zig, look, host_io, 9p_io, terminal, tui, mouse, fs, replica, layout among them, 11,429 test lines), with the functions only tests call, moved after the file's code in their order, a mechanical move (.scratch/suites/tests_to_end.py), zig fmt'd; the unit suites pass as before (tui 1486/1487, gui 1536/1537, core 956/956 on both), macos.zig only parse-checked here</title>
<updated>2026-11-09T04:28:28Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-09T03:52:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=5157579ff7f9ae0cfc3c7629e953da05bce340fc'/>
<id>urn:sha1:5157579ff7f9ae0cfc3c7629e953da05bce340fc</id>
<content type='text'>
Co-Authored-By: Claude Fable 5.1 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
</content>
</entry>
<entry>
<title>fix: Recent's one-time import from the files before the state file read nothing, and said nothing, for a directory whose path passed its room (a bufPrint caught to ""): a directory past max_path_bytes is said in the message, Recent: the files before the state file were not read: their directory's path is N bytes, too long; the import test gains such a window</title>
<updated>2026-11-09T00:48:19Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-08T23:52:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=76f1355649e81d5ab28c591461d07440d26902b0'/>
<id>urn:sha1:76f1355649e81d5ab28c591461d07440d26902b0</id>
<content type='text'>
Co-Authored-By: Claude Fable 5.1 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
</content>
</entry>
<entry>
<title>idioms #9, every catch unreachable this slice added is a fact of the code: each formats integers, literals, an error's name or a slice of a fixed array (the daemon's [128]u8 names, the cache's path_buf, main's cwd_buf, those two buffers now sized from their arrays), so all 39 stay, each with its reason on its own line</title>
<updated>2026-11-06T17:56:36Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-06T16:13:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=4917ae452a15ff4f32d97d215a99fdcfaab29d61'/>
<id>urn:sha1:4917ae452a15ff4f32d97d215a99fdcfaab29d61</id>
<content type='text'>
Co-Authored-By: Claude Fable 5.1 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
</content>
</entry>
<entry>
<title>idioms #5, more formats that cannot overflow: /proc paths of a pid, the daemon's pty, close and clients words, a pid or a serial for the environment, a capture's header and status line and a cache's .new name are catch unreachable with their reason, where a catch return, null or continue stood for an overflow no buffer here can have</title>
<updated>2026-11-06T17:56:36Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-06T15:38:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=dde4979f59bec754b7909a81a40763850f3c29c0'/>
<id>urn:sha1:dde4979f59bec754b7909a81a40763850f3c29c0</id>
<content type='text'>
Co-Authored-By: Claude Fable 5.1 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
</content>
</entry>
<entry>
<title>idioms #1, std.fs's deprecated aliases in the hosts: std.fs.path and std.fs.max_path_bytes are std.Io.Dir.path and std.Io.Dir.max_path_bytes in 0.17, so the hosts name them there</title>
<updated>2026-11-06T17:56:36Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-06T15:14:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=77671575bd2f481651ea54e956ac5c7da8d63710'/>
<id>urn:sha1:77671575bd2f481651ea54e956ac5c7da8d63710</id>
<content type='text'>
Co-Authored-By: Claude Fable 5.1 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
</content>
</entry>
<entry>
<title>state file, a torn one mended: a power loss inside the writeback window after Recent's commit (not fsynced) can leave its root header on disk and its bytes not, and xitdb then refuses the file, which pardes set aside as `pardes.xitdb.broken` with every dump in it, whole but unreached; now the open scans back from the file's end for the last commit whose trailer verifies (its CRC-64 over the file id and its own place, its root a map written before it) and whose maps read whole, puts the root header back at it under the file's lock and opens the file there (src/Db.zig `mend`, xitdb's layout read by hand, xitdb itself checking the result), so the Recent's change or two after it are lost and the dumps before it are not; the file is set aside only when no commit is whole, its bytes as they were; on a 105 MB state file (Debug) a whole one opens in 78-93 us, one torn in Recent's last commit after a Dump in 5.0-5.5 ms, and one with no commit whole, scanned to its start, in 429-438 ms before it is set aside; tests: Db.zig's 'one a power loss tore is opened at its last whole commit, the dumps before it kept; it is set aside only when none is whole' is new (a file cut short in its last commit, one with garbage after its last commit and its root header pointing into it, one torn in Recent's commit after a Dump: the Dump read back and loaded each time, its text with it, Recent's change kept or gone as the tear says; one with no commit whole set aside byte for byte), and fails with the mend switched off</title>
<updated>2026-11-05T22:36:48Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-05T22:36:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=992d5b1aa2813fcba05d8564872f8d426eade9f6'/>
<id>urn:sha1:992d5b1aa2813fcba05d8564872f8d426eade9f6</id>
<content type='text'>
Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
</content>
</entry>
<entry>
<title>blob cache: the trim keeps the most recently used texts that fit under the cap, the newest first, and lets the rest go, where it let the least recently used go until the rest was under it: a text past the cap alone (a big file's, edited since the client joined) took every older one with it, the small ones that fit too, so a client after it with that cap was sent them all again (daemon.py's far clients E and F at a 1 MiB cap: F found nothing on disk, the 6.5 KB notes gone with the 1.1 MB file's texts; now the notes stay); tests: replica.zig's 'the blob cache stays under its cap, the least recently used going first, the file compacted' becomes '... going first and one past the cap alone without them, the file compacted', a 20 KB text past its 15 KB cap put newest, gone, and the three older ones kept</title>
<updated>2026-11-05T22:16:37Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-05T19:15:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=60caa16b99c60713c5ae27832d76809a2b4a2d5a'/>
<id>urn:sha1:60caa16b99c60713c5ae27832d76809a2b4a2d5a</id>
<content type='text'>
Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
</content>
</entry>
<entry>
<title>migration: a state file that holds no Recent yet reads it once from the files before it, 0.24's $XDG_STATE_HOME/pardes/recent (merged as another session's commit is), else the `store` before that (its `@r` records, the oldest first, as W4's one-time read did), and leaves both where they are (Options.recent_import names their directory, set by main.zig alone, so no test reads the user's); an old `.dump` file, the byte dump, stays readable for one release: `-l &lt;path&gt;` and `Restore &lt;path&gt;` read it, told from an image by its first bytes rather than by its name (the snapshot and process harnesses' dumps are `.dump.zon` files, and a renamed file is the same file), and an Upgrade from the build before, whose record names its `.dump` file and no label, loads it and deletes it as before, so the next Upgrade commits to the state file; tests: Db.zig's 'Recent is read once from the file it replaced, else from the store before that, both left where they are' (in place of W4's 'the store Recent's file replaced is read once, its newest records first, over the file's list'), dump.zig's 'an old dump's file, a byte dump, is read by -l and by a Restore of its path, for one release', and upgrade.zig's 'an upgrade from the build before reads the dump file its record names, and deletes it once loaded'</title>
<updated>2026-11-05T22:16:37Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-05T18:39:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=cd712084c68b9e2bad350066a92a96ce78a9ff35'/>
<id>urn:sha1:cd712084c68b9e2bad350066a92a96ce78a9ff35</id>
<content type='text'>
Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
</content>
</entry>
<entry>
<title>blob cache: a far client's blobs are kept in `cache.xitdb` (src/Db.zig's Cache, in $XDG_CACHE_HOME/pardes, else ~/.cache/pardes), a file of its own and never the state file (expendable, and up to a gigabyte): `blobs/&lt;hash&gt;` the texts, `seqs/&lt;hash&gt;` and `seen` (a sorted map, a number to its hash, the least recently used first) their order, `size` and `next`; a join's blobs are put in one transaction by the client's storing thread, with those it found there made the most recently used (a hit takes a new number), and at the client's end what it made since is put and the cache trimmed: past the cap (PARDES_BLOB_CACHE_MB, 1 GiB) the oldest go in one transaction and the file is compacted into `cache.xitdb.new` and renamed over it, where a directory of files was scanned, sorted and deleted from at each join; each use opens the file for itself (a database a thread, as xitdb asks), a text read back is hashed again (one kept wrong is a miss, and goes), and a file that is no database is started afresh; replica.zig's Cache (its directory, the hex names, put by rename, trim by scan) goes for Db.Cache; tests: replica.zig's 'a cached blob is hashed again as it is read: one cut short, corrupted, planted or longer is a miss, and goes' and 'the blob cache stays under its cap, the least recently used going first' are rewritten for the file (texts kept wrong under a hash through put, the order made by hits, and the file seen compacted), 'a blob cache that is no database is started afresh' is new, the far join test keeps its biggest blob wrong through the cache rather than a file, and daemon.py's far clients read the cache file's size, cut it short by hand where they corrupted files, and check the cap after a client's end where they planted junk files</title>
<updated>2026-11-05T22:16:37Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-05T18:20:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=1eae252b80ddab0a06574de700b6b2957d3b64fc'/>
<id>urn:sha1:1eae252b80ddab0a06574de700b6b2957d3b64fc</id>
<content type='text'>
Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
</content>
</entry>
</feed>
