diff --git a/routing/scripts/measure-astar-oracle-sweep.mjs b/routing/scripts/measure-astar-oracle-sweep.mjs index 11e22fc..1d23a2c 100644 --- a/routing/scripts/measure-astar-oracle-sweep.mjs +++ b/routing/scripts/measure-astar-oracle-sweep.mjs @@ -268,14 +268,16 @@ async function main() { // environment fact, not a failure. if (!existsSync(GRAPH_PATH)) { console.log( - `SKIP: no graph at ${GRAPH_PATH} — the real-graph optimality pin needs the gitignored binary; ` + + `SKIP: no graph at ${GRAPH_PATH} — the real-graph optimality pin needs the gitignored ARG3 binary; ` + `build it first: node routing/scripts/build-road-graph.mjs`, ); process.exit(0); } const buffer = readFileSync(GRAPH_PATH); const graph = decodeGraph(toArrayBuffer(buffer)); - if (graph === null) fail(`${GRAPH_PATH} does not decode (fail-honest null) — rebuild the binary`); + if (graph === null) { + fail(`${GRAPH_PATH} does not decode (fail-honest null — the current binary must be ARG3) — rebuild it: node routing/scripts/build-road-graph.mjs`); + } const rawPairs = generateCrossMetroPairs(graph.bbox, { count: SWEEP_PAIR_COUNT * SWEEP_OVERSAMPLE_FACTOR, diff --git a/routing/scripts/measure-optimality-gate.mjs b/routing/scripts/measure-optimality-gate.mjs index 57a0098..292688a 100644 --- a/routing/scripts/measure-optimality-gate.mjs +++ b/routing/scripts/measure-optimality-gate.mjs @@ -23,8 +23,9 @@ * Inputs: * - the COMMITTED record routing/test/fixtures/alt-baseline.json (IMMUTABLE * — the recorder refuses overwrite; delete by explicit git revert only); - * - the LOCAL rebuilt binary routing/data/kl-roadgraph.v1.bin (ARG2 — the - * storage NAME stays v1; the header version is the format truth). + * - the LOCAL rebuilt binary routing/data/kl-roadgraph.v1.bin (ARG3 since + * Phase 08.1 — the storage NAME stays v1; the header version is the + * format truth). * * Constant-mirror law: this script's OPTIMALITY_EPSILON_PCT is asserted EQUAL * to the record's epsilon block BEFORE any measurement — a record edit alone @@ -88,7 +89,7 @@ function toArrayBuffer(buf) { * "unsnapped" — a record-routed pair whose snap now misses (a D03B class * break — the pair no longer routes at all). * - * @param graph decoded RoadGraph (the current ARG2 build) + * @param graph decoded RoadGraph (the current ARG3 build) * @param record parsed alt-baseline.json (the frozen pre-ALT record) * @param opts { snap, astar } — the live modules (injected like the corpus core) * @returns {{ checks: { D03A: check, D03B: check }, rows: Array, reSnapped: number, pass: boolean }} @@ -270,7 +271,7 @@ function main() { const graph = decodeGraph(toArrayBuffer(readFileSync(GRAPH_PATH))); if (graph === null) { fail( - `${GRAPH_PATH} does not decode (fail-honest null — still ARG1 or corrupt) — rebuild the ARG2 binary: node routing/scripts/build-road-graph.mjs`, + `${GRAPH_PATH} does not decode (fail-honest null — the current binary must be ARG3) — rebuild it: node routing/scripts/build-road-graph.mjs`, ); } diff --git a/routing/test/rollout.test.mjs b/routing/test/rollout.test.mjs index 3961b2e..c83a95c 100644 --- a/routing/test/rollout.test.mjs +++ b/routing/test/rollout.test.mjs @@ -65,6 +65,7 @@ test("RO1 upload-format-agnostic — the upload path is byte-shipping, never for "decodeGraph", "0x41524731", // ARG1 magic "0x41524732", // ARG2 magic + "0x41524733", // ARG3 magic (Phase 08.1 — the ban covers the CURRENT format too) "GRAPH_VERSION", ]) { assert.ok(!code.includes(token), `upload code must never reference ${token} (the migration is byte-shipping — D-01)`); @@ -90,8 +91,9 @@ test("RO2 one decode path at the Worker — the router never branches on format" const calls = code.match(/decodeGraph\(/g) ?? []; assert.equal(calls.length, 1, "exactly one decodeGraph call site — the ONE decode path"); // NO version-conditional branch against the graph bytes: no version - // constant import/compare, no magic, no `=== 2` anywhere in the file. - for (const token of ["GRAPH_VERSION", "0x41524731", "0x41524732", "=== 2"]) { + // constant import/compare, no magic (ARG1, ARG2, or the current ARG3), + // no `=== 2` anywhere in the file. + for (const token of ["GRAPH_VERSION", "0x41524731", "0x41524732", "0x41524733", "=== 2"]) { assert.ok(!code.includes(token), `the router must never branch on format (${token})`); } });