the service line
devlog 014 ended with "zat lives there" — there being the layer below product taste, the relays and indexers and verifiers that move bytes and decide what deserves trust. that was june 30th, and it was a thesis.
eight days later, stream got its first commit. between that entry and this one, the thesis got a body: a zig port of jetstream v2 — the archive-bearing design from @calabro.io & team at bluesky — built on zat, bootstrapped across the whole network, and now serving tens of billions of events at stream.waow.tech with sealed segments back to its first sequence. it is held to the upstream repo by a differential oracle that drives the upstream team's own client against it on every admission run. on august 13th bluesky launched Protocol Services and jetstream v2 became a public contract; the waypoint moved to the release tag the same evening, the one server-side delta ported and gated before midnight. that same-day re-pin, refereed by the released client, is what port discipline is for.
so this entry covers six weeks, four zat releases, and one architectural split. but the thing actually worth writing down is what the archive does to the consumers.
DVR for the firehose
jetstream has always been radio. tune in and you hear the network; miss an hour and that hour is gone — cursor replay reaches back a day or so, and past that, nothing. every consumer built against radio inherits the same obligation: be always-on, or be wrong. a crashed listener is a gap in your state forever. a new consumer starts from nothing. history is someone else's problem.
the archive turns radio into DVR, and the part that changed this month is
that seeking got too cheap to meter. planSnapshot takes collections,
DIDs, kinds, and a sequence window, and prunes the plan to just the
blocks that can match — a two-hour window of one sparse collection plans
~25 blocks, a few megabytes. replaying a specific streamplace broadcast's
chat from three days ago: 39 seconds end-to-end, archive pass plus live
cutover, in the SDK example.
rewind, replay, catch up to live, keep listening — one seam, at-least-once
across it, dedup by seq.
that quietly deletes the always-on obligation, and with it a whole class of consumer architecture:
- a tally-keeper like pollz doesn't have to trust a count it accumulated while hoping it never missed a vote — it can recompute from the poll's creation seq, any time, and the live tail becomes an optimization instead of a correctness requirement. state becomes a pure function of the archive.
- an index like typeahead's can cold-start by draining its collections instead of aging into usefulness.
- a crashed consumer is no longer bleeding data — it's paused. resume is a bounded plan from your last seq, then cutover.
- and things that were never possible on radio at all: replaying a chat from before your service existed, backfilling a feature you hadn't thought to build yet, auditing what a repo did last tuesday.
bluesky's hosted instances gate their archive behind an API key;
stream.waow.tech grew the same gate, byte-compatible. the SDKs — their TS
and Go, and now zat.dev/jetstream
in zig — all speak the same recipe: plan, drain, resume at
plannedThroughSeq.
what six weeks of production bought zat
relay-eval samples every sync source on
the network for five minutes out of every thirty and publishes the
coverage. it does not care that your unit tests pass. four releases were
each bought by something it, or operating stream, surfaced: compounding
reconnect backoff (0.3.27), silent-socket stalls needing an idle watchdog
(0.3.29, rewritten once because SO_RCVTIMEO panics under
std.Io.Threaded), unbounded receiveHead waits (0.3.30). none are bugs
a library finds in itself. they are what a library learns when a service
someone graphs in public is standing on it.
the split
the launch settled an architecture question by example: bluesky shipped
@bsky/sdk split out of @atproto/api, protocol on one side, services
on the other. zat was blurring that exact line — ArchiveBackfill speaks
network.bsky.jetstream.* and decodes jetstream's storage format, none
of which is atproto. v0.4.0 draws the same line they did: the archive
client, the jss decode, and the vendored zstd moved to
zat.dev/jetstream; the v1 live
client stays until its consumers migrate; the v2 client will be born on
the right side. zat links no compression library at all now. the protocol
side got smaller, which is how you know the cut was in the right place.
(v0.4.0 also picked up zat.Datetime — the atproto datetime profile
promoted from test-only fixture validation to a real parse/format type,
after the same forty lines of RFC 3339 handling turned up hand-rolled for
the fourth time across these repos. edge-case decisions cross-checked
against rust's jiff and chrono; civil math is hinnant's, because
inventing calendar arithmetic in 2026 is how you get bugs with
anniversaries.)
the honest ending
the eval is still finding things. connections through stream's front door die at a low background rate that has so far survived a day of instrumentation — server exonerated, kernel exonerated, the proxy hop now under logging. the hunt continues, and it will probably buy 0.4.1 or a stream fix or both. that's the deal with instruments that refuse to be polite: they don't stop when you'd like a quiet week.
fourteen entries ago this devlog was parsing identifiers. the last one claimed zat belongs to the layer that moves bytes and decides what to trust. this one gets to say: the network has a DVR now, zat is part of what holds it up, and the design being ported was a gift — thanks to @calabro.io & the protocol services team.