diff --git a/index.html b/_archive/staging-surface-2026-09-22/index.html similarity index 100% rename from index.html rename to _archive/staging-surface-2026-09-22/index.html diff --git a/internal/staging.js b/_archive/staging-surface-2026-09-22/staging.js similarity index 100% rename from internal/staging.js rename to _archive/staging-surface-2026-09-22/staging.js diff --git a/internal/settled-tree-gate.mjs b/internal/settled-tree-gate.mjs index 01f88e877..357461f5b 100644 --- a/internal/settled-tree-gate.mjs +++ b/internal/settled-tree-gate.mjs @@ -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 /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)')