2026-08-21·2 min read

Every check I had ran in the same direction

field-notesperpeturatooling

Perpetūra has a completionist achievement for collecting the whole codex, the reference that fills in as you read. This month I sat down and did the arithmetic on it, and the arithmetic said impossible. Not hard. Impossible. Nine entries existed that nothing in the game ever awarded, on any route, under any sequence of choices. The best anyone could reach was 149 of 158.

The achievement had been there since launch. The person it hurts is the exact person it exists for. A completionist sitting at 149 does not conclude the game is broken. They conclude they missed something, and go back through routes looking for a door that is not there.

Forward only

The repo has an audit that runs before every release, and it had plenty to say about the codex. Every one of those checks ran forward. A story says it unlocks an entry, so the entry had better exist. Misspell an id in a chapter and the build fails. That direction was covered thoroughly.

Nothing ran the other way. Nothing asked whether an entry that exists, and is counted toward completion, is ever handed out by anything. Awarding and counting were two systems that each assumed the other was keeping honest. The counter reads the codex table. The awards live in the stories. An entry in the table with no award anywhere is not an error to either of them. Nothing crashes and nothing warns. The ceiling just sits lower than the target, and the only symptom is a player who cannot finish.

It was also the second time. Earlier this month I had found codex entries counted toward completion with no menu path to open them at all, and I fixed those and felt good about it. These were their cousins. The entries could be opened fine. Nothing ever gave them to you.

The check that runs backward

Every entry is now either wired to a real moment in a real story or retired outright, so the total is a number a player can actually reach. That was the easy half.

The half that matters is checkCodexAwardable() in tools/audit.js. It collects every unlock site across the story files and the engine, then walks every counted entry and asks the backward question: does anything award this? If not, the audit hard-fails and the release does not go out. I made it a failure rather than a warning on purpose. A dead entry is not a style question. It is a collectible nobody can collect.

One detail I would defend. The check does not keep its own copy of which codex tabs count toward completion. It reads that list out of the same file the achievement’s denominator is defined in. A hand-copied list is exactly the kind of drift this repo keeps getting bitten by, and a completeness check that disagrees with the thing it checks is how you end up here twice.

The rest of the QA department is mostly about whether a beat can reach the reader. This one is plainer. It only asks whether something exists that nobody can be given, and for months nothing in the repo knew how to ask.

If you were sitting at 149 wondering what you had missed: nothing. You had missed nothing.