Post-Publish Verification and Corrections
Rules, Gates and Guardrails

Post-Publish Verification and Corrections

Skip to main content
Table of Contents
< All Topics
Print

Post-Publish Verification and Corrections

Last updated: November 20, 2026

Every gate described in Publish-Time Gates runs before the write. That is a limit built into the idea of a gate. A gate asks whether a document is allowed to publish. It cannot ask whether the page a reader now gets matches what we sent. This page covers the layer that does ask, and the system that records what we got wrong and fixed.

Why something else must check after

Our defect history lives almost entirely in the second question. Four examples, each measured when it was found:

  • 1,175 live pages served literal ## markers instead of headings, while every publish run reported clean.
  • 31 live documents carried a “draft, pending review” footer.
  • 19 published documents were never queued for search indexing, so the site’s chat assistant could not find them.
  • On August 23, 2026, about 61% of the chat assistant’s indexed articles held pre-edit text, while a status board that only read local files showed every document green.

In each case two things had to agree and nothing compared them. A check that only re-reads the source cannot catch this, because it proves the gate ran and not that the result is right.

Publish Debug Mode and make verify-live

Publish Debug Mode reads the live page back and compares it with what we meant to send. In Compose, our editing console, it is the Debug mode checkbox beside Publish. From a terminal it is make verify-live SLUG=.

As of November 20, 2026, scripts/lib/publish_debug.py registers 28 checks. Twenty-six read the live page and its metadata. Two more, which look at the search index, run only when the deeper tier is requested. They include:

  • Render parity. The stored body of the live page must be byte-identical to what our renderer produces from the source. We do not normalize the comparison, because normalizing is how a real difference gets rounded away.
  • Leaks. Unconverted markdown headings, unresolved [[wikilinks]], and table rules that reached the page as text.
  • Residue. Stream markers, a Social Security number pattern, staging text and the staging footer on the live body.
  • Identity. The post exists, has the expected type and status, and its address carries no stray duplicate suffix.
  • Notices. In both directions: a confirmed correction must appear on the page, and a correction notice on a page must have a confirmed ledger entry behind it.
  • Reuse and citation. The reuse-terms and citation gates re-run over the live body, as warnings, to catch a citation block that did not survive rendering.
  • Search index. Whether the document was queued, whether the indexing job drained it, and whether any index entry is stale.

Three rules govern every check. Each compares something read from the live site with something derived locally. Each reuses the rule that gates, never a restated copy of it. And the tool never blocks and never writes: it sends read-only requests, runs after a publish, and reports.

Every result is one of three states: pass, fail or skip. A check that could not see what it needed says “skip”, never “pass”. A page that was only half downloaded cannot prove that a bad string is absent, so that case is a skip.

Keeping the checks in step with the gates

A set of checks goes stale when someone adds a gate and nobody adds the matching check. We close that with a test. tests/test_publish_debug_coverage.py discovers the gates in the publish code. Each must either have a live check that names it, or an entry in the module’s EXEMPT list with a reason. Adding a publish gate fails our test suite until one of those exists.

As of November 20, 2026, the EXEMPT list has 21 entries. An exemption is allowed when no live observation could disagree with the gate. For example, the sourcing-score gate measures the local document’s sources, so a live check would only repeat the gate’s own verdict. Another test goes the other way and fails any check that reads only local state, since that would be a second copy of the gate presented as verification. The test also holds two gates, empty-article and missing-image, as known gaps with a recorded reason, and fails if either gets covered without the entry being removed.

Publishing only queues the search index

Publishing a document does not index it. Publishing adds the document to a queue. A separate scheduled job drains the queue and creates the search entries our chat assistant uses. The two can drift apart in ways that look fine from the publish side:

  • The document sits in the queue and was never drained.
  • The job ran and refused the document, for instance a password-protected one, so no entry exists.
  • An entry exists and is stale. This is the dangerous state: the entry is still searched, and it holds the text as it read before the edit.

Publish Debug Mode reads the job’s own record for this, and reports unknown as a skip. A separate live-health check measures how many entries are current and whether the scheduled jobs are running, because an earlier failure of that job went unnoticed for weeks. Password-protected and internal documents are kept out of the index on purpose, and a check fails if one has an entry.

The corrections ledger

When we change a published fact, a correction is recorded. The record is docs/corrections/ledger.json, and four rules hold:

  1. The ledger is the single source of truth. Correction notices are rendered onto articles from the ledger when a page is published. They are never typed into the article files. A notice that lived in two places could disagree with itself, and nobody could say which copy was right.
  2. Nothing pending reaches a reader. Every detected correction starts as pending. Only a confirmed entry produces a notice or appears in the public log.
  3. A human confirms every correction. The tool detects a changed factual claim by comparing the published text with the new text, filtering out mechanical churn such as link and formatting changes. It files the result as pending. An editor decides whether it is a correction. An AI model asserting “we got this wrong” onto a public page would be its own risk.
  4. Detection never stalls a publish. A detected change in a legal claim prints a loud warning and the push continues. The review step is the control.

As of November 20, 2026, the ledger holds 900 entries: 374 confirmed, 515 dismissed and 11 pending. By class, 493 are factual, 126 scope, 93 legal-claim, 63 number, 58 date, 54 attribution and 13 typo. Our policy is that minor corrections such as typos are made without a formal notice, so those classes do not appear in the public log.

A lint check, make corrections-lint, covers one more failure. The ledger finds an article by its slug, so a renamed article can silently lose its notice. That happened once: a slug rename left 21 confirmed notices, 6 of them legal-claim corrections, on no page for about three months. The lint fails when a confirmed correction no longer reaches a document.

How to submit a correction, and our commitment on review time, are in Corrections & Transparency Policy. The public record is Corrections Log.

Where the human steps fall

The checks before and after publication are automated. What they cannot supply is judgment: whether a correction is a correction, and whether a page that passed every test is right. Those decisions stay with an editor, as described in Draft Checks and Human Review.

Factual correction requests: If you believe information in this page is incorrect, please contact factcheck@citizenanalyst.ai with your name (optional), the specific claim, and any supporting documentation. We review all submissions and correct verified errors promptly.

Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
Please Share Your Feedback
How Can We Improve This Article?