Read the build config that exists, so two gates stop passing by coincidence
check-composite-srcs and check-nested-token-delivery both resolve the output tree name from the build config, with a comment explaining why the fallback matters: "Defaulting silently would make this gate check a directory the build never writes." Both named vite.1040-maps-build-config.json — the pre-rename project name. That file does not exist. So the try ALWAYS threw, the catch ALWAYS fired, and the tree name was ALWAYS the hardcoded default. The read was dead code, and the gates have been correct only because the default happens to equal the config's current name, which really is "doxa-maps". The comment described an intent the code had stopped delivering, which is the part worth fixing rather than the string. Rename the tree in the build config and both gates would have walked public/doxa-maps while the build wrote somewhere else, then SKIPped with "an absent tree is not evidence either way" — silent, delayed, and the exact outcome that comment exists to prevent. Proved the read now runs rather than assuming it: parsing vite.doxa-maps-build-config.json succeeds and yields name "doxa-maps". Then negative-tested by renaming the tree in the config — the gate now FOLLOWS it and reports "SKIP — no built tree at public/renamed-tree-probe/", where before it would have checked the wrong directory and reported PASS. Config restored, re-verified green. Seven gates pass, including both repaired ones. Found by scanning _qa-cycle/CLAUDE.md, the oldest unread doc in the ideation sweep (2026-07-12) and an inheritor's entry point. It carried the same stale filename twice, once under the heading "Build config — ONE file", followed by "Edit it, run bun run build, done" — pointing a reader at a file that is not there. Corrected in that file too. A third occurrence sits inside a DONE card in 03-deployment-cycle describing a past state; that is a historical record and is deliberately left alone.
This commit is contained in:
parent
3a7913df64
commit
0235b75394
2 changed files with 10 additions and 2 deletions
|
|
@ -38,9 +38,17 @@ const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..')
|
|||
|
||||
// The output tree name comes from the build config, the same source generate-tree uses. Defaulting
|
||||
// silently would make this gate check a directory the build never writes.
|
||||
//
|
||||
// ★ THE FILENAME WAS STALE AND THE READ NEVER RAN (fixed 2026-09-23). This said
|
||||
// vite.doxa-maps-build-config.json — the pre-rename project name. That file does not exist, so the
|
||||
// try ALWAYS threw, the catch ALWAYS fired, and treeName was ALWAYS the hardcoded default. The gate
|
||||
// has been correct purely because the default happens to equal the config's current name.
|
||||
// Rename the tree in the build config and this gate would have checked a directory the build never
|
||||
// writes, then SKIPped with "an absent tree is not evidence either way" — silent, delayed, and
|
||||
// exactly the outcome the comment above was written to prevent.
|
||||
let treeName = 'doxa-maps'
|
||||
try {
|
||||
const cfg = JSON.parse(readFileSync(join(ROOT, 'vite.1040-maps-build-config.json'), 'utf8'))
|
||||
const cfg = JSON.parse(readFileSync(join(ROOT, 'vite.doxa-maps-build-config.json'), 'utf8'))
|
||||
if (cfg?.name) treeName = cfg.name
|
||||
} catch { /* fall through to the default */ }
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..')
|
|||
|
||||
let treeName = 'doxa-maps'
|
||||
try {
|
||||
const cfg = JSON.parse(readFileSync(join(ROOT, 'vite.1040-maps-build-config.json'), 'utf8'))
|
||||
const cfg = JSON.parse(readFileSync(join(ROOT, 'vite.doxa-maps-build-config.json'), 'utf8'))
|
||||
if (cfg?.name) treeName = cfg.name
|
||||
} catch { /* default */ }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue