chadtmiller.com/monolith
An atproto PDS
0
0
harness: migrate-blobs killed once finished; issuers' keys' spec gaps closed
Merged Approved
This pull makes the --migrate check accept a pds migrate-blobs that was killed after it marked the move finished but before it exited. It also closes three gaps in the spec's "Issuers' keys" section, each with a check, except the key-read-since-start rule, which has none (stated in the body). I read the whole diff.
- Spec: The spec edits in
BLOBS.md,LIMITS.mdandSPACES-CREDENTIALS.mdmatch the harness changes. The SIGINT wording inSPACES-CREDENTIALS.mdis backed byOPERATIONS.md, which already listsSIGTERMorSIGINTfor theshutdownline. - Strictness: The migrate check is looser, but only for the finished-after-kill window. It still requires
serveto refuse an unfinished move. Aservethat starts must be on the place the blobs went, and--tothat place must then move nothing. The newissuers.mjsand deleted-account checks are stricter. - Changeset: None is needed. The change touches only the harness and spec, and nothing a server's operator or caller sees.
Some checks were not successful
1 failed, 4 passed, 1 skipped
1 failed check
nightlyFailure in 23m 37s1 skipped check
releaseSkippedMerged as ff58fc8
Fixes the
--migraterun's flake, which ejected the blobstore pull once. Apds migrate-blobskilled after it marked its move finished, but before it exited, was taken as unfinished. This also closes three gaps the server agent found in "Issuers' keys", each now with a check.Claude Opus 5.5 · high
What changes
Migrate run (
harness/checks/migrate.mjs,spec/BLOBS.md). A kill can land between step 7's finish mark and the exit. Such a run is finished, and the check now allows for that two ways:pds servethat must refuse a moving directory may instead start, with the environment of the place the blobs went. It is then held to--tothat place moving nothing ({"moved":0,"bytes":0}).{"moved":0,"bytes":0}.The serve that may start logs apart from the run's server (
PDS_LOG_DIRempty). It is shut down bySIGTERM5 s after itsstartline, so its shutdown leaves no recovery for the next start.Issuers' keys (
spec/SPACES-CREDENTIALS.md). The spec now says three things the server already does:SIGTERMorSIGINT(OPERATIONS.md).Checks:
plcLocalIssuer(LIMITS.md): a delegation token the server gave an account that has since been deleted must read that account's document.issuers.mjs: a key forgotten before aSIGTERMrestart and read again after it must outlive aSIGINTrestart. The spaces run'srestartWithnow takes the signal.Why
The blobstore pull's first queue run failed
--migrate --seed 71:pds servestarted on a directory the check took as mid-move. The same seed passed locally and on the second queue run. The window is the time betweenmark_moving(dir, None)andprocess::exit.How it was checked
mainfails both ways: seed 71,pds servenot refused; seed 72,moved: 0against the 14 blobs held._logs. And killing it left a recovery that failed the next start's no-recoveredcheck.SIGINT, the spaces run fails at "after a shutdown (SIGINT) and a start". The real server passes the whole spaces run.by_did) does not return deleted accounts. The check holds the spec all the same.Shortcomings