zit 0.1.3 is a serving release over 0.1.2. It keeps the same Fossil RFC revision-00 scope. Where 0.1.2 made a repository of real size and history cloneable, 0.1.3 makes serving one fast and lean: a large repository now comes up for serving immediately and holds a fraction of the memory it used to.
Highlights
- A server against a large repository comes up immediately. The listener opens before the repository is read, so a client connects and waits in the accept backlog while the server primes, rather than being refused during a startup that a large store made long.
- A push no longer stalls inside its own reply deadline. The snapshot rebuild a push triggers now happens between connections instead of on the request that caused it.
- Serving reads the repository through an on-demand index rather than a resident copy. Peak memory to serve a 67,499-artifact repository fell from about 157 MB to about 32 MB, with clones byte-identical to before.
Coming up for serving
Serving primed an in-memory snapshot of the whole repository before opening the listener socket. That prime is proportional to the store, so past a few tens of thousands of artifacts it outran the client's readiness probe and the client reported that the server never came up — the store could be served, just never reached in time.
The bring-up is reordered: bind the listener first, announce it, then prime, then accept. A connection that arrives during the prime queues in the kernel accept backlog and is answered once the prime completes, so the readiness window starts at the bind rather than after the read. The per-connection deadline is armed only on accept, so priming is never charged to a client's budget. On a 254,469-artifact repository a connection is accepted within milliseconds of the server starting, against a prime measured in seconds.
A push made the served snapshot stale, and the rebuild used to run inside the pushing round's own reply deadline — an O(store) rebuild charged to the request that caused it, which on a large store could exceed the deadline and drop the connection for a push that had actually landed. The rebuild now runs from a maintenance hook between connections, with no connection open to charge it to.
Serving through an index, not a copy
Priming copied every artifact's stored container out of the append-only log into an in-memory store and held them there for the server's lifetime. The log had already been scanned and every frame checksum-verified to build the record table, so the copy was a second full read whose only product was resident bytes.
The served snapshot is now a log-backed store: an index of content hash to log location, with container bytes read from the log on demand as a round emits them and released after the round. Persisted order is preserved so a clone streams correctly, and a read fault after the initial scan is reported as a server storage error so a clone is never silently truncated. Measured on a 67,499-artifact repository in ReleaseSafe, a clone taken from the indexed server materialises all 983 files of the trunk check-in byte-identical to a clone from the previous copy-based server, while peak resident memory to serve fell from about 157 MB to about 32 MB.
Also in this release
- The end-to-end test suite is safe to run concurrently with itself: every test server now draws a fresh loopback port from the kernel and waits for it to accept, rather than binding fixed ports that collided under parallel runs.
- The rule that lets repository-state assembly tolerate a stored artifact it cannot classify — when the artifact's bytes verify against the name it is stored under — is now covered by the deterministic simulation harness and by an end-to-end scenario, not only by unit tests.
Qualification
Each published native binary is built from the same checksum-pinned source archive with Zig 0.16.0 in ReleaseSafe mode. The platform battery comprises:
- formatting and native build;
- the complete unit and end-to-end suites;
- deterministic simulation, seed 1 for 1,000 steps;
- all 27 fuzz targets, seed 1 for 100 rounds each; and
- Fossil 2.28 interoperability runs covering scenarios S1-S8.
The release manifest records the exact artifact checksums, the source identity, and the qualification performed for each target.
Compatibility
The command-line version string is:
zit 0.1.3 (targets Fossil RFC rev 00)
The feature scope and deliberate limitations remain those documented for 0.1.0. No repository written by 0.1.2 needs conversion.