AI prepares the publication, a human decides: preserving the exact approved version
Bind author approval to the exact bytes of three language versions, metadata and a cover, then separately check permission to perform the next action.
The author reread the Ukrainian text, checked the translations and approved the cover. An assistant then shortened the English summary slightly, and the image was compressed again under the same filename. The task list still says “approved.” Does that decision apply to the set now being prepared for release?
This can easily happen with a single author: time passes between reading and the next action, while files change independently. Approval therefore needs to refer to a specific set of bytes and a specific working state. A folder name, the time of the latest message or a “latest version” link does not identify that set precisely enough.
Earlier, we examined editorial package completeness and conflicts when saving a draft. Here we will connect a different boundary: the selected result, the author’s approval, an intent for a subsequent action and separate authority to execute it. We will test this with an independent local model in Python and SQLite. It uses synthetic decisions and local records, with no AI calls and no publication to a website.
Approve the package that will actually be delivered
In this exercise, the material consists of seven files: three HTML bodies, three JSON metadata files and one WebP cover. The fixtures do contain those formats, but the verifier itself binds bytes without checking UTF-8, JSON syntax or the WebP format. The path list is explicit. An extra file, a missing translation or a repeated locale causes rejection, rather than an attempt to guess what the author meant.
Metadata belongs to the package just as the body does. Changing a summary can change the promise to the reader; different alternative text can change the image’s accessible description. Approving the Ukrainian HTML alone therefore cannot justify the statement “the entire material is approved in three languages.”
The cover is identified by its actual bytes. An identical filename does not prove that the image is identical. Even re-encoding with a similar visible result produces different bytes and requires renewed approval under this strict profile. This is a deliberate choice of precision, rather than a universal rule for every editorial process.
A manifest binds files to declared provenance
For each allowed path, the model records the file’s length and the SHA-256 digest of its bytes. The Python hashlib documentation describes working with bytes and obtaining a digest. Here, a hash neither judges writing quality nor establishes the author’s identity: it helps compare approved content with current content.
The list also includes the content identity, output revision, source revision, source links, explicit locale set and manifest policy version. Changing any of these values changes the object being approved. Otherwise, the same translations could silently be reassigned to a different source basis. The model records declared relationships; it does not prove their authenticity.
All fields are serialized using a frozen local rule, then hashed to produce a root digest. For JSON, we specify sorted keys, compact separators and rejection of non-finite values such as NaN; the relevant parameters are documented in Python json. This is the exercise’s own versioned format, not an implementation of a cross-language canonical JSON standard.
Locales are treated as a set: reordering UK, RU and EN in the list leaves the root unchanged. Repeating EN or removing RU is not allowed. Defining those semantics before hashing prevents a technical ordering choice from creating accidental editorial differences.
A decision belongs to the state that was reviewed
After selecting a package, the store returns its root digest and state version. The author’s decision must return that exact pair. If the current selection has already changed, the model rejects the stale approval. It does not substitute the new root for the reviewed one or automatically consider a newer answer better.
The state version matters even when the bytes match. Under our policy, selecting a package again is a new working event and increments that version. The old approval does not silently carry over. Another system could define reselection as a no-op, but that decision must be explicit.
The synthetic approval record also contains the reviewer identity, decision version and allowed action prepare_intent. The test store has one permitted reviewer. This table represents a trusted basis; it does not implement user login, signatures or verification of a real person. Whoever controls the database also controls this teaching model’s trust.
An approved file is not yet an authorized publication
Approval permits preparing an action intent. The intent has its own stable identity, package root, state version, approval reference and target. Reusing the same identity with a different package is rejected. This prevents a queue from turning an old intent into a container for an arbitrary new revision.
Execution requires a separate synthetic authority record. It binds the exact intent, root, state version, target and specific action. The model also checks the current authority epoch: changing it revokes previously issued permissions. Unchanged approved bytes cannot compensate for missing or revoked authority.
| Record | What it establishes | What it does not perform by itself |
|---|---|---|
| Manifest | The exact package and its declared provenance | Editorial acceptance |
| Approval | An accepted package in its reviewed state | Import or publication |
| Intent | A specific planned action on the package | Permission to execute it |
| Execution authority | Admission of that exact intent to the specified action | The action’s actual result |
These records are useful regardless of who prepared the text. A manuscript may come from AI, the author’s editor or an import. Provenance explains its basis, but it does not replace the author’s decision or permission for the next action.
Verification and the local transition share a boundary
Checking files, finishing that check and rereading them later for execution would be insufficient. The set could change between reads. In this exercise, bytes are stored in separate snapshots inside the same SQLite database, and the current state simply points to the selected snapshot.
Before creating a local record, the model opens BEGIN IMMEDIATE, rereads the intent and authority, checks the current state and recalculates the manifest from the stored bytes. In that same transaction it inserts the result record unique to this intent. The SQLite transaction documentation explains IMMEDIATE and possible SQLITE_BUSY failures; the exercise does not run concurrent processes.
Snapshots are added through the model’s narrow interface and checked before use. This does not protect against a database administrator who can rewrite both content and registers. The verifier also does not establish HTML safety, translation accuracy or source reliability. Those checks must precede approval; the hash only preserves their exact subject.
A change after approval must be visible
The checks were first frozen as expected decisions. Individual cases change each of the three bodies, each metadata file and the cover under the same filename. Others change the source revision, links, output revision, policy or content identity. The old approval must reject preparation of a new intent for that state.
A separate scenario changes the selection after an intent has already been created. Rejection now occurs immediately before the local transition. This check matters: an early approval cannot remain a sufficient basis after an arbitrary period of waiting in a queue.
Authority cases cover a missing permission, explicit denial, another intent, another root, another target, another action and an outdated authority epoch. In all such cases, the local publication count must remain zero. We check the consequence of rejection, not merely the presence of an error message.
A retry must not create a new result
With an unchanged package and valid authority, the first transition creates one local record. The next call recognizes the completed intent. Closing the connection and reopening the same database also preserves one result; the rule does not depend on process memory. Idempotency is tied to the intent identity here: another explicitly authorized intent for the same package can create another local record. This exercise does not establish a global ban on publishing the same material again.
In another case, an error is deliberately raised after inserting the row but before COMMIT. The transaction rolls back, leaving zero results. Once that controlled fault is removed, a retry creates one record. This tests local rollback without promising the behavior of an external publisher or a real sudden shutdown.
The independent local model passed 35 unittest methods and their corresponding 35 trace cases, recorded separately, on CPython 3.12.3 and SQLite 3.45.1. These are not 70 tests. The first run exposed a setup error in the case using another intent: it stopped before the intended binding check. After correcting that setup, the checks passed; the frozen expectations remained unchanged. The original 205,252-byte WebP fixture is present. There were no model calls, CMS calls or real publications. Human review of the current package remains pending.
What the author needs to see
Before a decision, the interface should show the exact text of all declared languages, the metadata, the actual cover and changes since the previous review. After the package changes, it should explain which approval is no longer current and what needs rereading. The root digest itself is useful for verification, but it does not replace an understandable preview.
Further integration still needs real authorization, revocation rules, history retention and a mapping from the intent to a particular publisher’s contract. The current model establishes a verifiable local requirement: the package being executed must be the same package that was approved, and authority to perform the action must be confirmed separately at the moment of transition.