Skip to content
This repository was archived by the owner on Nov 18, 2026. It is now read-only.

The sentinel was rebuilding a site nobody publishes, and blaming the deployment - #105

Merged
ChelseaKR merged 1 commit into
masterfrom
fix/the-sentinel-rebuilds-the-site-that-is-published
Sep 10, 2026
Merged

ChelseaKR merged 1 commit into
masterfrom
fix/the-sentinel-rebuilds-the-site-that-is-published

Conversation

@ChelseaKR

Copy link
Copy Markdown
Owner

master's live integrity sentinel has been red for three days. Its failure message says to look at the deployment. The deployment is fine.

What is actually wrong

tools/verify_live_site.py holds its own copy of the disclosed.cli site command, as a literal argument list. It was last edited on 2026-08-29. Since then pages.yml — the thing that actually publishes — grew four inputs:

input landed in
--receipts-from data/sample.json #94
--snapshots-from data/snapshots #97
--package datapackage.json #99
--disputes-from disputes #101

That copy grew none of them. So the sentinel has been rebuilding a site this repository does not publish, and comparing the live pages against it.

That is why every institution page differs by a near-constant ~1,210–1,220 bytes while the totals vary: it is one fixed block of markup the publisher renders and the rebuild does not, not a data difference.

The two numbers

Measured against the live origin on 2026-09-09 and again, unchanged, on 2026-09-10, on origin/master before any change here:

files the publisher writes 1,225
files the sentinel's rebuild wrote 622
of those 622, differing from what is published 602
published files never in the comparison set at all 603

So the check that claims "the live surface is what this repository publishes" was examining 622 of 1,225 files, and getting 20 of them right.

The 603 it never looked at are 600 institution receipt.json files, both history/<source>/index.html pages, and dataset.jsonld. The receipts are the artifact every institution page invites a reader to check it against — pages.yml refuses to publish fewer than 500 of them — and the sentinel has never fetched one.

MINIMUM_FILES = 500 cannot see this. 622 clears a floor of 500, so a whole class of published file leaving the comparison set looks exactly like a smaller site. A floor on the count of things compared says nothing about whether the right things are being compared.

And it failed pointing at the wrong thing

Three consecutive scheduled runs — 34240111314 (09-08), 34365526874 (09-09), 34490891921 (09-10) — each reporting the same 603 differences and ending

Re-run publish-site, or find out why the deployment is behind the default branch.

pages.yml succeeded at 09:49 on each of those mornings, from the commit that was master HEAD, and the live front page stamps that day's date. The deployment was never behind. A check that names the wrong cause costs more than one that says nothing: this is the state in which a real staleness gets dismissed as the known noise.

What changed

  1. The rebuild takes its inputs from one declared list, PUBLISHED_INPUTS, which now carries all seven.
  2. tests/test_workflows.py holds three call sites to the same set of inputs — pages.yml, tools/verify_live_site.py, and the Makefile's site target — failing in either direction, so a fifth input cannot reach the publisher alone. --out, --origin and --generated are excluded by name and with a reason: they are per-caller by design, and requiring them to match would require the sentinel to stop being a sentinel.
  3. The failure message names all three causes and says which evidence separates them, because they need opposite responses: the deployment is behind (re-run publish-site), the render changed (a real regression), or this check is rebuilding the wrong site (read PUBLISHED_INPUTS against the workflow — the tell is every page differing by about the same number of bytes with no deploy in flight).

Nothing under src/ moved, and pages.yml is untouched. The published site is unaffected by this change.

Verified

End to end, against the real deployment, on 2026-09-10's tree and 2026-09-10's live site.

origin/master's sentinel, unmodified 603 difference(s), exit 1
this branch's sentinel serves exactly what this checkout builds: 1225 file(s), 8,724,883 bytes, exit 0

The first row is the strongest evidence here and nothing about it was arranged: the defect is live, so the unmodified tree is the control.

make verify green on the rebased branch: 1417 passed, exit 0 read from the command rather than through a pipe.

Negative controls

Committed first; git hash-object asserted changed after each sabotage and asserted equal to the baseline after each restore (git checkout HEAD -- <path>); __pycache__ cleared between runs. All five restored cleanly.

sabotage predicted red actually red
drop --disputes-from from PUBLISHED_INPUTS (the real incident) the equality test and the named-inputs test exactly those two
drop --package from pages.yml (drift the other way) the equality test exactly that one
build_expected stops reading the list, keeping it declared the "builds from that list" test exactly that one
empty PUBLISHED_INPUTS (the floor) the floor test, plus the two above exactly those three
restore the old single-cause failure message the message test exactly that one

Each fired on exactly the guard it was aimed at and left the others green, which is what shows the five are independently load-bearing rather than one assertion written five ways.

One thing I did not do

The first version of the flag scanner read a fixed 2,000-character window after the invocation. In pages.yml that runs past the render step into the next one and picked up a later command's --source as an input this render takes — the test failed on its first run for that reason. The window is now the invocation's line plus every following line beginning with --, which is where both wrapped call sites stop. Recording it because the first run is the honest measurement.

No issue tracks this defect; it was found by reading the run history for workflows in this repository that have never run or are failing.

Prepared with AI assistance; reviewed before submission.

…deployment

tools/verify_live_site.py holds its own copy of the `disclosed.cli site`
command. It was last edited on 2026-08-29; since then pages.yml grew four
inputs -- --receipts-from (#94), --snapshots-from (#97), --package (#99),
--disputes-from (#101) -- and that copy grew none of them.

Measured against the live origin on 2026-09-09, before this change: the
publisher writes 1,225 files, the rebuild wrote 622, 602 of those 622 differed,
and 603 published files were never in the comparison set at all -- 600
institution receipts, both history pages and dataset.jsonld. The receipts are
what every page invites a reader to check it against, and nothing had ever
fetched one. MINIMUM_FILES = 500 cannot see that; 622 clears it.

It failed loudly every scheduled run from 2026-09-08 saying "find out why the
deployment is behind the default branch", about a deployment that was correct.

The rebuild now takes its inputs from one declared list, and a new test holds
that list, pages.yml and `make site` to the same input set in both directions.
Run against the live origin afterwards: 1,225 files, 0 differences, exit 0.
@ChelseaKR
ChelseaKR merged commit a13b01b into master Sep 10, 2026
6 checks passed
@ChelseaKR
ChelseaKR deleted the fix/the-sentinel-rebuilds-the-site-that-is-published branch September 10, 2026 20:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant