Repository navigation
Description
Summary
The XMILE reader's Feature enum (src/simlin-engine/src/xmile/mod.rs:888, deserialized via quick_xml::de::from_reader in project_from_reader at xmile/mod.rs:1223) hard-fails the ENTIRE file parse on any <options> child element it does not recognize, instead of skipping it. Empirically confirmed (scratch probe crate) on both pre- and post-#872 code, so this is pre-existing and independent of the writer fix.
Three concrete consequences:
<uses_conveyors/>(plural) is rejected withunknown variant 'uses_conveyors'.docs/design/conveyors.mdsection 3.1 explicitly promises "accept both" spellings and claims "The reader accepts three encodings ... the<uses_conveyors/>spelling" -- the reader does not deliver on that. Worse, the OASIS XMILE v1.0 spec's own sample options block (section 2.2.1) uses<uses_conveyors leak="true"/>, so a file copying the spec's sample cannot be opened in Simlin at all.<uses_submodels/>is rejected -- it is a spec-listed option (XMILE section 2.2.1) with noFeaturevariant, so any file using the element form fails to open.- Any unknown/vendor-extension option element aborts the whole parse. The
<options>block is advisory metadata; failing the file over an unrecognized declaration is brittle against vendor extensions and future spec revisions. (Issue conveyor-engine: XMILE writer never emits <uses_conveyor/> header feature #872's evidence section incidentally observed<totally_bogus_option/>erroring withunknown variant, but conveyor-engine: XMILE writer never emits <uses_conveyor/> header feature #872 tracks only the writer-side emission gap, not this reader gap.)
Why it matters
- Correctness/interop: spec-conformant files (including the spec's own sample) and Stella exports using the plural spelling or submodels declaration are un-openable.
- Documentation contract:
docs/design/conveyors.md3.1 documents behavior the code does not implement. - Robustness: the failure mode is total (file rejected) for what should at worst be a skipped advisory element.
Component
src/simlin-engine/src/xmile/mod.rs (Feature enum / options deserialization).
Suggested direction
- Add a
#[serde(alias = "uses_conveyors")](or equivalent) so the plural spelling maps toUsesConveyor, honoring the conveyors.md 3.1 contract. - Add a
UsesSubmodelsvariant for the spec-listed option. - Add an
#[serde(other)]-style tolerant fallback variant (or custom deserializer) so unknown option elements are skipped rather than failing the file. Note quick_xml/serde enum handling may need a catch-all that also tolerates attributes/content on the unknown element. - Add reader tests: plural spelling, the spec 2.2.1 sample block verbatim,
uses_submodels, and an unknown vendor option element.
Context
Identified during adversarial review of the uncommitted #872 fix on branch conveyor-engine (2026-07-08). Verified with a scratch probe crate against both pre-fix and post-fix code: failure identical in both, i.e. pre-existing, not introduced by the #872 fix. Related but distinct: #872 (writer never emits <uses_conveyor/>).
Activity
engine: emit the uses_conveyor XMILE header feature
engine: emit the uses_conveyor XMILE header feature