Commit 7ddb7f7
committed
fix(openlabel): resolve audit findings on v1 structural schema
Make the LinkML structural schema faithfully validate the ASAM OpenLABEL
v1.0.0 scenario tagging file format and its full tag vocabulary.
Structural format (openlabel-v2-schema.yaml):
- Accept numeric vec.val arrays (ranges/sets such as [3.4, 3.7] and [2, 3])
via standard LinkML any_of[float, string]; items were previously string-only
and rejected the spec's own section 8.2.5 examples. Removing the schema-wide
default_range lets any_of generate a clean, draft-independent anyOf (no
helper class, no post-processing).
- Allow tag_data as object OR string, matching ASAM oneOf[object, string].
- Constrain schema_version to "1.0.0", boolean/text type to "value", and drop
the fabricated "set" vec type so the schema matches the ASAM schema exactly.
- Generate the JSON Schema deterministically with gen-json-schema
--deterministic --indent 3 (consistent with the OWL/SHACL/context targets),
so output is stable and the pretty-format-json hook is a no-op.
Tag vocabulary (openlabel-v2.yaml, scripts/sync_tag_type_enum.py):
- Add 15 intermediate ODD/Behaviour category classes (SceneryJunction,
EnvironmentWeather, BehaviourMotion, DrivableArea*, Geometry*, ...) and 10
mid-level enum values (RoundaboutLarge/Mini/Normal/Compact/Double and the
uniform/variable signs) so every ASAM v1 tag class is a valid tag.type.
- Derive TagTypeEnum from all openlabel_v2-namespaced classes; the vocabulary
grows 227 -> 256 and now covers all 243 ASAM tag classes (0 missing).
- New classes carry ISO 34503:2023 comments and v1 PAS 1883 notes, matching
the model's ISO-migration citation convention.
Tests and tooling:
- Validate spec chapter-8 examples against BOTH the authoritative ASAM schema
and the LinkML schema, and assert the vocabulary covers every ASAM tag class
(replaces a tautological count test). Suite grows 19 -> 44 tests.
- Correct the equivalence/stricter claims and add a scope note in
SCHEMA_MODELING.md.
Regenerated OWL/SHACL/JSON-LD context/JSON Schema/PROPERTIES; SHACL conformance
suite and 44 unit tests pass; full pipeline is idempotent.
Signed-off-by: Carlo van Driesten <carlo.van-driesten@bmw.de>1 parent 629d50c commit 7ddb7f7
11 files changed
Lines changed: 11659 additions & 4018 deletions
File tree
- artifacts/openlabel-v2
- linkml/openlabel-v2
- scripts
- tests/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
| 217 | + | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| |||
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
70 | 85 | | |
71 | 86 | | |
72 | 87 | | |
| |||
107 | 122 | | |
108 | 123 | | |
109 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
110 | 137 | | |
111 | 138 | | |
112 | 139 | | |
| |||
117 | 144 | | |
118 | 145 | | |
119 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
120 | 156 | | |
121 | 157 | | |
122 | 158 | | |
| |||
149 | 185 | | |
150 | 186 | | |
151 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
152 | 191 | | |
153 | 192 | | |
154 | 193 | | |
| |||
378 | 417 | | |
379 | 418 | | |
380 | 419 | | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
381 | 423 | | |
382 | 424 | | |
383 | 425 | | |
| |||
388 | 430 | | |
389 | 431 | | |
390 | 432 | | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
391 | 436 | | |
392 | 437 | | |
393 | 438 | | |
| |||
0 commit comments