···11# Test Audit Status
2233-As of 2026-03-12, the focused test-correctness and reference-audit pass is complete on rewritten history through `812a63f`.
33+As of 2026-03-12, the focused test-correctness and reference-audit pass is complete on rewritten history through `16c510b`.
4455That does not mean every test has been manually revalidated against every other PDS implementation line by line. It means:
66···1313The current baseline for saying "the audited suite is green" is:
14141515- `prove -lr t`
1616- - last green result in the realigned Meridian worktree: `Files=41, Tests=2318`
1616+ - last full green result in the realigned Meridian worktree: `Files=44, Tests=2507`
1717- `prove -lv t/server-auth.t`
1818- `perl -c script/differential-validate`
1919- `PERLSKY_RUN_REFERENCE_DIFF=1 prove -lv t/reference-differential.t`
···4545- Firehose tests must not assume the smallest possible CAR diff. The reference runtime guarantees normalized behavior, not a minimal encoding.
4646- Label replay and cursor handling need exclusive replay semantics, proper future-cursor rejection, and forward progress across unhandled backlog events.
4747- `com.atproto.repo.listMissingBlobs` needed a real implementation rather than an always-empty placeholder.
4848-- ATProto OAuth `include:<nsid>` permission-set scopes are now compiled into concrete repo/RPC permissions before token issuance; local regression coverage pins that least-privilege behavior for supported and unsupported permissions.
4848+- ATProto OAuth `include:<nsid>` permission-set scopes are now compiled into concrete repo/RPC permissions before token issuance; local regression coverage pins that least-privilege behavior, including dropping unsupported account/blob/identity permission-set entries.
4949- Deactivated accounts should still be able to establish and refresh sessions, but those responses must stay marked `active=false` with `status=deactivated`.
5050- Local `app.bsky.*` emulation must be conservative: only synthesize owner-local feed/thread data when the PDS can answer authoritatively, and proxy upstream instead of inventing partial global state.
5151- Account email handling needs consistent normalization on write, lookup, session creation, and confirmation checks; treating email case inconsistently leaves both tests and user-facing auth behavior brittle.
5252-- `app.bsky.actor.putPreferences` and `app.bsky.notification.putPreferencesV2` need shape validation; unvalidated merges are not a critical exploit here, but they are a real correctness and hardening issue.
5252+- `app.bsky.actor.putPreferences` and `app.bsky.notification.putPreferencesV2` now have explicit shape validation plus focused regression coverage, turning an earlier hardening concern into a pinned contract.
5353- `com.atproto.identity.resolveHandle` should reject malformed handles with `400 InvalidHandle`, not quietly treat them as misses.
5454+- Remote `did:web` DID docs, conservative `resolveIdentity` handle validation, and external handle adoption all need explicit coverage because small resolver-policy drifts turn into visible interop bugs quickly.
5555+- `com.atproto.repo.getRecord` must honor `cid` when present, and `putRecord` / `deleteRecord` must actually enforce `swapRecord`; those negative edges are now covered directly.
5656+- `com.atproto.server.requestPasswordReset` and `com.atproto.server.deleteAccount` now follow the reference form-token flow, with focused regression coverage for missing-account and bearerless deletion semantics.
5457- `com.atproto.sync.getBlob` should ship the same download-hardening headers as the reference PDS (`X-Content-Type-Options`, `Content-Disposition`, `Content-Security-Policy`).
55585659## Known Intentional Divergences
···8487| `t/cors.t` | local correctness/infrastructure | CORS and preflight behavior |
8588| `t/crawlers.t` | audited local regression | outbound crawl notification semantics |
8689| `t/crypto-interop.t` | direct reference differential | pinned upstream crypto fixture coverage |
9090+| `t/delete-account.t` | audited local regression | reference-style account deletion flow using DID, password, and action token without a live bearer session |
8791| `t/email-confirmation.t` | audited local regression | intentionally testing-friendly email flow |
8892| `t/event-stream.t` | audited local regression | wire-format, malformed frame, and event decoding coverage |
8993| `t/extended-api.t` | audited local regression | broad XRPC behavior including invites and moderation-adjacent flows; still intentionally mixes conformance-ish happy paths with local-policy coverage |
9094| `t/external-surface.t` | audited local regression | external repo/account surface including missing-blob behavior; intentionally broad, with order-insensitive assertions for label presence rather than brittle label ordering |
9195| `t/firehose.t` | audited local regression | repo subscription lifecycle, cursor, and CAR behavior |
9292-| `t/identity.t` | local correctness/infrastructure | handle and DID identity flow coverage |
9696+| `t/identity.t` | local correctness/infrastructure | lower-level handle and DID helper coverage, including DNS-over-well-known preference and malformed-handle rejection |
9397| `t/import-repo.t` | audited local regression | import/snapshot restore behavior, including perlsky's intentionally tolerant malformed-record import semantics and explicit rollback to the imported snapshot |
9498| `t/invite-gating.t` | audited local regression | self-service invite flag behavior |
9599| `t/ipld-canonical.t` | local correctness/infrastructure | canonical IPLD encoding invariants |
···98102| `t/metrics.t` | audited local regression | metrics endpoint, token-gating smoke, and instrumentation contract for local appview behavior |
99103| `t/moderation.t` | audited local regression | takedown visibility and moderation behavior |
100104| `t/oauth-include.t` | audited local regression | permission-set scope expansion and least-privilege enforcement from `include:<nsid>` scopes |
101101-| `t/oauth-permissions.t` | audited local regression | granular OAuth permission enforcement across repo/blob/rpc scope families |
105105+| `t/oauth-permissions.t` | audited local regression | granular OAuth permission enforcement across account/email, identity, repo, blob, and rpc scope families |
102106| `t/oauth-scopes.t` | audited local regression | OAuth scope parsing, normalization, and token-grant shaping |
103107| `t/oauth.t` | audited local regression | OAuth provider metadata, PAR, PKCE, DPoP, and token lifecycle coverage |
108108+| `t/password-reset.t` | audited local regression | password reset token issuance and missing-email rejection semantics |
104109| `t/pds_smoke.t` | local correctness/infrastructure | broad local PDS smoke; still intentionally optimistic and should only carry a small number of negative assertions |
105110| `t/plc-identity.t` | direct reference differential | PLC mock driven by official library semantics |
106111| `t/reference-differential-plc.t` | direct reference differential | official runtime comparison in PLC mode |
107112| `t/reference-differential.t` | direct reference differential | official runtime comparison in baseline mode |
108108-| `t/remote-handle-resolution.t` | audited local regression | remote handle resolution behavior and invalid-handle rejection, with some malformed/upstream-failure branches still worth expanding |
113113+| `t/remote-handle-resolution.t` | audited local regression | remote `did:web` DID docs, conservative remote identity handling, external-handle adoption, and invalid-handle rejection, with some upstream-failure branches still worth expanding |
109114| `t/repo-api.t` | audited local regression | record mutation and read semantics, but still lighter than ideal on some negative/reference edge cases |
110115| `t/repo-firehose-car.t` | audited local regression | repo commit CAR shape and firehose interactions |
111116| `t/repo_formats.t` | audited local regression | direct repo wire-format and CAR expectations |