chadtmiller.com/monolith
An atproto PDS
Spaces foundation: KEM keys, the pds-space crate, and a harness against the spaces alpha
MergedThis adds each account's P-256 #atproto_kem key and the pure pds-space crate. The crate holds the KEM shared secret, LtHash, commit and record MACs, the HTTP Message Signature check, an RFC 9651 parser, and STAR with the repo profile. It also adds spec/SPACES.md, the vectors, and a harness run against the pinned spaces alpha.
What I checked against .knotless/review.md:
- Spec and code agree.
ACCOUNTS.md,IDENTITY.md,DURABILITY.mdandPDS.mdall describe the new KEM key, its place in the genesis operation, andspacesAlpha. The code does what they say. The key is stored in the same account log frame. A handle update carriesverificationMethodsthrough unchanged. An account with no KEM key still loads without one. The README says only what is built, in its Known gaps. - Harness is held to the spec, not loosened. On the
latestruns the KEM key is taken out of the comparison only after it is checked separately. The genesis operation must carry a valid P-256 key that differs from the signing key.getRecommendedDidCredentialsmust name that same key.describeServermust answerspacesAlpha: true. The DID document is still held whole to the directory's. - The spaces run holds the alpha to every check too, which checks the checks.
- No forbidden crate or source. The new dependencies are
blake3andp256, neither an atproto or MCP crate. In the crate sources I read, nothing is taken from the SDK. - Conformance.
harness/conformance.yamlis not changed.
One small point, not blocking. spec/SPACES.md has a list of later parts ("These are filled in by later parts…", "Not checked yet…"), which reads as a plan. AGENTS.md asks the spec to say what is, not what is planned. Trimming it to what the page covers would match that.
Files I did not read in full: the vendored spec/spaces/* (the RFC texts, proposal.md, star.md, the licences, defs.json), spec/interop/star/*, harness/spaces/package-lock.json, harness/spaces/lib/spec.mjs, the spec/interop/spaces/*.json vectors, crates/pds-space/src/sf.rs, and crates/pds-space/tests/vectors.rs. I did not run the checks.
spec/SPACES.mdlines 46 to 56
Only the building blocks below are built so far. These are filled in by | |
later parts, each on a page or section of its own, and are not served yet: | |
| |
- the space repo: the `com.atproto.space` record writes and reads, its | |
commit and operation log; | |
- full-state sync: a repo as a STAR archive (`getRepo`), blobs, and | |
importing a repo; | |
- credentials: delegation tokens, space credentials, revocation; | |
- write notifications, the writer set, registration and deletion notices; | |
- policies and the space lifecycle: creating, updating and deleting | |
spaces, and member lists. |
This is a roadmap of later parts. The spec is meant to say what is, so consider cutting it to what the page covers now.
The foundation for atproto Spaces, the non-public data extension now in alpha, with the beta targeted for Dec 1. Later slices build the space repo, credentials, policies, sync and migration on top of it.
Spec
spec/SPACES.md(new), the entry page for spaces:space-refformat;atproto-space-repoprofile.spec/spaces/, with sources and licences in its README: proposal 0016 atfcad6b9388, the DASL STAR spec, RFC 9421, RFC 9180, andcom.atproto.space.defs.spec/interop/spaces/*.json, 140 cases, each certified both against the alpha's own@atproto/spaceand against harness code written from the spec page alone; plus STAR's published fixtures inspec/interop/star/.#atproto_kemP-256 key at creation, in its PLC genesis operation and ingetRecommendedDidCredentials(ACCOUNTS.md,IDENTITY.md,DURABILITY.md).describeServeranswersspacesAlpha: true. There is no backfill: no data of this server predates the key.Server
pds-space, pure, with no I/O: keys and KEM, LtHash, commits and MACs, the signature base and verification, an RFC 9651 dictionary parser, and a STAR reader and writer with the repo profile. Its tests run every vector file, and a guard test fails if a vector file has no test.getRecommendedDidCredentials.Harness: two references
lateststays the reference for everything already built. Those runs now hold the KEM results to the spec: the server's genesis operation must carry a validatproto_kem, and its credentials must name it. Only side-against-side comparisons take the key out.harness/spaces/: pinned to alpha0.0.0-spaces-alpha-20261105160032(pin-alpha.shre-pins). It checks every vector against the alpha's libraries, then starts the alpha's PLC and PDS with our server on that PLC. It comparesdescribeServer,createAccount, the genesis operation, the DID document,getRecommendedDidCredentials,updateHandle, and a restart. The alpha is held to every check too.gates.mjsand in the workflow (npm ciinharness/spaces).The checks bite: on
main, thelatestruns stop at the genesis operation (noatproto_kem), and the spaces run stops atdescribeServer(nospacesAlpha).Checked:
just gates: all 16 runs pass, the spaces run included, plus conformance and every crate's tests.🤖 Generated with Claude Code