chadtmiller.com/monolith
An atproto PDS
0
0
Split the spec, harness and server by area
Merged Approved
This splits SLICE.md into PDS.md, REPO.md, SYNC.md and DURABILITY.md, splits the server into server.rs, repo.rs, sync.rs and log.rs, and splits the harness into lib/ and checks/. I read the spec pages, AGENTS.md, the README, review.md, events.rs, lib.rs, server.rs, repo.rs, sync.rs and log.rs. I did not read the harness/ changes: compare.mjs and the files in harness/lib/ and harness/checks/. Their diffs were too large to read in this session. For them I rely on your before-and-after record of seeds 1–3, --commands, and the crash runs, so the harness is not independently reviewed.
- Spec: Every rule from
SLICE.mdis in exactly one new page. The reference-behaviour bullets are split by area, andgetRepo/getLatestCommitRepoNotFoundmoved toSYNC.md. The firehose and durability text moved unchanged. The README andCOMMANDS.mdlinks are updated, and the README says what is built, not how. - Server: The moved handler bodies are identical to the old ones. The
AREASdispatch keeps the old order: the owner's token is checked first for exactly the four repo writes.createSessionstays unauthenticated, and unknown methods still return 501. The tests moved with their area and still check the same things. No crates were added and nothing was taken from the reference PDS or an SDK. - Conformance:
conformance.yamlis untouched.
Merged as 9d2ff55
The spec, harness and server, split by area, so that later slices (accounts, then sessions, blobs, identity, sync) can each be built by its own agent in its own files. Nothing a client sees changes.
Spec.
SLICE.mdbecomes:PDS.md, the entry: environment, methods, the general check order, how it's checked, the test vectors;REPO.md,SYNC.mdandDURABILITY.mdbeside it.The text moves as it was, apart from short intros and links so each page stands alone.
Harness.
compare.mjsdrops from 1,404 lines to 76: the run and a weighted list of steps.lib/holds the plumbing: processes,xrpc, calls through tools and commands, state, reports, the random source.checks/holds one module per area: records, session, odd requests, repository, firehose, commands, crashes.Server.
pds-server/src/lib.rsdrops from 909 lines to 344: the router, the shared state, and anAREAStable that dispatches toserver.rs,repo.rsandsync.rs.log.rsholds the log and its durability tests, and each area's tests moved with it.A new area adds
spec/<AREA>.md,harness/checks/<area>.mjsandcrates/pds-server/src/<area>.rs. It touches one line each in thePDS.mdpage table and method list, incompare.mjs's imports and steps, and inlib.rs'smodlist andAREAS.Proved identical. I recorded harness output before the split, then compared after splitting the harness and again after splitting the server:
--commandsseed 31;Commit races and kills make plain runs vary even on the old code. So the comparison used a preload outside the repo that sends requests one at a time in issue order, and logs each one. Old and new code gave identical output and identical request traces, apart from restart timings.
Checked:
just gates: all 15 runs, the crate tests and conformance pass.🤖 Generated with Claude Code