~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

Compatibility: pds.js, and a server that hosts one account

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/monolith:pdsjs-compat

pds.js (knotless://chadtmiller.com/pds.js, main at 54f4e3a) joins the compatibility check, beside spec-pds, zds and vlpds.

pds.js hosts one account by design: its createAccount only adopts a DID minted elsewhere, and a new identity is made once, by POST /account/onboarding/create. So the harness learns to run a server that hosts one account (spec/COMPAT.md, "One account"):

  • The adapter's claim makes the server's one account; the reference's is made by createAccount with the same handle, email and the server's password. Their answers are not compared, nor is the server's genesis operation. The account's rotation key is read from that operation.
  • The checks that make an account or need a second (the accounts area, the firehose's createAccount, crossWrites, handleRace, and updateHandle's "handle taken" refusal) are skipped as an unsupported setting, accounts, and reported. Every other check runs on the one account, held to the reference as before.
  • New settings an implementation may not be given: a rotation key the harness can sign with (its own PLC operation before updateHandle), and the reference's recovery key (recommendedCredentials).
  • An adapter may name an OAuth issuer apart from the URL its DID documents name (pds.js names https://<PDS_HOSTNAME> in DID documents and is its own issuer at the URL it is called at); both are taken out of answers as a server's URL is.

For spec-pds, zds and vlpds nothing changes: no new draw from the seeded random source, and the filtered fault list is the same whenever there are two accounts or more.

Pinned in bench/impls.json, built by node bench.mjs --setup with its own Dockerfile (fetched through git-remote-knotless). The benchmark does not run it: its workload makes 40 accounts.

compat/RESULTS.md and results.json add pds.js's run (seed 1, 200 steps per area), run on its own and merged with the earlier one:

areapds.js
oauth0/201
oauth scopes7/200
oauth clientsskipped
sessions36/200
accountsskipped
records2/200
validation8/200
repository0/22
sync0/45
firehose1/22
identity35/200
blobs66/200

Most of it follows from two things: a write naming the repository by handle is refused (403 Forbidden; it takes only the DID), and the account its onboarding makes has no commit, so getRepo is 404 RepoNotFound and the firehose has no #commit or #sync. RESULTS.md lists the rest.

Checked: just quick passes; a short compat run of spec-pds's identity, accounts, firehose and records areas agrees in every check; just gates passed but for the spaces run, which needed harness/spaces's packages installed and then reported no difference.

Approved

This pull adds pds.js to the compatibility check and teaches the harness to run a server that hosts one account.

  • Spec and docs: the behaviour change is in spec/COMPAT.md ("One account" and the new settings), and compat/README.md and bench/README.md follow it. The README says what is built, not how.
  • Harness: nothing is loosened. The skipped checks (accounts area, crossWrites, handleRace, "handle taken", recommendedCredentials, the outside PLC operation) are skipped through unsupported and reported with reasons. The reasons cite pds.js's source. claimAccount still holds everything from getSession on to the reference.
  • Existing implementations: areas.mjs keeps the same draw order for them, and FAULTS is unfiltered when there are two accounts or more.
  • Server code and conformance.yaml: no server code or crates change, and harness/conformance.yaml is untouched.
  • URL stripping: the pds.js issuer is the URL it is called at, so the existing xrpc.mjs stripping of publicUrl and url already covers it.

I did not read compat/RESULTS.md and compat/results.json (about 5,600 added lines). They are generated from a run, so I did not check them line by line.

Merged as 567c1b0