From 1bf413b3ac586959abbfb19723b3679a8ec8db82 Mon Sep 17 00:00:00 2001 From: araharah-executor Date: Sun, 25 Oct 2026 18:37:01 +0800 Subject: [PATCH] test(08-02): L5 overflow vector becomes a 3-node path A 2-node graph has no degree>=2 candidates, so farthestPointAnchors returns empty before any Dijkstra runs and never reaches the overflow throw. Node 1 on a 3-node path is a candidate, so the selection pass actually exercises the law. --- routing/test/landmark.test.mjs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/routing/test/landmark.test.mjs b/routing/test/landmark.test.mjs index 75ff333..66fd943 100644 --- a/routing/test/landmark.test.mjs +++ b/routing/test/landmark.test.mjs @@ -170,11 +170,16 @@ test("L4 asymmetry — reversed vs forward rows differ on an oneway graph", asyn test("L5 overflow throws — any label > 65000 quanta fails loud, naming the fix", async () => { const { landmarkTables, farthestPointAnchors, LANDMARK_MAX_QUANTA } = await loadLandmark(); assert.equal(LANDMARK_MAX_QUANTA, 65000); + // 3-node path so node 1 is a degree-2 candidate — the anchor-selection + // pass actually runs (a 2-node graph has no candidates and returns + // empty before any Dijkstra). const input = { - nodeCount: 2, + nodeCount: 3, edges: [ { from: 0, to: 1, seconds: 10, flags: 0 }, // floor(10/0.0001) = 100000 quanta { from: 1, to: 0, seconds: 10, flags: 0 }, + { from: 1, to: 2, seconds: 10, flags: 0 }, + { from: 2, to: 1, seconds: 10, flags: 0 }, ], quantumS: 0.0001, };