chadtmiller.com/monolith
An atproto PDS
The server on v0.1.0's data: the upgrade run, in the gates
MergedThis adds the upgrade run. harness/upgrade/ holds the data directories v0.1.0 wrote, one killed and one shut down, with the variables, the PLC operations and the 59 recorded answers. compare.mjs --upgrade starts the server on each directory, holds every read to those answers, and then checks that writes carry on. I read the check, the arg, compare and gates changes, the spec, the README and the workflow. I did not read the binary fixture files (the data directories, plc.json, reads.json, accounts.json), which I take to be output of --upgrade-write. I did not run anything.
- Spec:
spec/STORE.mdcovers the new behaviour (laterrev,since, nextseq, killed or shut down) and what the run reads and leaves unchecked. The README says what exists and how to regenerate the fixture, with nothing about how it was built. - Harness: the change adds a check and loosens none. Each read says what it is compared with: JSON bodies whole,
getRepoby root and block CIDs, blobs by type and bytes, and the firehose by frame bytes. A server that exits on start is reported with its standard error. - Server code: untouched, so no reference or SDK source or new crates come in.
- Conformance:
conformance.yamlis not touched.
Nothing needs changing.
Carried forward: the change this pull makes at 389d08519e2acee2f836145e3782257178e2e99e is the one reviewed at b81e9836ca38b2ff5f2a5a442916c20876f19e15, so that review stands. What is new comes from its base.
STORE.mdhas always said a server starts on its previous version's data. Now the gates check it:harness/upgrade/holds the data directories v0.1.0 wrote, andcompare.mjs --upgradeholds every later build to what v0.1.0 answered there.Claude Opus 5.5 · high
What changes
Spec.
spec/STORE.md's "Upgrades":v<version>.rev,sinceits last, and the nextseq."How it is checked" says what the run makes and reads, and what of an upgrade it leaves unchecked. The line saying the harness cannot check this is gone.
Harness.
checks/upgrade.mjs, a run of its own of the server alone:--upgrade-writeruns with the previous version's binary and makes four accounts:It then reads all of it back. Into
harness/upgrade/it writes:Both runs set
PDS_REPO_BACKFILL_LIMIT_MSto ten years, so the firehose replay is whole whenever the check runs.--upgradegives the run's PLC directory those operations. Then, on each directory, it starts the server and compares every read: JSON bodies whole,getRepoby root and block CIDs, blobs by type and bytes, and the firehose by every frame's bytes. Then a write must commit at a laterrev, its#commitmust come after the lastseqwithsincethe lastrev, and a new account must be made. A start that exits is reported with its standard error.gates.mjsruns it incompareandquick, about 10 s.gates.ymlwatchesharness/upgrade/**. The README has the run, and a "Releases" section on writingharness/upgrade/again from each tag's binary.Why
Without this, the first change to how the server lays out its data that forgets the data already on disk breaks every deployed server at its next upgrade, and nothing here would notice. The answers recorded are the previous version's own. The reference has no data directory to compare against, so this is a check against the spec.
How it was checked
accounts.logentry that holds preferences renamed frompreferencestoprefs, a format change every fresh run passes.--upgradefails at once: the server's start differs,cannot recover …: a log entry of no known type: Some("preferences"). Put back.0644and0755, not the server's0600.just quickhere;just gatesis left to the pull'sgatesworkflow.Shortcomings
harness/upgrade/is about 520 KB of binary files, rewritten at each release.did:plc:names, with colons, which a Windows checkout cannot hold.