Phase 3.4 of docs/openscenario-api-coverage.md, split out of #174 because that issue sequences it last and it needs its own WASM artifact bump (#180 spent one).
Why now
Everything it depends on is in place:
What
IScenarioChecker exposes 295 Add*CheckerRule slots — upstream's documented extension point ("write your own checker rules for your company's authoring guidelines"). Rules derived from the ontology (the SHACL shapes in artifacts/openscenario/) belong there: they would then run inside the same CheckScenarioInFileContext pass as the generated range/union/version rules, on the parsed model, instead of only over the IR before serialization.
Sketch:
- A small C++ rule class that evaluates a table of constraints handed to it from TypeScript at load time, so adding a rule does not mean rebuilding the WASM artifact. The alternative — one generated C++ class per SHACL constraint — makes every ontology change an artifact bump and is the wrong trade.
- The constraint table is derived from SHACL at runtime (
sh:minInclusive/sh:maxInclusive/sh:in on the derived shapes), not transcribed. This is the budget-sensitive part: it must stay discovery-driven, with no ontology-specific literals in the C++ or in the bridge.
- Findings come back as diagnostics carrying this repo's own rule UIDs, which the
.xqar export already knows how to render.
Tests (criterion #30)
An ontology constraint that the generated range rules do not cover must produce an error from validate() on a document that violates it, and no diagnostic on one that does not — with the constraint added to the SHACL only, never to the C++.
Note
One artifact rebuild, batched with whatever else lands at the same time. packages/authoring-wasm/native/BUILD.md has the recipe; the pinned Emscripten SDK is in versions.json.
Phase 3.4 of
docs/openscenario-api-coverage.md, split out of #174 because that issue sequences it last and it needs its own WASM artifact bump (#180 spent one).Why now
Everything it depends on is in place:
.xqar, real bundles can be run and imported.What
IScenarioCheckerexposes 295Add*CheckerRuleslots — upstream's documented extension point ("write your own checker rules for your company's authoring guidelines"). Rules derived from the ontology (the SHACL shapes inartifacts/openscenario/) belong there: they would then run inside the sameCheckScenarioInFileContextpass as the generated range/union/version rules, on the parsed model, instead of only over the IR before serialization.Sketch:
sh:minInclusive/sh:maxInclusive/sh:inon the derived shapes), not transcribed. This is the budget-sensitive part: it must stay discovery-driven, with no ontology-specific literals in the C++ or in the bridge..xqarexport already knows how to render.Tests (criterion #30)
An ontology constraint that the generated range rules do not cover must produce an error from
validate()on a document that violates it, and no diagnostic on one that does not — with the constraint added to the SHACL only, never to the C++.Note
One artifact rebuild, batched with whatever else lands at the same time.
packages/authoring-wasm/native/BUILD.mdhas the recipe; the pinned Emscripten SDK is inversions.json.