- new named constant LANDMARK_I32_WEIGHT_CEILING (0x7fffffff) in
landmark.ts: a seconds/quantumS quotient at or past 2^31 would wrap
NEGATIVE on the Int32Array store, silently bypassing the
LANDMARK_MAX_QUANTA throw in dijkstraPass (a negative contribution
never exceeds it) and — at a -1 wrap — becoming the 0xFFFF sentinel;
prepare() now fails loud at the table-build entry, naming the edge,
the ceiling and the fix (raise landmarkQuantumS)
- 'nothing is clamped, ever' now holds at the storage boundary;
validation is per-edge at build entry — the search hot path stays
allocation-free and validation-free
- L5b regression vector: 3e10 s edge (3e11 quanta) throws in both
landmarkTables and farthestPointAnchors; just-under-ceiling
(2147483646) still fails via the documented 65000 law; ordinary
weights untouched
farthestPointAnchors + landmarkTables + landmarkCoverage over the
ĉ metric: edge weights floor-quantized once (Math.floor(seconds/q)),
exact integer Dijkstras (Int32 labels, binary heap, lazy deletion),
0xFFFF sentinel, 65000-quantum loud overflow. Traversal law mirrors
astar.ts verbatim: bit0 edges never relaxed in EITHER direction.
Test-vector corrections caught at GREEN (expectations were wrong,
implementation was right):
- L4: rows index by anchor POSITION (row-major [l*N+v]), not node id
- L6: the c-metric farthest node from corner 0 is interior node 18
(297q: interior hops cost 2x perimeter), not corner 24 (264q) —
verified against an independent brute-force Dijkstra
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.
Hand-computed vectors for the pure landmark compute core: deterministic
degree-filtered farthest-point anchors, exact integer quanta
(floor(2.55/0.1)=25, two edges=50), 0xFFFF sentinel + self-cell laws,
oneway asymmetry, the 65000-quantum overflow throw, and the 5x5-grid
corner-to-corner 264-quanta vector with coverage 1.0.