chadtmiller.com/monolith
An atproto PDS
Harness: the reference's session tokens may live a second more
MergedThis harness-only change makes the token-life check accept a life one second longer than the spec's, but only from the reference. The server is still held to exactly 7200 for access tokens and 7776000 for refresh tokens. ref is imported in both files, and the takendown-session check in lifecycle.mjs gets the same treatment as sessions.mjs. No spec or README change is needed, since server behaviour doesn't change and spec/SESSIONS.md still says iat + 7200. I didn't run the harness. The tolerance is narrow, one second and the reference only, and the comment says why. The same life + 1 rule also covers the reference's 90-day refresh tokens, which fits the same two-clock-reads cause.
main's gates on4ebd975failed in the crash suite, not on anything the server did. In the run--steps 1000 --seed 41 --crash-every 15 --firehose --commands, step 975 was arefreshSession. The reference's access token hadexp - iat= 7201, and the harness holds both sides to 7200 (spec/SESSIONS.md). The server's was 7200.The reference reads the clock once for
iatand again forexp. When the two reads fall either side of a second, its token lives a second longer. The server derives both from onenow(sessions.rs,tokens), so its life is always exact.The change:
checks/sessions.mjsandchecks/lifecycle.mjsaccept a life of exactly one second more, from the reference only.Checked:
compare.mjs --steps 200 --seed 41 --commandsagrees.🤖 Generated with Claude Code