docs(routing): compare BRouter and Valhalla on Mercantour trails (M4) #42

Merged
jmz merged 2 commits from docs/m4-brouter-vs-valhalla into deploy 2026-11-01 16:02:25 +00:00
Member

For public/wanderer#5 (M4). Docs only: docs/fork/m4-brouter-vs-valhalla.md + the measurement script docs/prototypes/compare-routers.py.

What M4 really has (verified against code and live state, not ticket comments)

  • BRouter routing adapter: done and live.
    • Routing port, Valhalla/BRouter adapters, generator and /api/v1/brouter/route are on deploy (= deploy-v0.21.2, ca06282e).
    • Prod runs wanderer-web:deploy-v0.21.2-ca06282e with BROUTER_URL=http://brouter:17777.
    • POST /api/v1/brouter/route on the live pod returns 200 with geometry.
    • The pod's /profiles2/mercantour-run.brf is byte-identical to the bundled profile.
    • CI on deploy@ca06282e is green (run 13768: svelte-check + vitest, routing tests included).
  • Upstream feat/pluginRouting investigation: was not done; done in the doc.
    • Upstream is adding a routing plugin type with first-party BRouter and Valhalla plugins, custom .brf profiles and round trips.
    • It is not merged into upstream dev (checked at db017977, 2026-10-31).
  • Route-quality comparison: was not done; done in the doc.
    • 8 Mercantour pairs on the live routers, with the same DEM and the same way classifier for every route.
    • BRouter mercantour-run is on trails for 92 % of the distance (median 96 %). Valhalla pedestrian with the editor defaults: 62 % (median 59 %).
    • Where a road runs up the valley, BRouter's line costs extra distance and/or climb (up to +3.8 km, +540 m D+).
  • Plugin vs overlay: overlay is implemented. The doc recommends:
    • keep it until upstream releases pluginRouting;
    • then move route drawing to upstream's BRouter plugin, with mercantour-run as a custom profile;
    • keep only the generator's extra steering (D+, must-visit, area, novelty) as a fork patch.

Follow-ups noted in the doc (not done here)

  • BRouter answers with a ~1 s floor per request. The pod requests 15m CPU.
  • /api/v1/brouter/route is not auth-gated: anonymous callers get 200 and can upload rawProfile/params profiles to BRouter. Gate at least the upload paths on locals.user, as the trail-analyze proxy does.

CI

The commit carries [skip ci]: it is docs plus a standalone script that no build uses, so no run was started on the NAS runner (verified). If the deploy branch protection needs green CI / go*, CI / web* on the head, dispatch CI on docs/m4-brouter-vs-valhalla by hand in a quiet window before merging. The script was run from the NAS against port-forwards; it only reads from the routers.

The epic's checklist boxes are left for Jörg. Nothing was closed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XMf4EKLnjYyjFp8QGWgFFq

For public/wanderer#5 (M4). Docs only: `docs/fork/m4-brouter-vs-valhalla.md` + the measurement script `docs/prototypes/compare-routers.py`. ## What M4 really has (verified against code and live state, not ticket comments) - **BRouter routing adapter: done and live.** - Routing port, Valhalla/BRouter adapters, generator and `/api/v1/brouter/route` are on `deploy` (= `deploy-v0.21.2`, ca06282e). - Prod runs `wanderer-web:deploy-v0.21.2-ca06282e` with `BROUTER_URL=http://brouter:17777`. - `POST /api/v1/brouter/route` on the live pod returns 200 with geometry. - The pod's `/profiles2/mercantour-run.brf` is byte-identical to the bundled profile. - CI on deploy@ca06282e is green (run 13768: svelte-check + vitest, routing tests included). - **Upstream `feat/pluginRouting` investigation: was not done; done in the doc.** - Upstream is adding a `routing` plugin type with first-party BRouter and Valhalla plugins, custom `.brf` profiles and round trips. - It is not merged into upstream `dev` (checked at db017977, 2026-10-31). - **Route-quality comparison: was not done; done in the doc.** - 8 Mercantour pairs on the live routers, with the same DEM and the same way classifier for every route. - BRouter `mercantour-run` is on trails for 92 % of the distance (median 96 %). Valhalla pedestrian with the editor defaults: 62 % (median 59 %). - Where a road runs up the valley, BRouter's line costs extra distance and/or climb (up to +3.8 km, +540 m D+). - **Plugin vs overlay: overlay is implemented. The doc recommends:** - keep it until upstream releases pluginRouting; - then move route drawing to upstream's BRouter plugin, with `mercantour-run` as a custom profile; - keep only the generator's extra steering (D+, must-visit, area, novelty) as a fork patch. ## Follow-ups noted in the doc (not done here) - BRouter answers with a ~1 s floor per request. The pod requests 15m CPU. - `/api/v1/brouter/route` is not auth-gated: anonymous callers get 200 and can upload `rawProfile`/`params` profiles to BRouter. Gate at least the upload paths on `locals.user`, as the trail-analyze proxy does. ## CI The commit carries `[skip ci]`: it is docs plus a standalone script that no build uses, so no run was started on the NAS runner (verified). If the `deploy` branch protection needs green `CI / go*`, `CI / web*` on the head, dispatch CI on `docs/m4-brouter-vs-valhalla` by hand in a quiet window before merging. The script was run from the NAS against port-forwards; it only reads from the routers. The epic's checklist boxes are left for Jörg. Nothing was closed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01XMf4EKLnjYyjFp8QGWgFFq
jmz force-pushed docs/m4-brouter-vs-valhalla from 6753481d79 to ffbef1c868 2026-11-01 15:47:35 +00:00 Compare
jmz scheduled this pull request to auto merge when all checks succeed 2026-11-01 15:48:06 +00:00
ci: trigger CI after the UI rebase (no push event)
All checks were successful
CI / web (push) Successful in 1m24s
CI / go (push) Successful in 13m14s
584644d72f
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XMf4EKfVsCPAKTE23KMpzK
jmz merged commit 584644d72f into deploy 2026-11-01 16:02:25 +00:00
jmz deleted branch docs/m4-brouter-vs-valhalla 2026-11-01 16:02:25 +00:00
Sign in to join this conversation.
No reviewers
No milestone
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!42
No description provided.