Epic: M4 — BRouter as router #5

Closed
opened 2026-07-27 11:03:57 +00:00 by jmz · 5 comments
Owner

Goal: evaluate routing on BRouter (custom IGN + trail-running profiles) instead of Valhalla, unifying the two planners and improving trail-following.

  • Investigate upstream feat/pluginRouting branch — is routing pluggable? (plugin vs overlay)
  • Prototype a BRouter routing adapter
  • Compare route quality vs Valhalla on Mercantour trails
  • Decide plugin vs overlay; implement
**Goal:** evaluate routing on BRouter (custom IGN + trail-running profiles) instead of Valhalla, unifying the two planners and improving trail-following. - [x] Investigate upstream `feat/pluginRouting` branch — is routing pluggable? (plugin vs overlay) - [x] Prototype a BRouter routing adapter - [x] Compare route quality vs Valhalla on Mercantour trails - [x] Decide plugin vs overlay; implement
Author
Owner

M4 progress — Phases 1 & 2 shipped & deployed (2026-07-29)

Delivered the pluggable routing port and BRouter integration, deployed to prod (wanderer-web:deploy-1124b306, homelab-flux PR #250; BROUTER_URL=http://brouter:17777 wired). Verified the deployed BRouter proxy end-to-end: POST /api/v1/brouter/route for a Mercantour pair → distanceM 4235, D+ 765, 258 pts, profile mercantour-run.

Phase 1 — routing port + Valhalla adapter (behavior-preserving refactor):

  • RoutingPort hexagonal interface + domain types (web/src/lib/routing/port.ts): RouteRequest/RoutingPreferences/RouteResult/RouterCapabilities, per-engine escape hatch (backend.{valhalla,brouter}).
  • ValhallaAdapter extracted from valhalla_store; calculateRouteBetween routes through the port with byte-identical output (characterization test).
  • getRouter() factory + persisted behavior.router setting.

Phase 2 — BRouter adapter + technicality + escape hatch:

  • Server proxy /api/v1/brouter/route ($lib/server/brouter.ts): validated param-substituted profile upload mechanism (inline URL params are ignored by BRouter) with hash-cache; typed 422 unroutable.
  • BRouterAdapter + translateBRouter(prefs) (SAC technicality → SAC_scale_preferred/limit; avoidRoads→path_preference; elevationBias→consider_elevation); escape hatch merges backend.brouter.params/rawProfile over translated prefs.
  • Planner UI: router selector (Valhalla/BRouter), technicality control (capability-greyed), collapsible Advanced BRouter panel (param rows + raw-profile).

Phase 3 — loop generator (remaining). De-risked (prototype docs/prototypes/loopgen-brouter.py validated: adaptive via-count n=max(3,round(dist/4000)) reaches 20–25 km at <3% error with D+ steering). One prerequisite tracked: the proxy's profile-upload cache can mislabel a stale/evicted custom_<id> as 422-unroutable — invalidate-and-retry (or TTL) before the generator stresses it with many uploads.

Adjacent feature also shipped (same deploy): per-segment off-road (beeline) routing (Komoot-style) — sticky Track/Off-road toggle + Shift one-off + editable per segment + persisted in trkseg extensions + dashed rendering. Built on this port. Spec/plan in docs/superpowers/{specs,plans}/2026-07-29-per-segment-offroad-routing*.

Spec/plan for the port + generator: docs/superpowers/{specs,plans}/2026-07-29-routing-port-and-generator*. All on branch deploy.

## M4 progress — Phases 1 & 2 shipped & deployed (2026-07-29) Delivered the pluggable routing port and BRouter integration, deployed to prod (`wanderer-web:deploy-1124b306`, homelab-flux PR #250; `BROUTER_URL=http://brouter:17777` wired). Verified the deployed BRouter proxy end-to-end: `POST /api/v1/brouter/route` for a Mercantour pair → distanceM 4235, D+ 765, 258 pts, profile `mercantour-run`. **Phase 1 — routing port + Valhalla adapter (behavior-preserving refactor):** - `RoutingPort` hexagonal interface + domain types (`web/src/lib/routing/port.ts`): `RouteRequest`/`RoutingPreferences`/`RouteResult`/`RouterCapabilities`, per-engine escape hatch (`backend.{valhalla,brouter}`). - `ValhallaAdapter` extracted from `valhalla_store`; `calculateRouteBetween` routes through the port with **byte-identical** output (characterization test). - `getRouter()` factory + persisted `behavior.router` setting. **Phase 2 — BRouter adapter + technicality + escape hatch:** - Server proxy `/api/v1/brouter/route` (`$lib/server/brouter.ts`): validated param-substituted **profile upload** mechanism (inline URL params are ignored by BRouter) with hash-cache; typed 422 `unroutable`. - `BRouterAdapter` + `translateBRouter(prefs)` (SAC technicality → `SAC_scale_preferred/limit`; `avoidRoads`→`path_preference`; `elevationBias`→`consider_elevation`); escape hatch merges `backend.brouter.params`/`rawProfile` over translated prefs. - Planner UI: router selector (Valhalla/BRouter), technicality control (capability-greyed), collapsible Advanced BRouter panel (param rows + raw-profile). **Phase 3 — loop generator (remaining).** De-risked (prototype `docs/prototypes/loopgen-brouter.py` validated: adaptive via-count `n=max(3,round(dist/4000))` reaches 20–25 km at <3% error with D+ steering). One prerequisite tracked: the proxy's profile-upload cache can mislabel a stale/evicted `custom_<id>` as 422-unroutable — invalidate-and-retry (or TTL) before the generator stresses it with many uploads. **Adjacent feature also shipped (same deploy):** per-segment **off-road (beeline) routing** (Komoot-style) — sticky Track/Off-road toggle + Shift one-off + editable per segment + persisted in `trkseg` extensions + dashed rendering. Built on this port. Spec/plan in `docs/superpowers/{specs,plans}/2026-07-29-per-segment-offroad-routing*`. Spec/plan for the port + generator: `docs/superpowers/{specs,plans}/2026-07-29-routing-port-and-generator*`. All on branch `deploy`.
Author
Owner

Off-road (beeline) segments shipped + deployed (2026-07-29, deploy-8477efc9)

Per-segment off-road routing is live and user-verified: sticky Track/Off-road toggle, Shift+click one-off override, per-segment mode editing, persisted in trkseg extensions, dashed rendering. Off-road = straight beeline with elevation sampled along the line at 10 m (Valhalla /height).

Post-deploy fixes from user testing: (1) disabled MapLibre boxZoom so Shift+click reaches the editor; (2) densified the beeline before /height (was sampling only the 2 endpoints → linear ramp); (3) a mixed-mode "elevation chart jumps back in distance" symptom resolved once 2-point off-road segments were densified.

Next: Phase 3 loop generator. Prereq being fixed first — the BRouter proxy profile-upload cache can reuse a stale custom_<id> after a BRouter restart and mislabel it as 422-unroutable (the generator reuses one profile across ~40 calls, so it would fail wholesale).

## Off-road (beeline) segments shipped + deployed (2026-07-29, deploy-8477efc9) Per-segment off-road routing is live and user-verified: sticky Track/Off-road toggle, **Shift+click** one-off override, per-segment mode editing, persisted in `trkseg` extensions, dashed rendering. Off-road = straight beeline with elevation **sampled along the line** at 10 m (Valhalla `/height`). Post-deploy fixes from user testing: (1) disabled MapLibre `boxZoom` so Shift+click reaches the editor; (2) densified the beeline before `/height` (was sampling only the 2 endpoints → linear ramp); (3) a mixed-mode "elevation chart jumps back in distance" symptom resolved once 2-point off-road segments were densified. Next: **Phase 3 loop generator**. Prereq being fixed first — the BRouter proxy profile-upload cache can reuse a stale `custom_<id>` after a BRouter restart and mislabel it as 422-unroutable (the generator reuses one profile across ~40 calls, so it would fail wholesale).
Author
Owner

M4 COMPLETE — loop generator shipped + deployed (2026-07-29, deploy-5256c491)

Phase 3 (loop generator) done and live, completing the M4 "BRouter as router" epic end-to-end: routing port → Valhalla/BRouter adapters → technicality → per-segment off-road → loop generator.

  • Generator service web/src/lib/routing/generator.ts — generateLoops(start, target, prefs, port), router-agnostic (port-only), ports the validated prototype: via-count n=max(3,round(dist/4000)), radius dist/2π circle over 8 rotations, proportional-radius convergence, D+ steering by seed selection, degenerate-loop rejection (areaRatio<0.15), hard ~40-call budget, deterministic, best-effort (returns out-of-tolerance candidates + honest "X% off").
  • Generator UI loop_generator.svelte + planner wiring — distance/D+/tolerance/technicality inputs, Generate (BRouter-backed), loading + soft-cancel, ranked candidates, map preview, and Accept (interleaved anchor placement → fully editable loop, undoable).
  • Prereq fixed: BRouter proxy profile-cache now self-heals (re-uploads a stale custom_<id> on the live-verified HTTP-500 case; unroutable 400 → 422 unchanged and never retried).

v1 limitations (tracked, non-blocking): generator has no AbortSignal (soft-cancel only); Accept clears the undo stack (GPX-import precedent); pairwise re-route on Accept can differ slightly from the whole-loop preview.

The M4 epic can be closed once you've exercised the generator in the browser.

## M4 COMPLETE — loop generator shipped + deployed (2026-07-29, deploy-5256c491) Phase 3 (loop generator) done and live, completing the M4 "BRouter as router" epic end-to-end: **routing port → Valhalla/BRouter adapters → technicality → per-segment off-road → loop generator.** - **Generator service** `web/src/lib/routing/generator.ts` — `generateLoops(start, target, prefs, port)`, router-agnostic (port-only), ports the validated prototype: via-count `n=max(3,round(dist/4000))`, radius `dist/2π` circle over 8 rotations, proportional-radius convergence, D+ steering by seed selection, degenerate-loop rejection (`areaRatio<0.15`), **hard ~40-call budget**, deterministic, best-effort (returns out-of-tolerance candidates + honest "X% off"). - **Generator UI** `loop_generator.svelte` + planner wiring — distance/D+/tolerance/technicality inputs, Generate (BRouter-backed), loading + soft-cancel, ranked candidates, map preview, and Accept (interleaved anchor placement → fully editable loop, undoable). - **Prereq fixed:** BRouter proxy profile-cache now self-heals (re-uploads a stale `custom_<id>` on the live-verified HTTP-500 case; unroutable 400 → 422 unchanged and never retried). v1 limitations (tracked, non-blocking): generator has no `AbortSignal` (soft-cancel only); Accept clears the undo stack (GPX-import precedent); pairwise re-route on Accept can differ slightly from the whole-loop preview. The M4 epic can be closed once you've exercised the generator in the browser.
Author
Owner

Loop-generator roadmap COMPLETE (2026-08-03, deploy-fd08015b) — Features C/D/E all shipped

The full 8-item loop-generator enhancement roadmap is now shipped & deployed on top of M4. Beyond the routing port + BRouter + generator (Phases 1–3) and generator-v2 (direction bias, strict loops, planner UX), the three differentiators:

  • C — Waypoint/POI inclusion (deploy-bfb298e4): force a generated loop through chosen trail waypoints + map-clicked points (spliced into the via-ring as fixed vias, distance still converges; accepted as editable anchors).
  • E — Area prioritize/deprioritize (deploy-2ec43660): draw a polygon on the map, mark prefer/avoid, soft candidate-scoring by fraction-of-loop-inside (ray-cast point-in-polygon). Introduced the reusable polyline-overlap primitive.
  • D — Novelty/familiarity bias (deploy-fd08015b, THIS): bias loops by overlap with your own past tracks — novelty favors new ground, familiarity favors known trails; strength slider + source (completed/planned/both). Fetches your nearby tracks from the Meili trails index (author + _geoRadius, precision-5 polyline decode) and scores overlap via the grid-proximity primitive. All these are capabilities Komoot/Garmin lack.

Engineering notes: the generator stayed router- and data-agnostic throughout — it scores against provided geometries; all Meili coupling lives in a store. Each feature is additive (off = today's behavior byte-identical), deterministic, port-only. A live-Meili gotcha caught pre-ship: the trails index has _geo filterable but NOT sortable (migration 1749831369), so a _geoPoint sort 500s — removed; validated live (query-shape returns cleanly, the sorted variant 500s).

Owed before heavy use: a browser smoke pass of the Familiarity/Area/Must-visit panels (all UI is type-gated only), and confirming the author filter returns your own tracks under a real session.

Specs/plans: docs/superpowers/{specs,plans}/2026-07-30-* (C, E) + 2026-08-03-* (D). All on branch deploy.

## Loop-generator roadmap COMPLETE (2026-08-03, deploy-fd08015b) — Features C/D/E all shipped The full 8-item loop-generator enhancement roadmap is now shipped & deployed on top of M4. Beyond the routing port + BRouter + generator (Phases 1–3) and generator-v2 (direction bias, strict loops, planner UX), the three differentiators: - **C — Waypoint/POI inclusion** (`deploy-bfb298e4`): force a generated loop through chosen trail waypoints + map-clicked points (spliced into the via-ring as fixed vias, distance still converges; accepted as editable anchors). - **E — Area prioritize/deprioritize** (`deploy-2ec43660`): draw a polygon on the map, mark prefer/avoid, soft candidate-scoring by fraction-of-loop-inside (ray-cast point-in-polygon). Introduced the reusable polyline-overlap primitive. - **D — Novelty/familiarity bias** (`deploy-fd08015b`, THIS): bias loops by overlap with **your own** past tracks — novelty favors new ground, familiarity favors known trails; strength slider + source (completed/planned/both). Fetches your nearby tracks from the Meili `trails` index (`author + _geoRadius`, precision-5 polyline decode) and scores overlap via the grid-proximity primitive. All these are capabilities Komoot/Garmin lack. **Engineering notes:** the generator stayed router- **and** data-agnostic throughout — it scores against *provided* geometries; all Meili coupling lives in a store. Each feature is additive (off = today's behavior byte-identical), deterministic, port-only. A live-Meili gotcha caught pre-ship: the trails index has `_geo` **filterable but NOT sortable** (migration 1749831369), so a `_geoPoint` sort 500s — removed; validated live (query-shape returns cleanly, the sorted variant 500s). **Owed before heavy use:** a browser smoke pass of the Familiarity/Area/Must-visit panels (all UI is type-gated only), and confirming the `author` filter returns your own tracks under a real session. Specs/plans: `docs/superpowers/{specs,plans}/2026-07-30-*` (C, E) + `2026-08-03-*` (D). All on branch `deploy`.
Member

M4 status check (2026-11-05): items 1–3 are done, item 4 is decided as overlay

Items 1–3 were done on 2026-10-31 and merged as #42 (docs, docs/fork/m4-brouter-vs-valhalla.md + docs/prototypes/compare-routers.py). A follow-up, #43, put the BRouter proxy behind sign-in. Neither was ever posted here, so the checklist above is still unticked. Today I re-checked the parts that can go stale.

1. Upstream feat/pluginRouting: still unmerged

  • It is upstream draft PR open-wanderer/wanderer#1246, "Add routing plugins with Valhalla and BRouter". The head is still 8d5f6961 and has not been touched since 2026-09-19. It is now 174 commits behind upstream dev (38 ahead), with 431 files changed.
  • Its design is a routing plugin type (route.v1, elevation.v1, maneuvers.v1, round_trip.v1, profile_*), with first-party Valhalla and BRouter TinyGo plugins and host-owned custom .brf profiles. It also removes /api/v1/valhalla/*. The details are in the doc.
  • New: upstream's route candidate contract carries geometry, elevation, summary and per-anchor segments, but no way tags. Moving to it would not, by itself, give #49/#51 their surface or way-type data.
  • Our mirror origin/feat/pluginRouting is stale (e42d6a54, 2026-07-09) and lacks docs/design/routing-plugins.md. Read upstream directly.

2. BRouter adapter: live

  • The routing port, the Valhalla and BRouter adapters, the /api/v1/brouter/route proxy (auth-gated), the planner's router selector, technicality control, off-road segments and the loop generator are all on deploy. Live runs wanderer-web:deploy-e72a2cc5 (= deploy head), with BROUTER_URL=http://brouter:17777.
  • BRouter is ghcr.io/abrensch/brouter:v1.7.8, a ClusterIP service brouter:17777 (default ns, pinned to prodesk). Profiles are mercantour-run (ConfigMap, byte-identical to the bundled web/src/lib/server/brouter/mercantour-run.brf) plus BRouter's stock profiles (for example hiking-mountain).
  • The "other planner" is brouter-web at trail.bearoverse.com (tailnet-only, same BRouter behind /brouter). Wanderer with the BRouter router and mercantour-run now routes the same way, which unifies the two planners.

3. Route quality: re-run today, numbers reproduce

I re-ran 3 of the 8 pairs (compare-routers.py, sequentially, about 30 requests). All results match the 2026-10-31 table to the metre. Summary over all 8 pairs:

Engine on trails (mean / median) km D+ m
BRouter mercantour-run 92 % / 96 % 70.2 6811
BRouter hiking-mountain 90 % / 96 % 67.0 6585
Valhalla pedestrian (editor defaults) 62 % / 59 % 65.6 5206
  • Where a road runs up the valley (St-Martin → Madone, Isola → Isola 2000, Valdeblore → Colmiane), Valhalla is 16–45 % on trail and BRouter 83–97 %. The cost is up to +3.8 km and +540 m D+.
  • On trail-only pairs, all engines stay on trail.
  • mercantour-run beats stock hiking-mountain mainly on SAC-tagged share. It costs up to 1.3 km more.
  • Latency: BRouter took 1.2–3.1 s per request today (a 2.4 km pair took 2.0 s), Valhalla 0.2–0.8 s. BRouter requests only 15m CPU. That is acceptable for drawing one anchor at a time, but slow for the generator's budget of about 40 calls.

Way tags (for #49 / #51)

BRouter's geojson properties.messages is a table with columns Longitude, Latitude, Elevation, Distance, CostPerKm, …, WayTags, NodeTags, Time, Energy. It has one row per way-tag change, not per point: 5 rows for 181 points on Madone → Lac de Fenestre. Each row has a distance and tags such as:

highway=path surface=unknown sac_scale=mountain_hiking trail_visibility=excellent route_hiking_iwn=yes

So BRouter-routed segments do carry highway, surface, sac_scale, trail_visibility and hiking-route membership. The row's lon/lat (microdegrees) marks where each run ends.

  • Today these are dropped. The proxy passes messages through in RouteResult.meta, but valhalla_store only reads durationS and elevations from meta. Nothing is parsed or persisted.
  • Caveat: this only covers segments routed with BRouter. Valhalla routes, off-road segments, imported GPX and recorded tracks have no tags.
    • For a trail-view breakdown that works on any track (#51), map-match the stored geometry server-side with Valhalla trace_attributes (edge.use, edge.surface, edge.sac_scale). compare-routers.py already does this to judge every engine with one classifier.
    • Parsing BRouter's tags is only a cheap extra for freshly planned routes.
  • Like the missing matrix endpoint (see #45), this suggests keeping Valhalla in the stack even with BRouter as the trail router.

4. Recommendation: keep the overlay, do not write a plugin now

  • The overlay (routing port + adapters + generator) is implemented and live on the v0.21.2 base. Upstream has no merged or released routing plugin API to target, and #1246 has stalled and fallen 174 commits behind. A plugin written now would target a moving, unmerged branch.
  • Default router: keep Valhalla as the default, because it is fast and takes the obvious way. Use BRouter with mercantour-run for trail runs and the loop generator, as behavior.router is set up today.
  • When upstream releases routing plugins:
    1. Plan a dedicated sync, because the editor page conflicts heavily.
    2. Move route drawing to upstream's BRouter plugin. Point its connector at brouter:17777 with private access allowed, and upload mercantour-run.brf as a custom profile.
    3. Keep only the generator's D+, POI, area and novelty steering as a fork patch.
  • No new prototype PR is needed for this epic, because the adapter it asks for is already deployed. I opened none.

Still open, outside the checklist

  • A browser smoke pass of the loop generator's Familiarity, Area and Must-visit panels (owed since August).
  • BRouter latency: look at the pod's CPU request and BRouter's thread/memory settings before leaning on it for interactive drawing.
  • Way-tag persistence / map-matching: belongs to #51, not here.

With that, the four checkboxes can be ticked and the epic closed once the generator panels have had their browser pass.

🤖 Generated with Claude Code

## M4 status check (2026-11-05): items 1–3 are done, item 4 is decided as overlay Items 1–3 were done on 2026-10-31 and merged as **#42** (docs, `docs/fork/m4-brouter-vs-valhalla.md` + `docs/prototypes/compare-routers.py`). A follow-up, **#43**, put the BRouter proxy behind sign-in. Neither was ever posted here, so the checklist above is still unticked. Today I re-checked the parts that can go stale. ### 1. Upstream `feat/pluginRouting`: still unmerged - It is upstream draft PR [open-wanderer/wanderer#1246](https://github.com/open-wanderer/wanderer/pull/1246), "Add routing plugins with Valhalla and BRouter". The head is still `8d5f6961` and has not been touched since 2026-09-19. It is now **174 commits behind upstream `dev`** (38 ahead), with 431 files changed. - Its design is a `routing` plugin type (`route.v1`, `elevation.v1`, `maneuvers.v1`, `round_trip.v1`, `profile_*`), with first-party Valhalla and BRouter TinyGo plugins and host-owned custom `.brf` profiles. It also removes `/api/v1/valhalla/*`. The details are in the doc. - **New:** upstream's route candidate contract carries geometry, elevation, summary and per-anchor segments, but **no way tags**. Moving to it would not, by itself, give #49/#51 their surface or way-type data. - Our mirror `origin/feat/pluginRouting` is stale (`e42d6a54`, 2026-07-09) and lacks `docs/design/routing-plugins.md`. Read upstream directly. ### 2. BRouter adapter: live - The routing port, the Valhalla and BRouter adapters, the `/api/v1/brouter/route` proxy (auth-gated), the planner's router selector, technicality control, off-road segments and the loop generator are all on `deploy`. Live runs `wanderer-web:deploy-e72a2cc5` (= `deploy` head), with `BROUTER_URL=http://brouter:17777`. - BRouter is `ghcr.io/abrensch/brouter:v1.7.8`, a ClusterIP service `brouter:17777` (`default` ns, pinned to prodesk). Profiles are `mercantour-run` (ConfigMap, byte-identical to the bundled `web/src/lib/server/brouter/mercantour-run.brf`) plus BRouter's stock profiles (for example `hiking-mountain`). - The "other planner" is **brouter-web** at `trail.bearoverse.com` (tailnet-only, same BRouter behind `/brouter`). Wanderer with the BRouter router and `mercantour-run` now routes the same way, which unifies the two planners. ### 3. Route quality: re-run today, numbers reproduce I re-ran 3 of the 8 pairs (`compare-routers.py`, sequentially, about 30 requests). All results match the 2026-10-31 table to the metre. Summary over all 8 pairs: | Engine | on trails (mean / median) | km | D+ m | |---|---:|---:|---:| | BRouter `mercantour-run` | 92 % / 96 % | 70.2 | 6811 | | BRouter `hiking-mountain` | 90 % / 96 % | 67.0 | 6585 | | Valhalla pedestrian (editor defaults) | 62 % / 59 % | 65.6 | 5206 | - Where a road runs up the valley (St-Martin → Madone, Isola → Isola 2000, Valdeblore → Colmiane), Valhalla is 16–45 % on trail and BRouter 83–97 %. The cost is up to +3.8 km and +540 m D+. - On trail-only pairs, all engines stay on trail. - `mercantour-run` beats stock `hiking-mountain` mainly on SAC-tagged share. It costs up to 1.3 km more. - **Latency:** BRouter took 1.2–3.1 s per request today (a 2.4 km pair took 2.0 s), Valhalla 0.2–0.8 s. BRouter requests only 15m CPU. That is acceptable for drawing one anchor at a time, but slow for the generator's budget of about 40 calls. ### Way tags (for #49 / #51) BRouter's geojson `properties.messages` is a table with columns `Longitude, Latitude, Elevation, Distance, CostPerKm, …, WayTags, NodeTags, Time, Energy`. It has **one row per way-tag change**, not per point: 5 rows for 181 points on Madone → Lac de Fenestre. Each row has a distance and tags such as: ``` highway=path surface=unknown sac_scale=mountain_hiking trail_visibility=excellent route_hiking_iwn=yes ``` So BRouter-routed segments do carry `highway`, `surface`, `sac_scale`, `trail_visibility` and hiking-route membership. The row's lon/lat (microdegrees) marks where each run ends. - **Today these are dropped.** The proxy passes `messages` through in `RouteResult.meta`, but `valhalla_store` only reads `durationS` and `elevations` from `meta`. Nothing is parsed or persisted. - **Caveat:** this only covers segments routed with BRouter. Valhalla routes, off-road segments, imported GPX and recorded tracks have no tags. - For a trail-view breakdown that works on *any* track (#51), map-match the stored geometry server-side with Valhalla `trace_attributes` (`edge.use`, `edge.surface`, `edge.sac_scale`). `compare-routers.py` already does this to judge every engine with one classifier. - Parsing BRouter's tags is only a cheap extra for freshly planned routes. - Like the missing matrix endpoint (see #45), this suggests keeping Valhalla in the stack even with BRouter as the trail router. ### 4. Recommendation: keep the overlay, do not write a plugin now - The overlay (routing port + adapters + generator) is implemented and live on the v0.21.2 base. Upstream has no merged or released routing plugin API to target, and #1246 has stalled and fallen 174 commits behind. A plugin written now would target a moving, unmerged branch. - **Default router:** keep Valhalla as the default, because it is fast and takes the obvious way. Use BRouter with `mercantour-run` for trail runs and the loop generator, as `behavior.router` is set up today. - **When upstream releases routing plugins:** 1. Plan a dedicated sync, because the editor page conflicts heavily. 2. Move route drawing to upstream's BRouter plugin. Point its connector at `brouter:17777` with private access allowed, and upload `mercantour-run.brf` as a custom profile. 3. Keep only the generator's D+, POI, area and novelty steering as a fork patch. - No new prototype PR is needed for this epic, because the adapter it asks for is already deployed. I opened none. ### Still open, outside the checklist - A browser smoke pass of the loop generator's Familiarity, Area and Must-visit panels (owed since August). - BRouter latency: look at the pod's CPU request and BRouter's thread/memory settings before leaning on it for interactive drawing. - Way-tag persistence / map-matching: belongs to #51, not here. With that, the four checkboxes can be ticked and the epic closed once the generator panels have had their browser pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jmz closed this issue 2026-11-05 20:42:33 +00:00
Sign in to join this conversation.
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
public/wanderer#5
No description provided.