mirror of
https://github.com/zvx-echo6/navi.git
synced 2026-08-26 17:31:37 +00:00
No description
- JavaScript 96.9%
- CSS 2.9%
- HTML 0.2%
* navi-offroute: HPA tile DB manifest pattern (H6a-pre, unblocks continental rollout)
Replaces the single-file NAVI_OFFROUTE_HPA_DB env var with a directory-based
manifest layout (NAVI_OFFROUTE_HPA_DIR + manifest.json) so one deployment can
carry multiple regional tile DBs side by side and look up which one(s) cover
a route bbox. The two-level HPA* kernel (astar_hpa_multimode) is unchanged;
router.py asks the new hpa_manifest module for matching tile DBs and forwards
the path to the existing kernel.
Manifest schema (version 1):
{"version": 1, "tile_dbs": [
{"name": "idaho", "path": "idaho.db",
"chunk_bounds": {"min_x": -8550, "max_x": -8430, "min_y": 3100, "max_y": 3260}}
]}
- path is relative to the manifest directory.
- chunk_bounds is inclusive in chunk-index space; null = covers everywhere.
- Multiple entries may overlap; v1 dispatch only handles single-region routes,
multi-region falls through to the unified kernel (UNION across DBs is a
future PR — needs astar_hpa_multimode signature change).
Backward-compat: if NAVI_OFFROUTE_HPA_DB is set and NAVI_OFFROUTE_HPA_DIR is
not, the loader synthesizes a single unbounded entry and warns (deprecation).
Current deploy keeps working byte-identically; env-file migration happens as
a separate follow-up step.
Touches:
+ hpa_manifest.py (new, 144 LOC) — schema, loaders, lookup, lazy conn cache
~ router.py (-24 +31) — _HPA_MANIFEST replaces HPA_TILE_DB; dispatch site
consults manifest.dbs_for_route_bbox; _hpa_eligible uses manifest.enabled
+ tests/test_hpa_manifest.py (new, 117 LOC) — 8 tests covering all paths
~ tests/test_hpa_runtime.py (4 lines) — monkeypatch _HPA_MANIFEST instead
No touches to hpa_build, astar, transitions, cost, mvum. No schema change.
No service restart, no env-file edit (deploy migration happens after merge).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* navi-offroute: drop unused connection cache from HPAManifest (cleanup)
The connection cache field (_conns) and get_connection() method were
shipped in PR #53 "ready for future use" but never consumed by the v1
dispatch path: astar_hpa_multimode opens its own sqlite connection per
call (astar.py:752) and changing that signature was out of scope.
Per self-review of PR #53: shipping dead code in a PR is wrong even
when the rationale is "future PRs will use it." Removing it here keeps
the manifest module focused on lookup; whoever needs the cache later
can add it alongside the use site.
- Drop _conns field, get_connection() method.
- Drop sqlite3 + Dict imports (no longer referenced).
- Drop test_get_connection_caches_per_path.
23 deletions, 2 insertions. No production behaviour change.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Ubuntu <zvx@recon-vm.echo6.co>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| backend | ||
| frontend | ||