Archive the repo-root staging page; the studio is the only entry now
Some checks are pending
build-gate / build (push) Waiting to run

There were THREE staging surfaces, not two. The repo-root index.html was Vite's default
dev entry, and its title was the line that kept reappearing in front of the Driver:
"doxa-maps · Embeddable JAMstack Maps · staging", above a bundle strip that loaded each
chosen map into the page itself. It is archived with its internal/staging.js, not
deleted, and git recorded both as renames so history follows.

Archiving is safe because it was never a build input: rollupOptions.input is built from
per-bundle JS entries, and the root HTML is referenced only on the dev branch. It was
also already unreachable — the dev plugin intercepts /, /index.html, a query-string
root and /__gallery, all measured returning the studio with no staging title before the
move, and measured again after. What remained was a file that would resurface the moment
the middleware changed.

The settled-tree leaf floor drops from 50 to 40 because the architecture changed, not
because the tree got sicker. That floor was set when the build also emitted a chooser
page per bundle; those 19 pages are deliberately gone, which takes a correct tree from
63 leaves to 44. Left at 50 the gate would fail on every correct build, and the cheapest
way to make it green again would be to restore the choosers — so a stale floor does not
protect the tree, it defends the old architecture. The floor still catches the
partial-wipe it was built for, and the load-bearing assertion is now that every
embed.iframe target resolves: 43 checked, 0 missing.
This commit is contained in:
doxa-maps-88655c70 2026-09-22 14:34:58 +00:00
parent 1269ac5a52
commit afb998f17b
3 changed files with 22 additions and 1 deletions

View file

@ -44,7 +44,28 @@ import { execSync } from 'node:child_process'
const TREE = process.env.TREE || 'public/doxa-maps'
const QUIET_SECONDS = Number(process.env.QUIET_SECONDS || 45)
const MIN_DIRS = Number(process.env.MIN_DIRS || 17)
const MIN_LEAVES = Number(process.env.MIN_LEAVES || 50)
// ★ RECALIBRATED 2026-09-22 from 50 to 40 — the ARCHITECTURE changed, not the health of the tree.
// The old floor was set when generate-tree.mjs also emitted a <bundle>/index.html CHOOSER page for
// every bundle. Those 19 pages were removed deliberately (they returned HTTP 200, mounted NOTHING,
// were referenced by the manifest ZERO times, and their stylesheet was literally named
// "staging-forge" — they are the duplicate staging surface the Driver asked to archive). Removing
// them legitimately drops the recursive index.html count from 63 to 44.
//
// ★ WHY THIS EDIT MATTERS MORE THAN THE NUMBER: left at 50, a CORRECT tree fails this gate forever,
// and the cheapest way to make it green again is to restore the choosers — i.e. the stale floor
// would quietly pressure the next agent into undoing the change it was blocking. A floor that
// encodes a removed artifact does not protect the tree; it defends the old architecture.
//
// 40 keeps the original PURPOSE intact. The floor exists because a per-bundle `BUNDLE=x vite build`
// silently deletes every OTHER bundle's leaf (see the note at signal 4) — a partial-wipe leaves far
// fewer than 40. The expected healthy count is now 44: 1 root + 28 profile leaves + 15 instance
// leaves. Anything materially below that is the wipe this gate was built to catch.
//
// THE LOAD-BEARING CHECK IS NO LONGER THIS COUNT. What actually must not break is that every
// embed.iframe target in manifest.json still resolves — that is deployment method 1, one of only two
// of the five that are proven. Verified 2026-09-22: 43 iframe targets checked, 0 missing. Prefer
// check:embed-targets for that assertion; this floor is only a coarse wipe detector.
const MIN_LEAVES = Number(process.env.MIN_LEAVES || 40)
if (!existsSync(TREE)) {
console.error('SETTLED-TREE: FAIL — tree does not exist: ' + TREE + ' (a build may be mid-clean)')