chadtmiller.com/monolith
An atproto PDS
Account lifecycle and email: deactivation, deletion, takedowns, and confirming, changing and resetting by email
MergedThis adds the account lifecycle (deactivate, activate, delete, admin takedowns) and email (confirm, change, reset, emailed sign-in code). It adds LIFECYCLE.md and EMAIL.md, lexicons for the new methods, lifecycle.rs and email.rs, and the matching harness checks. I found nothing that must change, but I read only part of the diff.
What I checked
- Spec and README: the pages are linked from
PDS.md.ACCOUNTS.md,SESSIONS.md,OAUTH-SCOPES.md,PROXY.md,SYNC.md,DURABILITY.mdandLIMITS.mdare updated to match. The README describes what is built, not how, and its "Known gaps" are trimmed correctly. - Crates: the only new dependency is
lettre, for SMTP, which is neither an atproto nor an MCP crate. It is added to the workspace dependencies andCargo.lock. - Harness: the shared helpers (
edgeEmail,subscribe) are only exported. The new checks compare against the reference, using the emails it sends and, for the rate limits, its limits. - Exempt checks:
harness/conformance.yamlis untouched.
What I did not read: the diff is 73 files and about 9,700 lines. I did not read these:
crates/pds-server/src/email.rsandcrates/pds-server/src/lifecycle.rscrates/pds-server/src/lifecycle/tests.rscrates/pds-server/src/log.rsandcrates/pds-server/src/events.rs- the other server modules (
oauth,sessions,blobs,compactand the rest) harness/checks/email.mjsandharness/checks/lifecycle.mjsspec/LIFECYCLE.mdandspec/EMAIL.md- the new lexicon JSON files
So I did not check that the server code takes nothing from the reference's source, or that the spec pages say all that the code does.
Minor points
- The
harness/gates.mjscomment says the lifecycle run is "about 5 minutes beside the other runs (40 took 6)". The pull body says 30 steps take about 4 minutes. Make them agree. checkAccountStatusis added toSTATUS_ONLYinharness/checks/oauth-scopes.mjs, so only its status is compared there. That is looser than comparing the body. If that is because the body holds values that differ per side, say so in a comment. The lifecycle run should then compare the body fully.
harness/checks/oauth-scopes.mjsline 36
| |
/// Methods whose success is compared by status alone: CAR files, bytes, and | |
/// bodies with each side's own commits. | |
const STATUS_ONLY = ['com.atproto.server.checkAccountStatus', 'com.atproto.sync.getRepo', 'com.atproto.sync.getLatestCommit', 'com.atproto.sync.getRecord', 'com.atproto.sync.getBlocks', 'com.atproto.sync.listBlobs', 'com.atproto.sync.getBlob', 'com.atproto.sync.listRepos', 'com.atproto.sync.getRepoStatus'] |
checkAccountStatus is compared by status alone here. That is weaker than the body comparison it could have. Add a comment saying why, and make sure lifecycle.mjs compares its body.
Account lifecycle and email: deactivating, deleting and taking down accounts, and confirming, changing and resetting by email. Each was specified by an agent that probed the reference and wrote the checks, then built from the spec alone; the two are integrated on hardening and OAuth.
Spec pages (new)
LIFECYCLE.mddeactivateAccount,activateAccount,checkAccountStatus,requestAccountDelete,deleteAccount.updateSubjectStatus/getSubjectStatus: account, record and blob takedowns, underBasicadmin auth.allowTakendowngives a scoped session for the few methods a taken-down account may call;#accountand#identityevents, and#syncon activation;listRepos/getRepoStatusreport status;EMAIL.mdrequestEmailConfirmation/confirmEmail,requestEmailUpdate/updateEmail,requestPasswordReset/resetPassword, and the emailed sign-in code (authFactorToken).PDS_EMAIL_SMTP_URL, with a development mail directory the harness reads.LIMITS.md's terms.Rules settled while integrating, each probed on the reference and written into the pages:
getRecordof a deactivated or taken-down account is forwarded like a repo not held here.allowTakendownsession can calllistSpaces.METHODStable names every new method: the email methods needaccount:email,updateEmailandactivateAccountare never allowed to OAuth, anddeactivateAccountneedsaccount:status.Server:
lifecycle.rs, with the state table and the dispatch gate, andemail.rs, the mailer and tokens. A state change, its events, and the sessions it ends are one frame inaccounts.log, and a deletion is one entry; byte-cut tests cover both. The new write methods are under the free-space floor. OAuth'sMETHODStable names every new method, and what an OAuth token needs is probed and written intoOAUTH-SCOPES.md.Harness
checks/email.mjswithlib/mail.mjs: mail read from both sides' outboxes, in the plain runs.checks/lifecycle.mjs, the--lifecyclerun: every state, the admin, deletion, takedown sessions, and crashes. It is now in the gates at 30 steps, about 4 minutes.--limitschecks: the email and account-deletion rate limits, held to the reference (when both limits are exceeded, the day limit is reported first, as the reference does).Checked: plain seeds 1–3,
--commands31, crash seed 21 with--firehose,--lifecycle(80 steps, and with--crash-every 6),--limits,--invites, the spaces run, andcargo test --workspace. The merge queue runs the full gates.🤖 Generated with Claude Code