Repository navigation
Description
Part of the ADR-0008 fmt workstream. Follow-up filed from #326 (fmt-s2), which made foreign/unknown <userData> preservation airtight at road, junction and root scope. The exploration for that sprint enumerated every parse site that meets unmodeled input; these are the scopes that still lose data, deliberately left out of #326 (maintainer decision at planning: one follow-up issue, not scope creep). Line refs are against main e729aed.
Still dropped today
<header>children — including<geoReference>(§8.5):parse_header(core/src/xodr/reader.cpp:291) reads onlyrevMajor/revMinorand walks no children; the writer synthesizes a fresh<header>(core/src/xodr/writer.cpp:2448). A georeferenced foreign file loses its projection string silently — the most consequential item here, and a P7 (georeferencing) touchpoint: whoever models<geoReference>should decide whether the interim fix is preservation or modeling.<roadMark>unknown attributes and children (incl.<userData>): the roadMark loop (reader.cpp:618) readssOffset/type/width/color/material+<type>/<line>;RoadMark(core/include/roadmaker/road/lane.hpp) has noRawXmlfield. Silent. (Note: fmt-s2: round-trip hardening — foreign userData preservation + rm: registry tests #326's issue text claimed roadMark preserved — it never did; what preserves isObjectMarking.)<laneSection>unknown children: the side-container walk (reader.cpp:541,:554) visitsleft/center/rightonly; anything else (incl.<userData>) is silently skipped.<lanes>children other thanlaneOffset/laneSection: same shape, silent.<junction>non-userData unknown children:parse_junction(reader.cpp:1715) walksconnection/controller/userData(+ the modeledboundary/surface/planView/elevationGrid, which are re-derived);<priority>(§12.9) and any future element are silently lost.- Unknown attributes on
<lane>and<junction>: both preserve children but have no attribute catch-all (contrastSignal/Object/Bridge, which preserve unknown attributes). <elevationProfile>non-<elevation>children: silently dropped.
Suggested shape
The preserved/RawXml idiom is established (Signal/Object/Controller for attrs+children; Road::object_extras for container children; #326's preserved_user_data for enumerated-code scopes). Each row above is a small, independent change of the same shape; <header> is the one needing a real decision (preserve vs model, and the writer currently synthesizes rather than round-trips).
Acceptance
- Each scope above either preserves verbatim or emits a structured warning (parser-never-silently-drops holds everywhere).
<geoReference>survives a load→save round trip (or is explicitly modeled by P7 first — coordinate with the P7 epic).- Round-trip tests + fuzz corpus samples per scope, in the fmt-s2: round-trip hardening — foreign userData preservation + rm: registry tests #326 pattern.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
JArmandoAnaya commentedon Jul 27, 2026
2026-07-27 roadmap review — the kernel-vs-spec audit confirmed every scope in this list and found three more in the same class:
<laneSection>@singleSide— zero hits anywhere incore/;parse_lanesreads only@sand does no attribute sweep. This issue names laneSection unknown children but not its attributes.<dataQuality>— absent everywhere; at road level it would at least trip the child sweep, at header level it is invisible.junction @type="direct"—parse_virtual_junctiontests only== "virtual";@typeis not stored, and the writer emits@typeonly for virtual, so a direct junction silently degrades to a common one. The unknown-attribute catch-all this issue plans would preserve the string, but the semantic degradation (direct junctions have no connecting roads) deserves a sentence in this issue's acceptance: preserve + warn, since we re-derive geometry the standard says a direct junction doesn't have.One scope deliberately not added here: road
<type>/<speed>— it is whitelisted atreader.cpp:338-341(so it never even warns) and is a modeled-element gap, not a preservation gap, now tracked as #454 (model it and write it from the road class). Whichever lands first should remove the silent whitelist.JArmandoAnaya commentedon Jul 28, 2026
2026-07-28 roadmap review — additional scopes for this sweep (spec-coverage scan at main
cfb0ec9; line refs against that commit). These extend the inventory above; none of them is covered by the existing rows as written.<header>known attributes, not just children. The existing header row covers<geoReference>and the child walk; the reader also keeps onlyrevMajor/revMinorof the attributes, and the writer synthesizes its own@name/@vendor— so@date,@north/south/east/west,@name,@version,@vendorof a foreign file are regenerated with no diagnostic. Whoever does the header row should round-trip the attributes too (bounding box + provenance).<roadMark>known attributes. The row says "unknown attributes and children"; note that the known-but-unmodeled@weight,@height,@laneChange(§11.9 Table 48) and<line>@color/@ruleare dropped the same way (reader reads onlysOffset/type/width/color/material).@laneChangeis consumed semantically by simulators, so this is the highest-value part of the roadMark row.Lane
<border>(§11.7.2). Warned (reader.cpp:608-610) and deliberately excluded from the lane preserved tier (reader.cpp:718-721), so a border-defined lane loses its geometry entirely on round-trip — the only warn-drop in the lane scope. Minimum fix: move it into the preserved tier. Border→width conversion is a separate modeling decision, out of this sweep.Junction
@typebeyondvirtual.parse_virtual_junctionreturns early unlesstype=="virtual";@typeis never stored and the writer re-emits onlyvirtual— so<junction type="crossing">(§12.8, since 1.8.0) round-trips as a common junction with the attribute stripped, silently. (type="direct"is already listed above.) While in the junction row: name<crossPath>explicitly among the unknown children — it is the 1.8+ native pedestrian-crossing carrier, and we author crosswalks as objects instead, so foreign crossPath data is the realistic collision case.<laneLink>@overlapZone(§12.6.2) — onlyfrom/toare read (reader.cpp:1746-1749); silent. And foreign<connection>@ids are renumbered0..non write (writer.cpp:1449) with unknown connection attrs/children dropped — an id another tool may reference externally.Warn-drop → preserve upgrades (all currently warned, so the parser contract holds, but the data is still lost on save):
lateralProfile<shape>(§10.5.3) and legacy<crossfall>; road<surface>/OpenCRG (§10.6); root<junctionGroup>(§12.13),<station>(§15.4),<vmsGroup>(the writer's own comment atwriter.cpp:2610cites its Table without handling it); road<railroad>(§15.2–15.3). Preservation makes round-trip lossless without any modeling commitment. Whether rail/CRG ever get modeled is a roadmap non-goal decision, separate from this sweep.Related new filing from the same review: #476 — unknown enum spellings (lane type / roadMark type / colour) are actively rewritten (
Other→"none"/"solid"/"standard") rather than dropped; kept as its own issue because it corrupts a modeled field rather than losing an unparsed scope.feat: your scene can say where on the earth it is (p7-s5) (#324) (#483)
JArmandoAnaya commentedon Jul 28, 2026
The
<header>row is discharged by #324 (p7-s5), merged as #483 →ad542deThis issue's first bullet — "
<header>children — including<geoReference>(§8.5)" — asked whoever models §8.5 to decide preserve vs model. #324 landed first and built both halves of one dispatch:<geoReference>and<offset>, onRoadNetwork::georeference(). A second<geoReference>is refused withasam.net:xodr:1.9.0:header.proj.max_one_proj(first wins); a partial<offset>is reported and dropped, never completed with zeros.<license>(§6.4.2),<dataQuality>,<include>, foreign<userData>— and every unknown attribute (date,version, anything foreign), onRoadNetwork::preserved_header()(RawXml), re-emitted after the modelled children per thet_headersequence. Each drop that used to be silent now warns, in the fmt-s2: round-trip hardening — foreign userData preservation + rm: registry tests #326 pattern.The one deliberate exception:
name/vendor/north/south/east/westare NOT preserved — the writer owns them. The bounding box is derived from the network being written, because a box carried over from the input becomes a lie the moment anything moves.Fixture note relevant to the rest of this issue: before #324, not one committed
.xodr— sample or fuzz corpus — carried a<geoReference>, so any assertion about it would have passed forever on a build that dropped it. #324 added a georeferenced sample plus three corpus seeds (bad_header_two_georeference,bad_header_offset_partial,header_foreign_children). The remaining rows here have the same exposure — check what the corpus actually contains before trusting a preservation test.Still open on this issue:
<roadMark>unknown attrs/children,<laneSection>unknown children,<lanes>non-laneOffset/laneSectionchildren,<junction>non-userData unknown children (incl.<priority>), unknown attributes on<lane>/<junction>, and<elevationProfile>non-<elevation>children.JArmandoAnaya commentedon Aug 1, 2026
Fixed by #555 (merged as
b0e54ac). All six scopes route through onecapture_unmodeled()helper that takes the caller's modeled attribute and child names — so a scope is added by naming what it models rather than reimplementing the walk.<geoReference>needed nothing: P7 modeled it in #324, verified against the current reader.@singleSideis preserved rather than typed, since the mesher does not implement single-sided sections. Corpus seedpreserved_scopes.xodradded.fix(xodr): preserve the five warned-and-dropped spec areas (#539) (#556)
fix(xodr): round-trip virtual-junction linkage and connection interna…