chadtmiller.com/monolith
An atproto PDS
harness: each start held to empty starts timed around it
MergedThis pull holds each start in the --store run to twice the median of four empty starts timed around it, plus 250 ms. It replaces the old bound of twice the first starts. Both spec/STORE.md and docs/guide/comparing.md describe the new bound, so the spec and the guide match the code. The check does not loosen: there is no retry, and a start that grows with the data still fails, as the planted-bug run in the body shows. The empty starts drop the run's exports and mail, which only makes the bound tighter. No changeset is needed, because only the harness changes and neither those who run the server nor those who call it would see it. The pull adds no atproto or MCP crates and does not touch conformance.yaml. I did not run the harness; I read the diff only. One small point, not worth blocking on: if waitReady throws inside emptyStart(), the empty server is not killed and its directory is not removed. That only matters on a failing run, which exits anyway.
My earlier approval stands. I read the pull's own change since 2f17fd3, which is the signalled timestamp. common.mjs records it for both child and container lives, and now is already imported there. mayBeLost falls back to ended when signalled is unset, so a life that exits right away behaves as before. signalled is set only on SIGKILL lives, so the wider window applies only to killed servers. The OPERATIONS.md text already says spans "just before a kill may be lost". The rest of the diff since 2f17fd3 is main merged in, and I did not review it.
3 passed, 1 skipped
1 skipped check
releaseSkipped- 1
Each start in the
--storerun is now held to empty starts of the same server timed right around it, so a loaded runner moves both sides of the comparison alike. The limit no longer comes from one early, single measurement, which ejected unrelated pulls from the queue.Claude Opus 5.5 · high
What changes
spec/STORE.md. "Starting" now says that the empty start it is measured against is taken on the same machine and under the same load. "How it is checked" says how the harness does that: each start is timed among starts of the same server on empty data directories, each in a directory and on a port of its own. Two run while the server is down before its start. Two more run after it: the server is killed as soon as it answers, and is started once more on its data afterwards. The start must take at most twice the median of those four, plus 250 ms. This covers the three starts after the accounts are filled, every crash, and the last start.
harness.
checks/store.mjs:emptyStart()starts the server's command and environment on a fresh empty directory, apart from the run as backup.mjs's snapshot copy is (itsAPARTlist is now exported). It is timed withwaitReady, the same way as the server's own starts, then killed and its directory removed.restart()times each start among those empty starts and checks it against its own bound. It no longer uses abasefrom the first starts.checks/crashes.mjs:crash()takes an optionalstart, which starts the server again in place of the plain start-and-wait. Every other caller is unchanged.compare.mjsreports the starts against the medians of their empty starts.Spans lost to a kill. On the first gates run, the store run's starts held up under the runner's load: one start took 549 ms against empty starts of 165 to 225 ms, and passed. But its operations check then failed:
the server's spans differsfor thedescribeServerthat a start had answered just before the harness killed it. The killed server was in the middle of writing to its disk. It outlived the SIGKILL by 2.2 s, and the window in which a span may be lost to a kill (spec/OPERATIONS.md, "Traces": spans "just before a kill may be lost") was counted back from when the process exited, not from when it was sent the signal.lib/adapters/common.mjsnow records each life'ssignalled, when it was sent the signal it ended by. Inchecks/operations.mjs,mayBeLostlets go spans of requests from 1.5 s before that signal to the exit. For a life that exits right away, as before, nothing changes.docs/guide/comparing.md describes the store run's start check that way.
Why
Fixes The --store run's start-time limit fails pulls that don't touch starting
The old bound was twice the slowest of three starts taken once, early in the run, plus 250 ms (about 69 ms and 388 ms on runner.knotless.dev). When the runner was loaded by other gates later in the run, single starts took 409 and 445 ms and failed pulls that do not touch starting. The base also was not an empty start: it was a start on the data directory as it was at the time. So a start whose time grows with the data raised its own baseline.
Putting the empty starts right before and after the measured one makes a load spike that slows the measured start slow its baseline too. Using the median of four means one odd empty start does not move the bound in either direction. The other ways considered:
How it was checked
node compare.mjs --steps 600 --seed 51 --crash-every 40 --storehere, alone, against the server as it is: passes. There were 19 starts, p50 67 ms and max 111 ms; the medians of the empty starts were p50 67 ms and max 77.5 ms.starting again differs,describeServer within 385 ms: twice the median of the starts on an empty data directory timed around it, 69, 68, 66, 67 ms, and 250 ms, against1057 ms. The server was put back after.just quick: all 7 runs pass.gatesworkflow's, on this pull. The first run, at 2f17fd3, failed only on the spans above and on two runs this pull does not touch (--pages --seed 1, a passkey view;--commands --seed 33,pds_log_bytes, which main has since fixed). main is merged in.Shortcomings
Review
The design:
restart()andemptyStart()in harness/checks/store.mjs, and the spec's two paragraphs.