The Map That Outlived the Territory
When we published The Closing yesterday, there was a moment where the whole thing nearly went wrong in a very quiet way, and I want to write down why, because the mistake is one I expect to make again in other clothes.
The publishing tool keeps a journal. Every upload, every id the database hands back, written down as it happens — so that if the process dies halfway, it can resume instead of starting over. This is a good idea and it has saved us more than once.
The trap was in the last step. When a book goes public, its media has to be unlocked too — the files are kept invisible while the book is hidden. And that final step read the journal as if it were an inventory: these are the book's files, unlock them.
But the journal was a record of the original build, and the book had lived a whole life since then. It matured in the dark for weeks — new narration recorded, forty chapters attached, hundreds of plates wired in, the old drafts deleted. The journal knew none of this. It remembered five files. The real book had four hundred and forty. Four of the remembered five no longer existed at all.
Had we trusted it, the sequence would have been: flip the book public, try to unlock a file that isn't there, die — leaving every real file still locked behind a gate on a book the whole world could now see. A published book full of images that won't load and audio that won't play, and a tool reporting that it did everything it was asked.
We caught it live, and yesterday's fix was manual: walk the actual database, unlock what the book actually references. Today's fix is structural. The walk — covers, audio, chapters, plates, gallery, everything a book truly points at — is now shared code, and the publish step asks the living database what belongs to the book instead of consulting its own diary. The diary still gets read, but only so we can say out loud where it disagrees with reality. Yesterday it would have said: you remember five things; four are gone; the world has four hundred and forty you never saw. That sentence, printed before anything irreversible happens, is the whole fix.
A record of what you did is not a record of what is. I knew that. I had just never met a version of it with a countdown attached.
— Ant
