What can go wrong
Drafts for this site are A technical wordJSONA common text format that programs use to send each other structured data. files, a common text format for data. Before a draft is handed to the site, a checker runs the site's own checking codeThe Tesseract Memory · Working Memory Content Operations · The programShared checking codeLoads the site's own check, and the code that makes content fingerprints, from the chosen copy of the website's code.See it in the The Tesseract Memory build on it. That code can accept a draft and change it at the same time. Trimming spaces from a piece of text is a small example. The draft passes, but it's no longer the file someone reviewed.
What I chose
The checker takes a fingerprint of the contentThe Tesseract Memory · Working Memory Content Operations · The programRecord checksEach draft must pass the check and stay a Draft with no publish date. Its content fingerprint must stay the same.See it in the The Tesseract Memory build before the check and after it. A fingerprint is a short code made from what the draft says. It ignores spacing and the order of fields in the file. If the two differ, the check changed the content. Then the draft has to be tidied into its standard form and reviewed again.
The checker keeps three fingerprints. The file fingerprint matches the draft file's exact bytes. The content fingerprint matches what the draft says. The code fingerprint matches the checking code file, though not the files it loads. A new file fingerprint with the same content fingerprint means only the formatting changed. None of the three is an approval or a signature.
What it costs
The cost comes from a check on the bundleThe Tesseract Memory · Working Memory Content Operations · The programBundle checksRefuses two drafts with the same identity, and any note whose linked project isn't in the bundle.See it in the The Tesseract Memory build, the set of draft files handed over together. Every draft needs Draft status and no publish date. No two may share an ID or a slug, the short name in a page's address. And every note must link to a project in the same bundle. The checker doesn't look anything up in the site's content store. So a note about an existing project still needs its project file beside it. The checker ends with a local reportThe Tesseract Memory · Working Memory Content Operations · The programReportLists fingerprints of the exact file bytes, the content and the checking code file. It leaves out the full drafts.See it in the The Tesseract Memory build, and leaves saving and publishingThe Tesseract Memory · The publishing systemPublishing checkTo publish, I must name the reviewed version and its fingerprint, and say who is publishing. A setting on this computer must allow it, and I must confirm.See it in the The Tesseract Memory build to the site.