9.9 KiB
phase, plan, subsystem, tags, requires, provides, affects, tech-stack, key-files, key-decisions, patterns-established, requirements-completed, duration, completed
| phase | plan | subsystem | tags | requires | provides | affects | tech-stack | key-files | key-decisions | patterns-established | requirements-completed | duration | completed | |||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 08-alt-landmark-preprocessing-routing-backend-v2 | 03 | routing |
|
|
|
|
|
|
|
|
|
~9min | 2026-10-25 |
Phase 8 Plan 08-03: ALT Potentials + Rollout Pins Summary
ALT steering is live in routeAstar — h_f/h_b are now max(ALT triangle bounds, haversine) over the ARG2 landmark tables inside the byte-identical BH skeleton, with A1's 625-pair Dijkstra-equivalence sweep re-proving optimality under ALT, dedicated island/skip containment cases, and RO1/RO2 pins locking the upload/router seams format-agnostic (routing 79/79 + bot 126/126 + both typechecks green).
Performance
- Duration: ~9 min (10:55–11:04 UTC)
- Started: 2026-10-25T10:55:12Z
- Completed: 2026-10-25T11:04:00Z
- Tasks: 2/2 (task 1 with full RED→GREEN gate commits)
- Files modified: 3 (1 created, 2 modified)
Accomplishments
- The entire runtime change of Phase 8 landed in one function:
routeAstar'spotential()now derives h_f/h_b fromgraph.landmarkTo/landmarkFrom/landmarkQuantumS— four per-search constant tables hoisted in quanta (0xFFFF written as NaN drops that landmark for the WHOLE search), then a lazy per-node max over the four triangle families (toward-goal A/B, toward-origin A/B) with RAW u16 sentinel compares before any float conversion, max-combined with the existing haversine bound. The (h_f−h_b)/2 combination, reductions, balanced alternation, meet probes, stop rule, and real-seconds reconstruction are byte-identical — the survey's (πf−πr)/2 is what p_f already was. - Optimality re-proven under ALT: A1's exhaustive 25×25 = 625-pair brute-force Dijkstra-equivalence sweep is green with the potentials live, plus A9 (169-pair island sweep: A-internal pairs with real ALT bounds, B-internal pairs on the haversine fallback, 72 cross pairs → null) and A10 (16 anchorless-component pairs — all families dropped at search scope, still exactly optimal).
- The D-01 rollout locks are mechanical: new
rollout.test.mjspins upload-road-graph.mjs's KEY/BUCKET + zero format tokens in comment-stripped code (RO1), and worker-router.ts's unchanged GRAPH_KEY + exactly ONE decodeGraph call + no version branch (RO2) — the campaign (08-05) cannot silently grow format awareness (T-08-08 enforced, not customary). - Full battery green at the final commit: routing:test 79/79 (A1 seal + A9/A10/A11 + RO1/RO2 + untouched L/G/A/P/R/S suites), bot 126/126 — the FIRST commit where the RT trunks and guidance-cron run with ALT potentials reading real tables on their ARG2 corridor graphs — and routing+bot typechecks clean.
git diff --staton worker-router.ts and upload-road-graph.mjs is empty.
Task Commits
Each task was committed atomically (task 1 carried its RED→GREEN gates):
- task 1: ALT potentials in routeAstar + the containment A-cases —
92b97fc(test, RED: A11 failing for the right reason, A9/A10 baseline-equivalent) →ddd2f3c(feat, GREEN) - task 2: Rollout pins (RO1/RO2) + the full-battery seal —
8fac68b(test)
Files Created/Modified
routing/src/astar.ts— ALT per-search constant tables +bound()helper +potential()swap + ALT doc paragraphs (module header + routeAstar BH block; Ikeda history intact); NO other function touched, no new importsrouting/test/astar.test.mjs— case index A1–A8 → A1–A11;buildIslandFixture(two-component synthetic whose tables flow through the ONE landmark module); A9 island sweep, A10 search-scoped-skip sweep, A11 structural pin (landmark tokens in comment-stripped CODE, one sentinel spelling, A8's no-Map law unchanged)routing/test/rollout.test.mjs— created: RO1/RO2 structural pins in the harness's zero-dep shape
Decisions Made
- One
bound()helper instead of a duplicated ℓ-loop: the plan's sketch marks shape/naming as the executor's; both cache-miss branches mirror through the same allocation-free loop, keeping the family logic in exactly one place while theconst value = (hf - hb) / 2tail stays byte-identical. - A9/A10 pass at RED by design: they assert seconds-only Dijkstra equivalence, which the pre-ALT haversine implementation already satisfies — they are baseline-equivalence at RED and containment seals at GREEN; A11 (structural) is the RED gate and fails for exactly the right reason ("must reference landmarkTo in code").
- Fixture anchors pinned, not derived:
buildIslandFixture(anchors)takes the anchor array and routes it throughlandmarkTables— the island precondition (every component-B cell is the 0xFFFF sentinel in both families) is asserted as a fixture law inside A9 before any routing assertion.
Deviations from Plan
None - plan executed exactly as written. (One in-task compliance edit: the GREEN comment initially cited the sentinel's decimal value; the plan's own acceptance grep 65535 = 0 caught it before the commit — reworded, no behavior change, contained in ddd2f3c.)
TDD Gate Compliance
Task 1 ran full RED→GREEN with separate commits: 92b97fc (test — A11 FAIL verified for the right reason, 76/77 passing) BEFORE ddd2f3c (feat — 77/77). No gate skipped; no refactor commit needed (the swap landed clean).
Issues Encountered
- None beyond the in-task comment reword above. The full battery passed on its first run after each gate.
User Setup Required
None - no external service configuration required.
Next Phase Readiness
- 08-04 (build script): the preprocessing stage now has its live consumer —
build-road-graph.mjsstill encodes WITHOUT landmarks until its stage lands; once it emits ARG2 the real binary steers with these exact potentials. - 08-05 (campaign): the search-side surface is final; the CPU gate (p95 ≤ 8) and the D-03 optimality gate measure THIS code. The D-02 remediation knob (raise L, rebuild) touches build parameters only — the reductions/stop rule are pinned untouched by A1/A8/A11 and RO1/RO2.
- Known state: the real KL binary on disk is still ARG1 → decodes null → router-pending (designed, D-01) until 08-04/08-05 rebuild + re-upload; the committed fixtures all carry tables, so every suite surface runs ALT live.
Phase: 08-alt-landmark-preprocessing-routing-backend-v2 Completed: 2026-10-25
Self-Check: PASSED
All 3 claimed files exist on disk; all 3 task commits (92b97fc, ddd2f3c, 8fac68b) exist in git history. Final battery at 8fac68b: routing:test 79/79, bot 126/126, routing:typecheck + bot:typecheck clean; git diff --stat bot/src/routing/worker-router.ts routing/scripts/upload-road-graph.mjs empty.