Commit Graph
12 Commits
Author SHA1 Message Date
araharah-executor 58a5d406a3 feat(08.1-02): replace the ALT build stage with measured CH preprocessing (GREEN)
- The build no longer imports landmark.ts (deleted in 08.1-01) and has no
  --landmarks knob: the compacted directed edges feed contractGraph (the
  ONE CH construction authority) and the tables encode through the single
  encodeGraph authority as the ch: block (never landmarks:).
- Any contraction/encode throw names the CH preprocessing stage and exits 1
  BEFORE any write — collect-then-write keeps the previous binary intact
  (T-08.1-10).
- The build prints the measured CH stats block (D-08/D-09): contracted
  nodes, shortcuts + ratio per node, witness searches + settle-budget hits,
  chRank bytes, shortcut bytes, wall-clock over contraction + encode, and
  total binary bytes. No ARG3 payload ceiling exists (D-08) — the enforced
  1-80 MB D-01 envelope is unchanged and still fails before any write.
- The stale ARG2-era 30 MB forecast advisory is retired with the layout it
  forecasted; the measurement itself is the record.
- --check becomes a pure decode+facts tool for any valid ARG3 (the
  committed mini fixture included): prints chShortcutCount, shortcut
  ratio, chRank length; the envelope appears as an advisory line — the
  enforced gates stay in the build path.
2026-10-26 07:46:41 +08:00
araharah-executor 11e55c11bc fix(08): WR-01 — oracle-sweep optimality compare is symmetric (|Δ| both directions)
- sweepOracle: Math.abs(deltaS) > ORACLE_EPSILON_S replaces the one-sided
  'seconds > optimal + eps' check — a result FASTER than the Dijkstra
  oracle (the traversal-law-break signature, e.g. a oneway relaxed) is
  now a violation, stamped ORACLE-MISMATCH, never a pass
- worstDeltaPct tracks MAGNITUDE not sign — a -40% law break moves it
- pass gate: suboptimal === 0 && oracleMismatch === 0 && classBreaks === 0
- header gate description + exit codes updated: the check is |Δ| in both
  directions; GATE FAIL names both violation classes; GATE PASS reads
  0/N |Δ| violations
- row-level signed Δ printout unchanged (sign/direction reporting kept)
2026-10-25 22:35:37 +08:00
araharah-executor 97d6e35c3a feat(08): committed 200-pair real-graph Dijkstra-oracle sweep — the optimality pin D-03's fixed corpus cannot be
measure-astar-oracle-sweep.mjs (maintainer-time, route-corpus law: exported
core sweepOracle + CLI guard, print-the-measurement, honest exit codes):

- FRESH seeded cross-metro pairs via measure-optimality-baseline.mjs's
  exported generateCrossMetroPairs core — seed 0x08f1, deliberately NOT
  the D-03 corpus seed 0x08a1, so this sweep never measures the corpus
- compared-pair law: one 3x-oversampled draw, consumed in order until 200
  COMPARED pairs (reachable + null-vs-null unreachable both compare;
  snap misses counted and printed; same binary + seed => same set) —
  random bbox coordinates are ~20% off-road and an unsnappable pair
  cannot exercise the search
- brute-force unidirectional Dijkstra oracle (label-setting, heap, the
  shared oneway traversal law) on the SAME snapped node pair
- gate: 0 suboptimal (epsilon 1e-6 s — f64 summation-order noise floor,
  A1's epsilon); class-breaks (one side routes, other doesn't) violate
- honest skip when the gitignored binary is absent (exit 0, SKIP printed)

First run on the fixed engine: 200 compared (182 routed, 18 unreachable),
0 SUBOPTIMAL, worst delta +0.000% — GATE PASS. The pre-F1 engine measured
1/194 suboptimal on this pair shape (bench7, debug session).
2026-10-25 22:11:02 +08:00
araharah-executor 149636ce0a fix(08-05): D-03 optimality gate green — fromTable families removed from the ALT potential
Task 1: the D-03 gate script (measure-optimality-gate.mjs) reads the frozen
pre-ALT record, re-routes the same coordinate-pinned pairs on the current
ARG2 binary, and gates on seconds-equality (±0.1%) + verdict-class
preservation — never on node paths (equal-cost ties are documented behavior).

Rule-1 deviation the gate forced on its first run: routeAstar returned
SUBOPTIMAL real-graph routes (x038: 1234.6s vs the 1214.8s Dijkstra optimum;
x045: 1475.5s vs 1460.6s) — the fixture sweep could not see it. Root cause:
the fromTable bound d̂(ℓ,t) − d̂(ℓ,v) is one-directional Lipschitz (its u-side
term needs the REVERSE edge; a oneway does not provide one — the anchor
reached node 264611 126.8s faster than its own 1.49s upstream neighbour
264610), and the shared Ikeda average p = (h_f − h_b)/2 is consistent only
when every family inside h_f/h_b is two-sided. The toTable bound
d̂(v,ℓ) − d̂(t,ℓ) rides stored traversable edges in BOTH directions; it alone
joins the haversine now. Stop rule, reductions, meet probes, reconstruction:
untouched. landmarkTables/build verified EXACT (0 mismatches vs independent
integer Dijkstras, both rows, all 24 anchors).

