chadtmiller.com/monolith
An atproto PDS
0
0
harness: the compatibility check kept apart from the checks the gates run
Merged Approved
This is a refactor with no change in behaviour. It moves the adapters into harness/lib/adapters/, adds lib/server.mjs, moves claimAccount into lib/areas.mjs, and adds --tally.
I read every changed file. The adapter modules match the old adapters.mjs. That includes the unsupported reasons, the start and signIn bodies, child and container, and MAIL_DIR, which stays private to the spec-pds adapter.
- No remaining adapter reads in
checks/. A search of the branch finds noadapter.there. Eachown(),can(x)(written as!unsupported.x) andpageApi()call keeps the old logic and the same order of evaluation, so the seeded draws are unchanged. InupdateHandleandclientLogin,chance()is still drawn beforecan()is asked. That order matters for the claim that spec-pds's runs are the same. - Harness only. No check is loosened and no server code changes, so
spec/needs no edit. - Docs. The README and
compat/README.mddescribe what exists, with no history in them. - Stale paths. Only the base's
lib/adapters.mjspaths remain. - Excuses. The pull adds none to
harness/conformance.yaml.
Two optional points. --tally is written on process.on('exit') in report.mjs. A run killed by a signal won't write it, which is fine for the use you describe. The seed 21 crash-run failure is already on the parent commit and is not caused by this pull.
Merged as 58c4669
Adding other PDSes to the compatibility check had started to leave branches through
harness/checks/, the checks spec-pds's gates run. This keeps those checks as they were for spec-pds, and gives each later implementation one place to differ. It changes no behaviour.Claude Opus 5.5 · high
What changes
harness/lib/server.mjsholds what a check may take of the server beyond the protocol:own(),can(setting),pageApi()andissuer(side). Everycand.adapter.own,cand.adapter.unsupported.Xandcand.adapter.pageApithatchecks/read inline now asks it, and no check names an implementation.Compat-only setup leaves
checks/.claimAccount, which makes a one-account server's account, moves tolib/areas.mjs, the compatibility run itself.harness/lib/adapters/has a module per implementation (spec-pds,zds,vlpds,pds.js),common.mjsfor what they share (process, container, rotation key, form sign-in), andindex.mjsfor the contract and the list. It replaces the one growingadapters.mjs.compare.mjs --tally <file>writes how many requests of each kind a run made, with any port a kind names written as<port>. Two runs of one seed write the same file.The rule, in
compat/README.md("Adding an implementation") andAGENTS.md:spec/COMPAT.md. It is answered inlib/server.mjsor handled inlib/areas.mjs, and is the same for spec-pds as before.Why
Each implementation so far added a conditional somewhere in
checks/: the KEM key and limit numbers behindown, consent narrowing, one account, a rotation key the harness can't sign with, a separate issuer. The next ones would need more, such as tranquil's TLS and per-account rotation keys. Gathering every such read behind one module, with a rule and a way to show spec-pds is untouched, keeps the gates' suite what it is.I considered a rewriting proxy in front of each server so the checks see a uniform one, and ruled it out. DPoP signs the URL a request goes to, so the harness still has to speak each server's scheme itself. Anything that rewrites bodies would also change what is measured.
How it was checked
compare.mjs --steps 400, seeds 1 and 2, onmainand on this branch with the same binary. The same requests of every kind, by tally. The same check was first run on567c1b0, before rebasing: seeds 1 and 2 matched there too, at 371 and 357 kinds.appPasswords, which gave 37 or 38 failures of 46 across runs, a matter of timing. zds's and vlpds's sessions areas start and run as before.just gates: passes; all 7 code runs and all 17 harness runs, the browser runs of the authorization pages among them.just quickpasses but for one run; see Shortcomings.Shortcomings
just quick's crash run (seed 21; the gates' crash run is seed 24, which passes) fails on this machine at its last step: the server's log has notrace export failedline after an OTLP receiver outage.567c1b0, this branch's parent, fails it the same way with the same binary, so this change doesn't cause it; the step is timing-sensitive. It is not among the gates' runs.Review
A quick look. The moves are mechanical.
lib/server.mjsand the rule incompat/README.mdare the parts to read.