Skip to content

feat: versioned dialect contracts + ReqIF adapter migration - #29

Merged
elasticdotventures merged 1 commit into
mainfrom
feat/mbse-requirements
Sep 20, 2026
Merged

elasticdotventures merged 1 commit into
mainfrom
feat/mbse-requirements

Conversation

@elasticdotventures

Copy link
Copy Markdown
Member

Summary

  • Adds dialect::{DialectUrn, Upgrade, DialectError} — a forward-only, minor/patch-compatible decode contract for versioned wire artifacts, kept off the canonical typed layer per DESIGN-NOTE-typed-model-layer.md §2.8 (no SchemaVersion field on the type itself; version metadata lives on the decoding envelope).
  • Requirement now implements Stereotyped (UfoStereotype::Kind, UFO-A rigid/sortal Endurant), gaining MbseExport for free.
  • Migrates ReqIF parsing and the ReqIfBundle -> RequirementGraph adapter here from kr0ki-core::reqif_adapter, behind a new reqif feature — non-default, matching this crate's existing posture for young/small-bus-factor optional dependencies (sysml-v2-parser, scxml). The Rust orphan rule forces this: a downstream crate can't impl a foreign trait for a foreign type, so the ReqIF bridge has to live where RequirementGraph does.
  • Adds reqif::parse_and_lower as the combined bytes -> RequirementGraph entry point so a caller with only bytes depends on zero reqrs API surface directly.

See kr0ki's docs/DESIGN-NOTE-versioned-dialects-and-b00t-loader.md §1–3 for the full design rationale.

Test plan

  • cargo test (default features) — 249/249 pass
  • cargo test --features reqif — 260/260 pass
  • cargo clippy --features reqif --all-targets -- -D warnings — clean

Adds dialect::{DialectUrn, Upgrade, DialectError} — the forward-only,
minor/patch-compatible decode contract for versioned wire artifacts,
kept off the canonical typed layer per DESIGN-NOTE-typed-model-layer.md
§2.8 (no SchemaVersion field on the type itself; version metadata lives
on the decoding envelope instead).

Requirement now implements Stereotyped (UfoStereotype::Kind, UFO-A
rigid/sortal Endurant), gaining MbseExport for free.

Migrates ReqIF parsing and the ReqIfBundle -> RequirementGraph adapter
here from kr0ki-core::reqif_adapter, behind a new `reqif` feature
(non-default, matching this crate's existing posture for young/small-
bus-factor optional dependencies — sysml-v2-parser, scxml). The Rust
orphan rule is what forces this: a downstream crate can't impl a
foreign trait for a foreign type, so the ReqIF bridge has to live where
RequirementGraph does. Adds reqif::parse_and_lower as the combined
bytes -> RequirementGraph entry point so a caller with only bytes
depends on zero reqrs API surface directly.

See kr0ki's docs/DESIGN-NOTE-versioned-dialects-and-b00t-loader.md §1-3.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@elasticdotventures
elasticdotventures merged commit ee87348 into main Sep 20, 2026
2 checks passed
@elasticdotventures
elasticdotventures deleted the feat/mbse-requirements branch September 20, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant