document the leaf-deletion blind spot in check:sri and point to the settled-tree leaf-count signal

This commit is contained in:
doxa-maps-88655c70 2026-09-20 06:24:43 +00:00
parent 981cc40633
commit e4442efd09

View file

@ -24,6 +24,18 @@
* safety advice created a different hazard. The fix is not to ban single-bundle builds —
* it is to make sure an inconsistent tree can never SHIP.
*
* ★ WHAT THIS CHECK CANNOT SEE — a DELETED leaf (so never run it alone before a publish).
* This script walks the leaves that EXIST and asserts each one's baked hash matches its
* bundle. It asserts NOTHING about how many leaves there should be. A leaf that no longer
* exists is simply not checked — the gate passes because there is nothing left to disagree.
* So a tree gutted by a per-bundle `BUNDLE=x vite build` (which empties OTHER bundles' leaf
* index.html) returns a confident PASS here while being unpublishable.
* The leaf COUNT is settled-tree-gate.mjs's signal 4 (leaves >= MIN_LEAVES). The two checks
* are complementary and the publish runbook runs BOTH:
* bun run check:settled && bun run check:sri
* Named by the grid-palette agent, 2026-09-20, after a five-sample poll watched leaves climb
* 0 -> 58 mid-build; a single sample of a moving tree cannot tell "destroyed" from "rebuilding".
*
* NOT the same thing as the 5-minute SRI CACHE trap documented in the publish runbook.
* That one is TRANSIENT (republishing the same bundle inside the 300s max-age serves a
* stale .js against a fresh integrity) and resolves itself. THIS one is PERMANENT —