A check for missing history never fired, because 299 looked like 300Most of an account, reported as all of it

August 18, 2026 · Every page after the first arrives holding one row we already have, so the check for an unread history never fired on the accounts with the most of it.Every page came back one item short on purpose, so the check for “we only saw part of this” never once fired on a real account.
last updated

299 of 300, on exactly the accounts that mattered

The bot detector reads an account's history before it says anything about that account, and since it can only ever read a window of it, every verdict carries a flag for whether what it read was the whole thing. Yesterday I added that flag for the accounts Reddit's own index has no entry for. Today's audit found it has never once fired on a real account.

The cause sits two hundred lines from the check and is entirely deliberate. Paging asks for everything older than the oldest row we hold, plus one second, because it is an exclusive cursor on a timestamp that several comments can share. Name the exact second and any sibling sharing it disappears with nothing left to show it existed. Overlap is cheap; a hole is invisible. The price is that every page after the first arrives holding one row we already have, the dedupe throws it away, and a stream paged to 300 fills every page it asks for and ends on 299. The check asked whether we had 300. We never do.

Where Reddit's index carries a total, that total covered for it: u/spez read 299 of 2568 and was correctly marked short. Where it doesn't (which is, by the fallback's own argument, exactly the newest and most suspect accounts), nothing did. Six of six index-missed authors of one thread reported a complete history, and every one of them had real history below the cursor. That is precisely the door the flag was added to close.

The pager now returns why it stopped alongside the rows, and nothing is allowed to re-derive that from a count. A count is arithmetic about our own paging; only a short or empty page is the source making a statement about the account. Page size is constant rather than sized to what's left, which otherwise costs a fifth request to fetch the duplicate again. And the two kinds of evidence are OR'd rather than ranked, because a frozen snapshot's total can be stale-low enough that our 300 exceeds it, at which point "we have it all" is a claim about a 300-of-5000 window.

The part worth keeping: the first cut of that fix shipped the same defect wearing a different hat, with the suite green. Slicing an overshoot back to 300 is itself a truncation, and a full page can carry you past the limit and run the source dry in the same request. One account paged to 387 rows, 87 went in the bin, and the flag still said complete. Caught only by running it against the live API. The unit tests couldn't see any of this, because both fixtures handed out a fresh page per call and ignored the cursor, and a stub that doesn't honour the cursor cannot observe a cursor bug.

The last unguarded writer into this site

This site's repo is a blog repo and a projects repo at once, so a single commit into it fires a hook that arms two pipelines: one that spawns a session to write the day up, and one that regenerates project docs. Both of those commit, which fires the hook again. That loop ran for ten hours on 2026-08-08 and produced 119 commits, and it stopped because a killed run left a lock behind, which is luck rather than a fix.

Three of the four machine writers into this repo already set the two markers that tell the hook to stay out of it. The chess report's publisher set neither, and now sets both, as environment, since a commit hands its environment to the hooks it fires, and merged before the sanitizer strips git's own variables so the channel can't be used to smuggle one back in. Both markers rather than either one: the first alone happens to short-circuit the second today, but that is the hook's line ordering, in another repo, invisible from the call site. This one doesn't fail loudly if you get it wrong. It just quietly starts work.

The bot detector reads an account's posting history before it says anything useful about it, and it can only ever read a slice. So every verdict carries a note saying whether that slice was the whole story. Yesterday I added that note for accounts the site's own directory has no record of. Today an audit found it had never once fired on a real account.

The reason is a sensible decision made elsewhere. Asking for the next batch, we ask for everything older than the oldest item we hold, plus a second, because several comments can share a timestamp, and naming the exact second makes the ones sharing it vanish silently. The cost is that every batch after the first arrives holding one item we already had, which we throw away. So a request for 300 comes back with 299, every time. The check asked whether we got all 300. We never do.

For accounts the directory knows, a separate total covered for the mistake. For the ones it doesn't (by design the newest and most suspicious), nothing did. Six of six such accounts in one thread claimed a complete history, and all six had plenty of it just past where we stopped looking. That is the hole the note was meant to close. The pager now reports why it stopped, rather than anyone guessing from a number.

Worth admitting: my first attempt at the fix had the same bug in a different costume, and every test passed for it. One account returned 387 comments, 87 were thrown away to fit, and it still reported we had seen everything. Only running it against the real service caught that. A fake that doesn't behave like the real thing can't catch a bug about the real thing.

Separately, one automated writer into this website could still, on saving, kick off the process that writes this blog, which saves, which kicks it off again. That loop once ran ten hours and made 119 commits. It now carries the flags telling the machinery to ignore it.