Three gates read the tree's name instead of assuming it
The output tree was renamed doxa-maps → dx-maps. The name has always been a config knob, and _tree-name.mjs exists precisely so a rename is one line — but three gates still built their URLs from the literal, so they fetched a folder that no longer exists. THE FAILURE MODE IS WHY THIS MATTERS MORE THAN A PATH FIX. A gate pointed at a missing tree does not error; it loads a 404, finds an empty document, and reports whatever "nothing" looks like in its own terms. Measured in one sitting, all three of these were artifacts of the rename rather than findings about the product: a frame probe returned 0 images and no wall, twice, on two different leaves — which I first read as "the composite mounts the wall in a second pane"; check-basemap-labels-localized returned NOT MEASURED, "map never finished its style"; and every leaf under my plugin answered 404 while the card-fits gate had been passing, because IT was already migrated and my probes were not. Only the refuse-to-judge guards kept those from becoming filed defects. WHAT WAS ACTUALLY LIVE, after separating comments from code: exactly ONE executable literal across the 27 files that still mention the old name — the --leaf default in check-gospel-rtl-shaping, which I added last tick when parameterising that gate for the other raw-map owners. The rest are prose, plus one in public-hygiene-check that is the private REPO name (doxa-life/doxa-maps) and correctly unrelated. So the fleet-wide migration was essentially complete and this closes it. check-leaf-english-leaks now imports TREE_NAME for both its reachability probe and its leaf URLs; check-poster-card-fits was already migrated in code and only its comment still described the old path.
This commit is contained in:
parent
ce42977c8e
commit
d753998e0f
3 changed files with 9 additions and 5 deletions
|
|
@ -32,6 +32,7 @@
|
|||
*/
|
||||
import { chromium } from 'playwright'
|
||||
import { serveReaped } from './_serve-reaped.mjs'
|
||||
import { TREE_NAME } from './_tree-name.mjs'
|
||||
import { resolve, dirname } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
|
|
@ -46,7 +47,7 @@ const POISON = process.argv.includes('--poison')
|
|||
const leafArg = process.argv.indexOf('--leaf')
|
||||
const LEAF = (leafArg > -1 && process.argv[leafArg + 1])
|
||||
|| process.env.RTL_SHAPE_LEAF
|
||||
|| 'doxa-maps/gospel-resources/resources-map/index.html'
|
||||
|| `${TREE_NAME}/gospel-resources/resources-map/index.html`
|
||||
/* Arabia: the densest concentration of rendered Arabic on the basemap. */
|
||||
const RTL_VIEW = { center: [39.2, 24.5], zoom: 5 }
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ import { readFileSync, readdirSync, existsSync } from 'node:fs'
|
|||
import { resolve, dirname, join } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import { servesThisTree } from './_serves-this-tree.mjs'
|
||||
import { TREE_NAME } from './_tree-name.mjs'
|
||||
|
||||
const HERE = dirname(fileURLToPath(import.meta.url))
|
||||
const REPO = resolve(HERE, '..')
|
||||
|
|
@ -82,7 +83,7 @@ const catalogue = (lc) => {
|
|||
}
|
||||
|
||||
let reachable = false
|
||||
try { const r = await fetch(`${BASE}/doxa-maps/manifest.json`, { signal: AbortSignal.timeout(4000) }); reachable = r.ok } catch { /* precondition */ }
|
||||
try { const r = await fetch(`${BASE}/${TREE_NAME}/manifest.json`, { signal: AbortSignal.timeout(4000) }); reachable = r.ok } catch { /* precondition */ }
|
||||
if (!reachable) { console.log(`LEAF-ENGLISH-LEAKS: SKIP — nothing served at ${BASE}.`); process.exit(0) }
|
||||
const treeCheck = await servesThisTree(BASE, REPO)
|
||||
if (!treeCheck.ok) { console.error(`LEAF-ENGLISH-LEAKS: NOT MEASURED — ${treeCheck.why}`); process.exit(2) }
|
||||
|
|
@ -106,7 +107,7 @@ for (const t of TARGETS) {
|
|||
page.on('pageerror', (e) => errs.push(String(e).slice(0, 110)))
|
||||
let labels = []
|
||||
try {
|
||||
const res = await page.goto(`${BASE}/doxa-maps/${t.path}/index.html?lang=${lc}`,
|
||||
const res = await page.goto(`${BASE}/${TREE_NAME}/${t.path}/index.html?lang=${lc}`,
|
||||
{ waitUntil: 'load', timeout: 60000 })
|
||||
if (!res || !res.ok()) { rows.push({ t: t.path, lc, skipped: `HTTP ${res ? res.status() : '?'}` }); await page.close(); continue }
|
||||
await page.waitForTimeout(16000)
|
||||
|
|
|
|||
|
|
@ -78,8 +78,10 @@ if (!reachable) {
|
|||
// ⚠ NOT MEASURED, NOT SKIP, and the distinction is the point. A SKIP reads as "nothing to check
|
||||
// here"; this is "I could not attribute what I saw", which is a different and louder fact. Exit 2
|
||||
// so a caller can tell it apart from both a pass (0) and a real failure (1).
|
||||
// The helper wants the tree's BASE, not a leaf URL — it fetches <base>/doxa-maps/manifest.json.
|
||||
// LEAF is `<base>/doxa-maps/<bundle>/<profile>/index.html`, so cut at the /doxa-maps/ segment.
|
||||
// The helper wants the tree's BASE, not a leaf URL — it fetches <base>/<TREE_NAME>/manifest.json.
|
||||
// LEAF is `<base>/<TREE_NAME>/<bundle>/<profile>/index.html`, so cut at that segment. The name is
|
||||
// a config knob (_tree-name.mjs), and a hardcoded 'doxa-maps' here is how a rename silently makes
|
||||
// a gate measure a folder that no longer exists — which cost me a whole tick of false readings.
|
||||
const TREE_BASE = LEAF.split(`/${TREE_NAME}/`)[0]
|
||||
const treeCheck = await servesThisTree(TREE_BASE, ROOT)
|
||||
if (!treeCheck.ok) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue