fix(08-05): route-cpu gate law re-anchored to the post-ALT measured truth (escalation record — no retirement)
Task 3, re-scoped per the plan's honest-FAIL branch: the CPU verdict FAILED (the ladder ran to its documented stop), so the c3 class is NOT retired — the record instead carries the executed-and-measured ALT truth. - budget-gates.mjs: the verdict law documents the Phase-8 outcome (ALT EXECUTED, optimality green, CPU verdict FAIL 152.788/185.692 ms quoted with date; L=32 probe measured worse) — the stale 'next-milestone item' wording is gone; ROUTE_CPU_DRIFT_GUARD_MS re-anchored 200 → 400 (the post-ALT documented band outgrew the old guard; ≈2x the worst shipped- config run 185.692 ms); the guard stays a regression trip-wire, the 8 ms budget stays and its FAIL still prints every run - budget-audit.test.mjs: CPU3 pins the new law (evidence must name the EXECUTED-in-Phase-8 verdict and must NEVER say 'next-milestone'); 19/19 vectors ok (the count holds — no vector dropped) - docs/BUDGETS.md: route-cpu row carries the Phase-8 measured numbers + date; the c3 section is the honest post-ALT record (what changed, the quoted gate lines, the one-directional-Lipschitz wall, the open escalation) — staged as selective hunks; the tree's pre-existing doc-sync edits in other sections remain uncommitted, untouched grep law: zero 'next-milestone' hits in budget-gates.mjs + BUDGETS.md; ROUTE_CPU_DRIFT_GUARD_MS still exported and used.
This commit is contained in:
@@ -21,20 +21,31 @@
|
||||
* runCacheHeaderGate() id: cache-headers — the LIVE header probe (re-used from cloudflare-probes.mjs)
|
||||
* runGoldenCorpusGate() id: golden-corpus — RE-RUNS `routing:corpus` + `search:corpus` as child processes
|
||||
*
|
||||
* The route-cpu verdict law (the c3 class, decided in Phase 6 / 06-04): the
|
||||
* full-sample ladder p95 (25 pairs incl. the 10 adversarial quadrant worst
|
||||
* cases) MEASURED 38–93 ms across runs — over the 8 ms product budget, and
|
||||
* the mitigation ladder was exhausted WITHIN the $0 law ((a) rejected on
|
||||
* correctness — 12/25 pairs unreachable, (b) bidirectional A* shipped,
|
||||
* (c) Workers Paid rejected on the $0 mandate). The DECIDED posture is the
|
||||
* honest degradation: cross-metro CPU exhaust → Error 1102 → fail-honest
|
||||
* null → the client's router-pending state; the committed upgrade lever is
|
||||
* ALT landmark preprocessing (next milestone). This gate therefore checks
|
||||
* the measured p95 against the DOCUMENTED accepted band (a 200 ms drift
|
||||
* guard ≈ 2x the worst documented run): a p95 inside the band is the
|
||||
* documented state (the record still prints it against the 8 ms budget with
|
||||
* negative headroom — nothing is hidden); a p95 beyond it is UNCHARTED
|
||||
* regression and FAILS.
|
||||
* The route-cpu verdict law (the c3 class, decided in Phase 6 / 06-04,
|
||||
* re-measured in Phase 8 / 08-05): the full-sample ladder p95 (25 pairs incl.
|
||||
* the 10 adversarial quadrant worst cases) MEASURED 38–93 ms pre-ALT across
|
||||
* runs — over the 8 ms product budget, and the mitigation ladder was
|
||||
* exhausted WITHIN the $0 law ((a) rejected on correctness — 12/25 pairs
|
||||
* unreachable, (b) bidirectional A* shipped, (c) Workers Paid rejected on
|
||||
* the $0 mandate). The DECIDED posture is the honest degradation: cross-metro
|
||||
* CPU exhaust → Error 1102 → fail-honest null → the client's router-pending
|
||||
* state. The ALT landmark lever was EXECUTED in Phase 8 (ARG2 binary +
|
||||
* landmark steering) and MEASURED on 2026-10-25: the optimality gate is green
|
||||
* (route seconds equal the frozen pre-ALT record within ±0.1%), but the CPU
|
||||
* verdict FAILED honestly — 25-route p95 152.788 ms, extended 100-pair p95
|
||||
* 185.692 ms (both far over the 8 ms budget; the L=32 probe measured worse:
|
||||
* 182.725 / 204.499 ms). The sound-but-slower toTable-only steering is
|
||||
* mandatory: the fromTable families are one-directional Lipschitz (their
|
||||
* u-side term needs the reverse edge, which a oneway does not provide) and
|
||||
* the shared Ikeda average p = (h_f − h_b)/2 is consistent only with
|
||||
* two-sided families — the c3 class therefore REMAINS the accepted designed
|
||||
* degradation, and the honest escalation (direction-split potentials with a
|
||||
* re-proven meet rule, Contraction Hierarchies, or Workers Paid) stays open
|
||||
* for the maintainer. This gate checks the measured p95 against the
|
||||
* DOCUMENTED accepted band (a drift guard ≈ 2x the worst documented
|
||||
* accepted run): a p95 inside the band is the documented state (the record
|
||||
* still prints it against the 8 ms budget with negative headroom — nothing
|
||||
* is hidden); a p95 beyond it is UNCHARTED regression and FAILS.
|
||||
*
|
||||
* Test injectability (the privacy-audit suite precedent): every gate accepts
|
||||
* opts-only path overrides; production callers pass nothing.
|
||||
@@ -55,10 +66,13 @@ export const P95_BUDGET_MS = 8;
|
||||
export const ROUTE_PAYLOAD_BUDGET_BYTES = 204800;
|
||||
/** The whole-app bundle ceiling (D-06's record row): 500 KB gz for ALL of web/dist/assets/*.js. */
|
||||
export const APP_BUNDLE_BUDGET_BYTES = 500000;
|
||||
/** The drift guard for the accepted c3 band: the documented accepted p95 tops
|
||||
* at 93.6 ms (06-04's worst shared-box run); beyond 200 ms nothing the
|
||||
* escalation examined applies — uncharted regression. */
|
||||
export const ROUTE_CPU_DRIFT_GUARD_MS = 200;
|
||||
/** The drift guard for the accepted c3 band: the documented accepted runs top
|
||||
* at 185.692 ms (the shipped L=24 ARG2 config's extended-100 verdict,
|
||||
* 2026-10-25); the pre-ALT band topped at 93.6 ms (06-04's worst shared-box
|
||||
* run) and the L=32 probe measured 204.499 ms. The guard sits at ≈ 2x the
|
||||
* worst documented shipped-config run — beyond it nothing the escalation
|
||||
* examined applies: uncharted regression. */
|
||||
export const ROUTE_CPU_DRIFT_GUARD_MS = 400;
|
||||
|
||||
/** A missing environment is the exit-2 class: pass:false + notRun:true. */
|
||||
function notRun(id, reason) {
|
||||
@@ -122,9 +136,9 @@ export function runCpuLadderGate(opts = {}) {
|
||||
// state (see the header's verdict law); beyond the drift guard = FAIL.
|
||||
const pass = !uncharted;
|
||||
const verdict = uncharted
|
||||
? `UNCHARTED REGRESSION — p95 beyond the ${ROUTE_CPU_DRIFT_GUARD_MS} ms drift guard (the documented accepted c3 band tops at ~93 ms)`
|
||||
? `UNCHARTED REGRESSION — p95 beyond the ${ROUTE_CPU_DRIFT_GUARD_MS} ms drift guard (the documented accepted c3 band tops at 185.7 ms measured, 2026-10-25)`
|
||||
: overBudget
|
||||
? `over the ${P95_BUDGET_MS} ms product budget — the DOCUMENTED, ACCEPTED c3 class (cross-metro honest degradation: 1102 → fail-honest null → router-pending; mitigation ladder exhausted within the $0 law; the ALT landmark lever is a next-milestone item)`
|
||||
? `over the ${P95_BUDGET_MS} ms product budget — the DOCUMENTED, ACCEPTED c3 class (cross-metro honest degradation: 1102 → fail-honest null → router-pending; the ALT landmark lever was EXECUTED in Phase 8 and measured over budget on 2026-10-25 — optimality green, CPU verdict FAIL — so the class remains; the escalation stays open)`
|
||||
: `within the ${P95_BUDGET_MS} ms product budget`;
|
||||
const evidence =
|
||||
`p95 ${p95.toFixed(3)} ms <= 8 ms budget (10 ms free-plan ceiling) — NOT satisfied as stated: ` +
|
||||
|
||||
@@ -111,6 +111,10 @@ await test("CPU3 on the current tree the ladder runs, the measured p95 is printe
|
||||
assert.match(r.evidence, /10 ms free-plan ceiling/, "the free-plan ceiling must be printed");
|
||||
assert.match(r.evidence, /GATE FAIL/, "the child's own GATE FAIL line (cross-metro class) is part of the evidence");
|
||||
assert.match(r.evidence, /c3/, "the accepted c3 escalation class must be named");
|
||||
// 08-05 pin: the record carries the POST-ALT truth — the ALT lever was
|
||||
// executed and measured over budget (never "a next-milestone item" again).
|
||||
assert.match(r.evidence, /EXECUTED in Phase 8/, "the executed-and-measured ALT verdict must be named");
|
||||
assert.doesNotMatch(r.evidence, /next-milestone/, "the stale next-milestone wording must never return");
|
||||
});
|
||||
|
||||
await test("CPU4 a missing graph binary is notRun — NEVER a pass (T-07-22)", async () => {
|
||||
|
||||
Reference in New Issue
Block a user