Skip to content

fix: regenerated compiled article keeps the validated tier of the content it replaced #204

Closed

Description

@jflowers

Part of #153. Related: #203 (git is the source of record), #193 (unattended distill).

Bug

UpdatePage never demotes a validated page:

tier = CASE WHEN tier = 'validated' THEN 'validated' ELSE ? END

(store/store.go:388, comment at :373.)

So when compile regenerates the article for a tag whose page is validated, the new machine-written content keeps the validated tier a human gave to the old content. compile's stale cleanup also keeps validated pages whose tag is gone (tools/compile.go:386).

That's harmless while a human runs every compile. It stops being harmless once distill runs unattended (#193): every weekly run would silently carry "reviewed" onto unreviewed rewrites.

Fix

  • When the content hash changes, a validated page drops to draft. Keep the current guard only for writes that don't change content, which is what the race in the :373 comment is about.
  • feat: git is the source of record for page trust tiers #203 makes this fall out naturally (the new blob doesn't match the merged one). If that lands first, this issue reduces to a test.

Acceptance

  • Regenerating a validated article with different content yields draft.
  • Regenerating with identical content keeps validated.
  • The race the existing comment describes stays closed (existing test still passes).

Activity

  1. added 3 commits that reference this issue on Nov 14, 2026
    27eb04c
    3458e07
    f9b0d91
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions