Back to the The Tesseract Memory journey

DecidedStop 1 of 11

Publishing only the exact draft that was reviewed

This site saves each edit as a new version in SQLite, with a fingerprint of its content. Publishing must name the reviewed version and its fingerprint. So a later edit can't quietly change what goes online.

The question

A review is about one particular version of the text. But writing doesn't stop for the review. If another edit arrives before the page goes online, and the site publishes whatever is newest, the reviewed version isn't the one that goes out.

What I chose

A content service, a separate program, stores this site's pages. Each save stores the content as a The Tesseract Memory · The publishing systemSaved versionsEach edit becomes a new version with a SHA-256 fingerprint. Rules inside the database stop anyone changing a saved version later.See it in the The Tesseract Memory build. It is a numbered copy written as A technical wordJSONA common text format that programs use to send each other structured data., a common text format for data, with a SHA-256 fingerprint. A fingerprint is a short code that changes when the content changes. Rules inside the database refuse to change or delete a saved version. So a later edit can't rewrite what was reviewed. Each page has two markers. The draft marker moves with every save. The public marker shows which saved version readers see, and saving never moves it.

What publishing checks

A The 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 has to say which version it means. It carries the draft version and the content fingerprint it expects. The service compares them inside one A technical worddatabase transactionA group of database changes saved together, so either all of them are saved or none are., where every change is saved or none is. If an edit arrived after the review, they don't match. Then the release stops before the public marker moves. If they match, three things are saved together. They are the marker's move, an audit entry that records what was done, and a The Tesseract Memory · The publishing systemSafe retriesA repeated request with the same key gets the first answer back. A request with changed details is refused.See it in the The Tesseract Memory build. The retry receipt is the saved answer for that request. Each request has a key. If the same request is sent again with that key, it gets the earlier result back.

What else it protects

Restoring an old version creates a new draft, which goes through the same publishing checks. Links count too. A note can't be published with a link to an The Tesseract Memory · The publishing systemLink rulesA note can't go online with a link to a build that isn't online. A build can't be taken down while online notes link to it.See it in the The Tesseract Memory build. And a build can't be taken down while published notes still refer to it.