Skip to content

Commit the site-audit builder, with the audited notes as its only hand input - #265

Merged
realmarcin merged 5 commits into
mainfrom
feat/site-audit-builder
Sep 25, 2026
Merged

realmarcin merged 5 commits into
mainfrom
feat/site-audit-builder

Conversation

@realmarcin

@realmarcin realmarcin commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Closes #238, closes #266, closes #267, closes #268, closes #269, closes #273, closes #274, closes #275, closes #276, closes #277.

_fleet/data/site_audit.json was written by build_site_audit.py, a script that existed only in the #120 session's scratchpad. Each refresh had to rewrite it from the update skill's prose, and nothing checked that the rewrite derived each field the same way. That mattered once #212 made the nightly check depend on the audit's figure_at_pin and pin time.

What changes

Evidence

🤖 Generated with Claude Code

…d input

_fleet/data/site_audit.json was written by a script that existed only in a
session scratchpad, so each refresh had to rewrite it from the skill's prose and
nothing checked that the rewrite derived each field the same way (#238).
scripts/fleet/build_site_audit.py now derives every mechanical field from the
snapshot, mech_stats.json and check_cards.figure(), appends the sentence saying
whether each live copy still matches its pin, and refuses a card that differs
from its figure at the pin or exceeds its site. The audited notes and scope move
to _fleet/audit_notes.json, the builder's only hand-written input.

Run in memory against the #120 snapshot and the live sites, it reproduces the
committed audit exactly, key order and notes included, except CellStructureMech,
whose site has grown from 577 to 584 since the audit was written.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
build() had no test, so its notes refusal, UTC commit dates, CLAW entry and
order could regress unnoticed; an offline test now covers them (#266). The
refusal names only the notes actually missing and the file read (#267). The
WRONG remedy says to re-derive figure_at_pin with the builder, never edit it
(#268). Step 1 gives the revisions.json layout and pin-time format the builder
reads, and the builder refuses a pin time the nightly would report as AUDIT
(#269).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…y derived field

AUDIT's remedy said to fix site_audit.json by hand, though figure_at_pin and the
pin time are derived; it now says to regenerate the audit with the builder
(#273). A commit date with no offset is refused instead of being read as local
time, and step 1 says to use the committer date with its offset (#274). The
tests now check local_date under a non-UTC zone, each hash against its own
copy, a data source's page hash, readme_url and merged_prs (#275).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Rebuilding from the failing audit reproduces a bad pin time, and a missing audit
or a Mech with no entry has no pins to rebuild from. The remedy now says where
each comes from: rebuild for figure_at_pin, the last builder-written audit or
the PR body for the pins, a full refresh for a new Mech (#276).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
git log needs -- before a path that may be deleted, and the refresh PR body has
no pin time, so the AUDIT remedy now names only the last builder-written audit.
A malformed audit is covered, and card_records is named as the one audit field a
WRONG fix edits (#277).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@realmarcin
realmarcin merged commit 4e9847c into main Sep 25, 2026
1 check passed
@realmarcin
realmarcin deleted the feat/site-audit-builder branch September 25, 2026 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment