Skip to content

[P6.08] Maneuvers builder II: ramps, exits, merges, roundabouts, forks, u-turns, internal intersections #147

Closed

Description

@chrisbbreuer

P6 Narrative and serializers · key P6.08 · size L

Goal

The maneuver builder handles highway and junction geometry: ramps, exits, merges, forks, roundabouts, u-turns and internal intersection collapsing, matching Valhalla's maneuver types and attributes.

Upstream reference (Valhalla 3.9.3)

  • src/odin/maneuversbuilder.cc
  • src/odin/signs.cc
  • valhalla/odin/
  • test/maneuversbuilder.cc

Scope

  • Port ramp and exit typing (ramp straight, right, left; exit right, left), including sign attachment from P6.02 and the keep-versus-exit decision.
  • Port merge typing and merge side determination.
  • Port fork detection (stay left, right, straight) and the IsFork and IsLeftPencilPointUturn family of tests.
  • Port roundabout enter and exit maneuvers with exit counts and roundabout exit street names.
  • Port u-turn typing and the internal intersection logic (UpdateInternalTurnCount, internal edge collapsing, turn channel handling).
  • Port obvious-maneuver suppression and intersecting-forward-edge checks.

Out of scope

  • Ferries, stairs, elevators, indoor and lane guidance (P6.09).

Design notes

  • Depends on signs being present on edges and nodes (P6.02).
  • Keep each rule in its own function so the upstream test for it maps one to one.

Acceptance criteria

  • The ramp, exit, merge, fork, roundabout, u-turn and internal-intersection cases of test/maneuversbuilder.cc are ported and green.
  • Gate D maneuver type and name sequence equality on highway corpus routes.
  • zig build test green.

Blocked by


Rules for working on this repository are in AGENTS.md. The plan is in docs/PLAN.md.

Activity

  1. added
    blocked
    phase:6
    area:narrative
    type:port
    size:L
    on Nov 17, 2026
  2. added
    ready
    and removed
    blocked
    on Nov 20, 2026
  3. chrisbbreuer commented on Nov 20, 2026

    @chrisbbreuer
    MemberAuthor

    The first highway replay found 182 identical paths out of 200 routes. Of those, 63 currently match the full parity criteria. The flat Valhalla tile importer omits edge signs, including exit numbers and signed ramp splits that affect maneuver types and names. I am restoring the missing input and rerunning the full corpus before checking acceptance.

  4. chrisbbreuer commented on Nov 20, 2026

    @chrisbbreuer
    MemberAuthor

    The unsigned-input mismatch is resolved. The corrected importer preserves edge and node signs. All 182 identical paths now have equal maneuver type and street-name sequences. The broader Gate D run passes 181 of 184 routes within 0.1% cost using an exact encoded shape check, above the required 95%. Two cost-equivalent alternate paths differ in maneuver sequence and one matching path differs in encoded shape. The full-symbol Linux executable is 19,497,816 bytes, below the 19,500,000-byte budget, with zero search instantiations and two costing kernels.

  5. chrisbbreuer commented on Nov 20, 2026

    @chrisbbreuer
    MemberAuthor

    Verified ae0225a against Valhalla 3.9.3 with all eight internal intersection combine fixtures, both roundabout exit option fixtures, consecutive exit signs, and the fork, ramp, merge and pencil-point cases. The native test suite passed 463 of 465 tests with two existing skips. The request and Valhalla tile fuzz targets each ran clean for 60 seconds. The 99 eligible simple urban paths still match exactly. The full highway comparison and reproduction commands are documented under Trip leg fields in oracle/README.md.

  6. chrisbbreuer commented on Nov 20, 2026

    @chrisbbreuer
    MemberAuthor

    Main CI passed the Ubuntu test suite and the local assembly checks through the elevation reproducibility test. The Ubuntu job stopped at the pinned Luxembourg extract download because all five attempts to connect to Geofabrik failed. The full-symbol binary budget job passed. I will retry the failed job once the run finishes. https://github.com/zig-utils/zig-routing/actions/runs/44740019052/job/136301029826

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:narrativephase:6readysize:Ltype:port

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions