Skip to content

test(esmini): a routed fixture, and the measured route-anchor gate (p8-s3) (#247) - #546

Merged
JArmandoAnaya merged 1 commit into
mainfrom
feat/p8-s3-routed-fixture
Aug 1, 2026
Merged

JArmandoAnaya merged 1 commit into
mainfrom
feat/p8-s3-routed-fixture

Conversation

@JArmandoAnaya

Copy link
Copy Markdown
Contributor

The validation half of #247, and the sprint's last PR: a tracked fixture pair that puts a RoadMaker-authored <Route> in front of the pinned esmini — and the measurement of what that actually gates.

Closes #247.

What lands

  • tests/esmini/routed.{xodr,xosc} — two roads joined by a plain weld and an ego whose route crosses it. Deliberately the SMALLEST network whose route resolution crosses a road boundary: RoadMaker's own authoring never emits <lane><link> across a plain weld (the resolver's documented same-@id fallback carries it), so this is exactly the shape whose acceptance by a shipping simulator is worth knowing; a junction would re-test what signalized.* already covers.
  • scripts/gen_xosc_fixtures.py generates the pair end-to-end through the kernel command layer (create_road/create_linked_road on an EditStack, place_scenario_object/set_entity_init_speed/assign_route on a ScenarioStack), asserts the undo×10/redo×10 fixed point, and refuses to write a route the kernel resolver cannot drive (validate_routes empty, resolve_route complete, ≥2 legs). The signalized pair's bytes are untouched.
  • Two new gtests beside the signalized locks: TheTrackedRoutedScenarioIsExactlyWhatTheWriterEmitsToday (byte lock — regeneration is a deliberate act with a red test in front of it) and TheTrackedRouteResolvesCompletelyAgainstItsOwnNetwork (the cross-document check re-run on the tracked bytes, so a fixture whose route did not drive can never make it to CI).
  • A CI smoke step feeding routed.xosc to esmini, with the measured behaviour recorded in the workflow comment.

★ The measurement

Measured 2026-08-01 against the pinned v3.5.0 (macOS binary), each mutation applied to the tracked fixture and judged by run_esmini's own criterion — esmini keeps exit 0 for these, and the [error] marker check is what fails the gate. A dangling teleport anchor was run as the control and fails the same way:

mutation (inside <AssignRouteAction>) esmini says gate
waypoint roadId="2" → "999" Failed to find road 999 FAILS
waypoint laneId="-1" → "-99" Lane id -99 does not exist on road 2 FAILS
waypoint s="80" → "9999" Invalid s value 9999 ... truncating FAILS

So a route waypoint's lane anchor IS resolved against the .xodr, exactly as an Init teleport's is (the 2026-07-31 measurement) — the routed step genuinely gates the route half of the scenario model, unlike the traffic-signal half esmini is measurably blind to (#533 tracks that gap).

A first, sloppier harness said the opposite — direct esmini invocation without the smoke script's flags, with a truncated grep — and produced "all three mutations pass silently". Re-measuring through run_esmini itself with a control inverted the verdict; the honest criterion is the one CI runs.

Notes

  • The new fixture rides the existing .gitattributes tests/esmini/*.xosc LF pin, so the Windows byte-lock stays green.
  • routed.xosc carries the same 0.5 s stop trigger as signalized.xosc — a scenario with no stop trigger runs in esmini until something kills it, and a smoke gate that has to time out to pass is not a gate.

Evidence

  • Full ctest --preset ci-macos green locally, including the two new XoscFixture tests.
  • python3 scripts/esmini_smoke.py --xosc tests/esmini/routed.xosc against the fetched v3.5.0 macOS binary: OK ... loads cleanly in esmini.
  • The generator's own asserts (route resolves, undo/redo fixed point, validate_scenario clean) all ran on the tracked bytes.
  • CI's exact clang-format command reports clean.

@JArmandoAnaya
JArmandoAnaya force-pushed the feat/p8-s3-routed-fixture branch from 49f23df to aa1a488 Compare August 1, 2026 09:06
@JArmandoAnaya
JArmandoAnaya merged commit a0e2d60 into main Aug 1, 2026
16 checks passed
@JArmandoAnaya
JArmandoAnaya deleted the feat/p8-s3-routed-fixture branch August 1, 2026 09:25
@JArmandoAnaya JArmandoAnaya mentioned this pull request Aug 1, 2026
3 of 8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

p8-s3: lane-anchored routes

1 participant