- measure-optimality-gate.mjs: exported core + CLI guard (route-corpus
  pattern); epsilon mirror + argVersion asserts precede any measurement;
  per-pair rows, extract-drift WARNING (never a re-record), honest exit law
- astar.ts: potential() consults landmarkTo only; doc-comments carry the
  one-directional-Lipschitz law and the x038/x045 evidence
- astar.test.mjs: A11 re-pinned (landmarkFrom must NOT appear in the
  comment-stripped search — re-adding it trips the pin); A12 oneway-ring
  sweep added (directed reach asymmetry stays Dijkstra-equal on every pair)

Battery: routing 80/80, bot 126/126, both typechecks green.
D-03 gate: GATE PASS — 53/53 routed pairs equal within ±0.1% (max |Δ| 0.005%),
verdict classes preserved (6 unreachable + 41 unsnappable, 0 re-snapped).
2026-10-25 19:54:24 +08:00
araharah-executor 698fdf4689 feat(08-04): ALT preprocessing stage in the build tool — landmark tables through the ONE module
- The stage between edge compaction and encode feeds the graph's edges to
  landmark.ts (farthestPointAnchors + landmarkTables + landmarkCoverage) —
  the script quantizes and implements nothing itself (single-authority law)
- D-02 scaling rule L = clamp(round(N/13000), 16, 32) (~24 at KL's 311k
  nodes) with a --landmarks <n> measured knob (positive int, hard cap 128,
  parsed before --check)
- Honest gates before any write: quantum-ceiling throw -> fail with the
  raise-quantum hint (Pitfall 5); per-anchor coverage >= 0.9 (the SAME
  fraction for any L — the override cannot lower it, T-08-11); anchor
  shortfall fails loud instead of encoding a weaker ALT
- encodeGraph receives landmarks: { quantumS, nodes, to, from } — the one
  ARG2 authority; no local fallback encode
- Stats gate prints L/quantum/coverage min-mean/table bytes/sentinel totals
  BEFORE the size gates; --check mirrors the facts from the decoded binary
  (landmarkCount/quantum/anchors/coverage/sentinels, no network)
- A1 ladder history gains rung (c2): EXECUTED in this preprocessing stage
2026-10-25 19:10:53 +08:00
araharah-executor 477961addd feat(routing): 08-01 task 3 — --extended D-04 verdict on the CPU gate (100 cross-metro pairs, seed 0x08a1 shared with the baseline); default zero-arg mode byte-compatible, budget-audit 19/19 2026-10-25 17:15:02 +08:00
araharah-executor 643df1a07b feat(routing): 08-01 task 2 — pre-ALT optimality baseline: recorder + committed 100-pair record (D-03 anchor, measured before ARG2 lands, immutable) 2026-10-25 17:13:09 +08:00
araharah-executor 9c50fb033e feat(06-07): committed 8-glyph PNG set rasterized from the app's SVG sources (D-12)
- routing/scripts/build-glyphs.mjs: maintainer shell (Usage/Exit codes/
  collect-then-write — a missing/invalid source exits 1 with the kind named
  and nothing written); recolors currentColor → #EB8008 in-memory and
  injects a full-bleed #1A1A1A plate (stroke="none" — it must not inherit
  the root's orange stroke); the committed SVGs are THE single source and
  stay untouched
- sharp 0.35.5 as a routing devDependency (maintainer-only, zero runtime
  deps); 'glyphs' script added
- 8× 256×256 PNGs committed (web/public/glyphs/) — the chat turn-card's
  sendPhoto URL rides the Worker's static handler; two render bugs fixed
  en route: density multiplied the explicit size attrs into 2048² (dropped),
  and the plate inherited the root stroke (orange frame — stroke="none")
- SVG sources verified unchanged after the run
2026-10-24 19:53:09 +08:00
araharah-executor ea9584d163 feat(06-04): R2 upload + A*-CPU measurement gate + the A1 ladder executed to its decision point
- upload-road-graph.mjs: wrangler-shelled maintainer tool (pre-flight 1-80MB,
  round-trip verify hint); bucket araharah-graphs NOT created — R2 is not yet
  enabled on the account (wrangler code 10042) — dashboard one-time activation
  is the phase's user_setup item
- measure-route-cpu.mjs: 25-pair gate (corpus + seeded quadrant spread),
  hrtime around routeAstar, warm-up excluded, unreachable probes reported
  SEPARATELY from the routed p95, exits 1 over the 8ms budget
- Rule 1 (measured): the class set lacked *_link ramps — the graph FRAGMENTED
  (7.7% of nodes in severed motorway islands; corpus pairs 'unreachable').
  5 link classes added -> 311325 nodes / 677068 edges / 14.7 MB, all landmarks
  in one component; enforced floor corrected 1KB -> 1MB (D-01)
- ladder (a) drop tertiary+residential: p95 17.8ms but 12/25 pairs unreachable
  — REJECTED on correctness (D-03), reverted, ladder history recorded
- ladder (b) bidirectional A* (BH, Ikeda potentials, reverse-CSR WeakMap):
  provably optimal (A1 625-pair sweep green), alternation balanced by heap
  size (raw-top comparison starves the backward side 19501:3), reduction
  signs in the standard feasible form. Measured: p95 ~38-93ms — NO GATE PASS.
  The potential split halves each side's steering, cancelling the halved radius
- GATE FAIL is the honest verdict: ladder (c) — Workers Paid vs layout-v2 ALT
  (still $0) vs free-plan-with-degradation — requires maintainer sign-off;
  docs/ROAD-GRAPH.md carries the decision table and the fork contract
2026-10-24 13:56:18 +08:00
araharah-executor d51fd8b47b feat(06-04): road-graph build tool — Overpass extract → pinned CSR binary with the D-01 stats gate
- maintainer-time repo tool (nothing in bot/web/routing src imports it): drivable-class
  Overpass extract (Pitfall 1 filter), nodes deduped by rounded coord, oneway/-1/roundabout
  flag law, maxspeed-tag overrides over class defaults, name-pool interning
- bbox derived mechanically from the committed corpus (gazetteer entries + golden pairs
  ± 0.05 deg, printed) — Open Q 4's pinning
- collect-then-write + ENFORCED size gate (>1 MB, <=80 MB, exit 1 outside) + advisory
  30-80 MB band warning; --check mode decodes and re-prints the gate, zero network
- routing/data/.gitignore: *.bin is an ODbL-derived build artifact — forks build their own
- real KL graph built: 277514 nodes / 598396 edges / 21447 names / 13.1 MB (gate PASS,
  band warning printed for review)
2026-10-24 13:19:07 +08:00
araharah-executor 6c0880b4db feat(05-02): offline corpus tolerance gate — measurePairs core + CLI + in-suite RT1-RT10 (GREEN)
- routing/scripts/route-corpus.mjs: the shared measurement core (exported
  measurePairs) + CLI reporter in the gazetteer-corpus.mjs shape — one
  measurement, two reporters, no drift
- RT1 corpus size 10..20; RT2 schema + RT2b mechanical D-12 proof (every
  committed origin equals its gazetteer landmark within 1e-4 deg); RT3 route
  shape; RT4 probe exclusion (national-museum never a destination); RT5
  haversine-vs-summary band [0.85, 1.10] + bbox+0.05; RT6 speed [1.0, 30] m/s;
  RT7 codec round-trip per route; RT8 ODbL header surfaces; RT9 gz budget
  (measured 16576 B / 102400 B); RT10 alternatives floor (8 pairs / floor 4)
- fully offline: zero network in the measurement path (T-05-05); pair ids and
  measurements printed, never geometry strings (D-15); fixed escalation
  ladder on failure (--only repair -> regenerate -> re-gate)
- suite: 35 passed, 0 failed; npm run routing:corpus exits 0; typecheck clean
2026-10-24 05:19:55 +08:00
araharah-executor 4e89cff552 feat(05-02): pinned golden-pair corpus + OSRM-demo fetch tool + populated committed dataset (GREEN)
- routing/test/fixtures/golden-pairs.json: the hand-authored 15-pair pinned
  corpus (D-02/D-12) — origins AND destinations are gazetteer landmarks,
  klBbox + 100 KB gz budget + probe id + alternatives floor pinned
- routing/scripts/fetch-route-fixtures.mjs: the maintainer build tool
  (overpass-topup.mjs pattern) — D-12 boundary in the header, pre-flight
  public-coordinate proof against the gazetteer (1e-4 deg), mandatory
  User-Agent, 1200 ms inter-request delay, one retry on network/5xx,
  collect-then-write, --only=<pairId> single-pair repair merge
- routing/src/data/route-fixtures.json: 15 real OSRM-demo pairs committed
  (1-3 verbatim polyline6 routes each; 8 pairs carry >= 2 alternates),
  ODbL header fields preserved (T-05-06)
- loader-env L3 armed (RED commit 01b0ed6) + C6 re-pinned from the empty-seed
  state to the populated corpus (05-01 documented both as 05-02 handoffs)
- npm delegates: root routing:fixtures; routing fixtures + corpus scripts
2026-10-24 05:17:01 +08:00