Skip to content

Epic P8: Scenarios #257

Open
Open

Description

@JArmandoAnaya

Pillar P8 of the Road to Parity roadmap · Milestone P8 — Scenarios.

Status (2026-07-20): scope updated by the 2026-07 realignment: the internal scenario model targets OpenSCENARIO 1.x XML first (validation-friendly, esmini-compatible); OpenSCENARIO 2.x is an explicit later sprint (#327) — export-only concrete-scenario subset at v0.1.0, no OSC2 import, no parser dependency. Scenario files live in the project container — fmt-s1 (#325) must land before scenario save. Persistence per ADR-0008.

Update (2026-07-27, roadmap review): the container precondition is satisfied — fmt-s1 #325 and fmt-s2 #326 are merged; scenario save has its Layer-2 home. GW-6 ownership flag: the roadmap says GW-6 is "drafted during P8 planning", but the only issue owning its authoring is #249 (p8-s5, fifth of six), no P8 discovery report exists yet, and #248's headline acceptance ("traffic-light scenario authorable end-to-end") ships before the workflow that would verify it — either the GW-6 draft moves to pillar planning/discovery or the roadmap prose should say "drafted in p8-s5 (#249)". Maintainer decision. Also worth noting at planning time: rm:phases already mirrors OpenSCENARIO 1.4.0 TrafficSignalController/Phase, so #245/#248's traffic-signal half is largely a binding exercise. Per-issue correction notes from the review are posted on each sprint issue.

Scope

Internal scenario model exporting OpenSCENARIO 1.x XML first, with OpenSCENARIO 2.x as an export-only subset sprint; Map↔Scenario mode; actor placement; lane-anchored routes; storyboard/condition logic editor; esmini preview hooks; GW-6 authoring.

Feeds

GW-6 (drafted during this pillar).

Update (2026-07-30): P8 is unblocked and STARTED. Everything that stood in
front of the first sprint is cleared —
discovery report
written (#505), the esmini-as-validator ruling made (§4), #327's
acceptance amended to match, #245's validate half scoped, and
GW-6
drafted ahead of the pillar
(#521) so #245–#248 have an acceptance target
rather than shipping before the workflow that verifies them. §7 is therefore
closed; #249's scope was trimmed to refining GW-6 and replacing
esmini_smoke.py's synthetic XOSC_TEMPLATE with a real exported scenario.

#245 is in flight, planned as four PRs (ADR → model+writer →
reader+validator+esmini fixture → edit commands + signal decomposition +
bindings). Plan and the two new spec findings are
on the issue.

Two findings from that spec read worth surfacing here:
OpenSCENARIO does publish checker-rule ids (76 annex references, e.g.
asam.net:xosc:1.0.0:data_type.phase_duration_positive), so "validation cites
normative rule ids" is met by an osc/rules.hpp mirroring the OpenDRIVE
validator — additive to the esmini ruling, since esmini answers "does a
simulator accept this" and rule ids answer "which normative rule broke".
And §10.10 builds signal groups from the ASAM OpenDRIVE <controller>
element
, independently confirming the one-controller-per-<controller>
decomposition.

Also in P8's path but left to its own issue: #506 (esmini pinned twice —
the documented bump procedure silently no-ops), verified still real.

Sprints

Follow-ups

2026-07-31 (roadmap review): filed #533 after measuring that the traffic-signal half of a scenario is validated by nobody — esmini accepts dangling trafficSignalId/controller references silently (the 2026-07-30 measurement recorded above), and osc::validate_scenario takes no RoadNetwork, so GW-6's "controller exists in the exported .xodr by the same id" criterion had no automated check anywhere. #248/#249's acceptance wording was scoped accordingly, and #327's body now carries the esmini acceptance the 2026-07-30 ruling already amended in comments. Also: #506 is CLOSED (the 2026-07-30 status block above still described it as open); #246 now carries its remainder as a checklist.

Supersedes

(none)

Activity

  1. added
    epic
    pillar:P8
    on Jul 15, 2026
  2. JArmandoAnaya commented on Jul 28, 2026

    @JArmandoAnaya
    ContributorAuthor

    2026-07-28 roadmap review — P8 planning input (recorded now so the discovery report starts from it, since P8 is the next unstarted pillar and half of the product's name — "OpenDRIVE and OpenSCENARIO tool").

    1. Pin the OpenSCENARIO minor version. Every roadmap document says only "OSC 1.x" / "2.x"; no doc names 1.2 vs 1.3 vs 1.4. The local ASAM reference bundle is OpenSCENARIO XML 1.4.0 — the discovery report should pin the target (1.4.0, or an explicit lower floor if esmini compatibility demands one) and define what "scenario parity" means, which no document currently does.

    2. Maintainer prerequisite: the normative XSD is missing. .claude/references/asam/openscenario-xml-1.4.0/ has the text but its schema/OpenSCENARIO.xsd requires a manual gated ASAM download (flagged in that INDEX.md). p8-s6's acceptance says the exported 1.x file "validates against the schema" — that acceptance is unexecutable until the XSD is fetched. Worth doing before p8-s1 so validation is wired in from the first sprint.

    3. Write the P8 discovery report before p8-s1 lands. The README requires discovery "once per pillar, before its first sprint lands"; P3 already violated this irrevocably, P8 can still comply. Extra reason it matters here: p8-s2: Map ↔ Scenario mode + actor placement #246–p8-s5: esmini preview hooks + GW-6 authoring #249 have no committed scope text anywhere — the sprint cut exists only in issue bodies (the realignment appendix maps only p8-s1: OpenSCENARIO data model #245 and C11/p8-s6). The discovery report is the natural place to durably record the cut, resolve the GW-6 ownership flag above (still unresolved), and draft GW-6 itself.

    4. Feature-area checklist for the discovery (from the OSC XML 1.4.0 chapter map; each row needs an in/out/deferred ruling):

      • RoadNetwork reference: LogicFile (.xodr) + SceneGraphFile linkage — natural first deliverable, RoadMaker owns both sides
      • Storyboard structure: Story/Act/ManeuverGroup/Maneuver/Event + Init
      • Entities: ScenarioObject, Vehicle/Pedestrian/MiscObject, entity selections
      • Actions: private (longitudinal/lateral/routing/teleport), global (traffic, entities, infrastructure incl. TrafficSignalController), user-defined
      • Conditions & triggers: ByEntity/ByValue families, condition-group logic
      • Reuse: catalogs, ParameterDeclaration, parameter distributions (deterministic/stochastic)
      • Controllers: assignment/activation
      • Traffic areas/distributions (1.4.0 additions)
      • Environment/weather actions — explicit non-goal candidate for an authoring tool
      • Coordinate systems: LanePosition on OpenDRIVE roads — ties directly to our s/t machinery
    5. Existing hooks the plan should exploit: rm:phases already mirrors TrafficSignalController/Phase (noted 2026-07-27 above), so p8-s1: OpenSCENARIO data model #245/p8-s4: storyboard / condition logic editor #248's traffic-signal half is largely a binding exercise; new kernel+editor: signal/object <validity> lane restrictions are preserved but invisible and unauthorable (§14.2/§13.6) #480 (signal <validity> lane restrictions) feeds lane-scoped signal semantics that OSC signal mapping will want; the esmini smoke job already exists in CI (noted on p8-s5: esmini preview hooks + GW-6 authoring #249 in the 2026-07-27 review).

  3. JArmandoAnaya commented on Jul 29, 2026

    @JArmandoAnaya
    ContributorAuthor

    P8 discovery report written (#505)

    docs/roadmap/pillars/p8_discovery.md — P8 was the last pillar without one. Sprint order #245 → #246 → #247 → #248 → #249 → #327 stands; no resequencing implied. What follows needs decisions rather than work.

    1. #327's acceptance cannot be met as written — a licensing problem, not effort

    It requires the exported 1.x file to "validate against the schema". There is no XSD in the tree, scripts/fetch_asam_specs.py:432-444 only checks for one and reports MISSING, and the sharper fact: the ASAM reference texts are entirely untracked. .gitignore:49-56 says why in its own words — the INDEX.md whitelist is inert, because git cannot re-include files under an excluded parent. git ls-files .claude/references/ is empty. CI has neither the schema nor the prose.

    Three substitutes, and only one works today with no new dependency:

    Option Works in CI now?
    (a) hand-transcribe OSC Annex C checker rules into tests yes — real work, partial coverage, but mirrors what rules.hpp does for OpenDRIVE
    (b) treat esmini's parser as the de-facto validator yes — zero new dependency; already pinned and MPL-2.0-cleared as a run-only tool
    (c) maintainer supplies the XSD out-of-band no — and CI still could not carry the file

    Maintainer decision needed, and #327's acceptance wording should be amended to match whichever is chosen. (b) also raises the value of #249's esmini work, since that job becomes the validation story rather than a smoke test.

    2. One architectural constraint, decided in #245 rather than #249

    Both golden-workflow replays drive rm.edit.* through EditStack, and the boundary is enforced at link level: python/CMakeLists.txt:36 links roadmaker::core alone, :12 forces RM_BUILD_EDITOR OFF, and bindings.cpp contains zero editor/ includes.

    A GW-6 replay is possible if and only if scenario mutations are kernel edit::Commands exposed via rm.edit.*, with a deterministic string-returning write_xosc for the undo/redo fingerprint. If the model lands in editor/src/document/, GW-6 loses its headless pre-flight evidence permanently and the gate narrows to three hand-runs with nothing behind them. Cheap to honour at the start of #245; impossible to retrofit at #249 without moving the model.

    3. The GW-6 ownership question — restated, not settled

    Flagged in the 2026-07-27 review and unresolved. The roadmap says GW-6 is "drafted during P8 planning", but the only issue owning its authoring is #249, fifth of six, so #248's headline acceptance ("traffic-light scenario authorable end-to-end") ships before the workflow that would verify it. docs/roadmap/_migration/00-inventory.md:110,144,186 records GW-6's three hand-run issues as "Blocked by #249".

    The report recommends drafting gw6_scenarios.md now, as part of this planning step: it costs a document, gives #245–#248 an acceptance target — the role GW-1…GW-5 play for their pillars — and unblocks those three gate issues from the fifth sprint. Maintainer decision.

    4. Findings that change sprint scope

    • p8-s1: OpenSCENARIO data model #245 — the traffic-signal export is near-mechanical as the kernel's own comment claims (junction.hpp:320-322), with one caveat it does not mention: RoadMaker's cycle is per-junction across N controllers, OSC's TrafficSignalController is per-controller, so one timeline must be decomposed into N phase lists. That belongs here, not in p8-s4: storyboard / condition logic editor #248.
    • p8-s3: lane-anchored routes #247 — there is no routing or pathfinding code anywhere. route appears nine times tree-wide, all prose; the OSM graph is an import graph, not a driving graph. This is the largest greenfield surface of the six despite sitting third. Worth re-checking its size before scheduling.
    • p8-s2: Map ↔ Scenario mode + actor placement #246 — SelectionEntry (selection_model.hpp:36-45) is a flat struct of six typed ids; adding a seventh kind is additive but every consumer switch follows (picking, properties, context menu, scene tree, gizmo). The reserved kScenario toolbar tab and the Editor2DPage seam mean the hosting is free; the selection is not.
    • p8-s5: esmini preview hooks + GW-6 authoring #249 — four concrete esmini changes named in the report. Note the MPL-2.0 boundary: launching esmini as a subprocess stays inside the existing licence entry; linking or bundling it does not.

    5. Naming collisions to settle before the first header is written

    • Maneuver is already a public kernel type meaning something unrelated — an authored override for one connecting road's path through a junction, with a Python binding, an editor tool and an rm:maneuver userData code. Namespace the OSC model or rename at the door.
    • signals is unusable as a member name at all. Qt #defines it, so a header carrying one is unparseable from any editor TU — already a documented trap twice under mesh/.
    • Entity is used in prose throughout for "arena entity".

    6. A latent CI defect P8 will trip

    Not P8's, but in its path: the esmini version is pinned twice — ESMINI_VERSION: v3.5.0 (ci.yml:690) and the literal v3.5.0 in the cache key (:698) — while docs/contributing/ci.md:145 instructs bumping only the env var. That would leave the cache serving the old binary and silently no-op the bump. Worth its own small issue.

  4. JArmandoAnaya commented on Jul 30, 2026

    @JArmandoAnaya
    ContributorAuthor

    Ruling: esmini is the de-facto OpenSCENARIO validator (maintainer decision, 2026-07-30)

    Answering the §4 question raised from the P8 discovery report: option (b).

    esmini's parser is the validation story for exported .xosc. It is the only one of the three substitutes that works in CI today with no new dependency — esmini is already pinned, already in the pipeline, and MPL-2.0-cleared as a run-only subprocess (docs/standards/dependencies.md:104-112); linking or bundling it would not be, and nothing here changes that boundary.

    Consequences, to be applied as each sprint lands rather than up front:

    • p8-s6: OpenSCENARIO 2.x — export-only concrete-scenario subset #327 (p8-s6) — acceptance amended: "validates against the schema" becomes "loads in esmini without error". The XSD is not obtainable for CI (no .xsd in the tree; the ASAM references are entirely untracked because .gitignore's INDEX whitelist is inert), so the previous wording promised something the repository cannot do.
    • p8-s5: esmini preview hooks + GW-6 authoring #249 (p8-s5) — the esmini work is now load-bearing, not a smoke test. scripts/esmini_smoke.py's hardcoded XOSC_TEMPLATE (a synthetic OpenSCENARIO 1.2 wrapper) must be replaced by a real exported scenario, which is §5's point.
    • p8-s1: OpenSCENARIO data model #245 (p8-s1) — the "validate" half is unblocked and scoped: validation means esmini accepts the file, so the sprint owes a round-trip fixture the CI job can feed to esmini, not an XSD-validation step.

    Not ruled out for later: hand-transcribing OSC Annex C rules into tests (option (a)), mirroring what xodr/rules.hpp does for OpenDRIVE. That would give citable rule IDs in diagnostics, which esmini's pass/fail cannot. It is additive to this ruling rather than an alternative, and is not required for v0.1.0.

    The §7 question (GW-6 ownership — draft now vs. leave in #249) is still open.

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

    epicpillar:P8

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions