You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
P1 — SKR03 Bau no longer overwrites canonical SKR03 slot:
Before: hydrate_skr03_bau registered into OGIT::SKR03_V1 (same slot
as canonical), so a caller that hydrated both lost the canonical
4-digit account set on the second call. The test only invoked Bau
alone so the silent overwrite went undetected.
After: SKR 03 Bau hydrates into its OWN G slot OGIT::SKR03BAU_V1=42,
with inherits_from: Some(OGIT::SKR03_V1.0) to make the structural
dependency on canonical SKR 03 explicit. Mixed consumers can now
hold canonical SKR 03 (4-digit, slot 40) AND Bau (6-digit, slot 42)
in the same OntologyRegistry without interference.
- crates/lance-graph-contract/build.rs: allocates SKR03BAU=42
- crates/lance-graph-ontology/src/hydrators/skr_datev.rs: hydrate_skr03_bau
writes to OGIT::SKR03BAU_V1.0 with the new inherits_from
- modules/skr03-bau/manifest.yaml: declares 5 anchor trade-specific
accounts (Sand- und Kiesausbeute, Bauliche Anlagen für stationäre
Fertigung, Bauten auf dem Bauhof) with stable u16 entity IDs
- tests: skr03_bau_extensions_hydrate_into_skr03_slot renamed to
skr03_bau_extensions_hydrate_into_dedicated_slot (expects slot 42)
- NEW REGRESSION TEST: skr03_canonical_and_bau_coexist_in_one_registry
hydrates both schemes in sequence, asserts:
- canonical bundle still has 1400+ entities (not dropped)
- canonical SKR 03/1000 (Kasse) resolves in canonical bundle
- Bau /007510 (Sand- und Kiesausbeute) resolves in Bau bundle
- Bau IRIs do NOT resolve in canonical bundle (and vice versa)
P2 — Schematron Event::Empty no longer leaks state into later text:
Before: <assert .../>, <report .../>, <pattern .../> (self-closing)
emitted Event::Empty handled with the same branch as Event::Start
and set in_assert_or_report = true. Self-closing elements never
emit a matching Event::End, so the flag stayed stuck true and the
parser scanned later unrelated text body as rule message text,
producing spurious /rule/... IRIs.
After: Event::Start and Event::Empty are split into separate match
arms. Empty interns the @id only (no body to collect) and does NOT
touch in_assert_or_report. Start sets the flag; End extracts rule
IDs from current_text_buf and resets state. Self-closing elements
no longer affect state.
- crates/lance-graph-ontology/src/hydrators/schematron.rs
- NEW REGRESSION TEST: self_closing_assert_does_not_capture_later_text
constructs a fixture with a self-closing <assert/> followed by
a non-assert <bar> element containing "[BR-99]" text, then a
normal Start/End assert containing "[BR-42]":
- A-EMPTY-001 and A-NORMAL-001 assert IRIs both resolve
- BR-42 (real rule from message body) resolves
- BR-99 (from stray text outside any assert) does NOT resolve
Side fix: replaced `if !map.contains_key(&iri) { map.insert(iri, id) }`
in SkrHydrator with the Entry::Vacant pattern to clear a clippy
`map_entry` warning. Clippy back to 5 warnings (all pre-existing
oxrdf deprecation warnings, no new ones).
All 116 lance-graph-ontology tests pass (was 114; +2 regression tests);
downstream consumers build clean.
0 commit comments