Skip to content

refactor(reqif): move ReqIF adapter into ufo_types::reqif - #43

Merged
elasticdotventures merged 3 commits into
mainfrom
task/reqif-intake
Sep 20, 2026
Merged

elasticdotventures merged 3 commits into
mainfrom
task/reqif-intake

Conversation

@elasticdotventures

@elasticdotventures elasticdotventures commented Sep 20, 2026 •

Copy link
Copy Markdown
Member

Summary

  • crates/kr0ki-core/src/reqif_adapter.rs and the reqrs parse call move into ufo_types::reqif (sibling PR: feat: versioned dialect contracts + ReqIF adapter migration ufo-types#29), per docs/DESIGN-NOTE-versioned-dialects-and-b00t-loader.md §3 — the Rust orphan rule means kr0ki-core can't impl a foreign trait (Upgrade) on a foreign type (RequirementGraph), so the bridge has to live where the type does.
  • reqif_import.rs now calls ufo_types::reqif::parse_and_lower instead of reqrs directly; ReqIfImportError::Parse and ::Adapter collapse into one variant (ufo_types::reqif's own ReqIfAdapterError already covers both).
  • ufo-types dependency pinned by rev to the pushed feat/mbse-requirements commit (no tag exists past v0.15.0 covering it yet) — bump to a tag = pin once that lands and a release is cut.

No change to the shipped HTTP/MCP contract shape (POST /requirements/import, import_reqif tool).

Test plan

  • cargo build -p kr0ki-core against the real (pushed) ufo-types git dependency, no local override
  • cargo test -p kr0ki-core --lib — 156/156 pass
  • cargo test -p kr0ki-server — 47/47 pass, including requirements_import_* and mcp_tools_lists_all_thirteen_tools_with_bindings

elasticdotventures and others added 3 commits September 20, 2026 06:50
reqif_adapter.rs (ReqIfBundle -> RequirementGraph mapping) and the
reqrs parse call move into ufo-types' new `reqif` feature module
(sibling commit a1f6a89, PromptExecution/ufo-types), per
docs/DESIGN-NOTE-versioned-dialects-and-b00t-loader.md §3: the orphan
rule means kr0ki-core can't impl a foreign trait (Upgrade) on a
foreign type (RequirementGraph), so the bridge lives where the type
does. reqif_import.rs now calls ufo_types::reqif::parse_and_lower
instead of reqrs directly; its own ReqIfImportError::Parse and
::Adapter variants collapse into one (ufo_types::reqif's own
ReqIfAdapterError already covers both).

No change to the shipped HTTP/MCP contract shape (POST
/requirements/import, import_reqif tool) -- verified by the existing
kr0ki-server requirements_import_* tests, unmodified and passing.

Depends on the sibling ufo-types commit above landing (tag bump) --
not independently buildable without it. Cargo.lock and the root
Cargo.toml's dev-only ufo-types path [patch] are intentionally left
uncommitted; the patch is local-only wiring to build against that
commit before it's tagged, not a real dependency change.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Drops the local-path [patch] used while a1f6a89 was uncommitted/
unpushed -- ufo-types@a1f6a89 is now pushed, so kr0ki-core pins it by
rev directly (no tag exists past v0.15.0 yet covering this commit).
Verified: cargo build -p kr0ki-core and cargo test -p kr0ki-core --lib
(156/156) both pass against the real git dependency, no local override.
@elasticdotventures
elasticdotventures merged commit c238a3a into main Sep 20, 2026
2 checks passed
@elasticdotventures
elasticdotventures deleted the task/reqif-intake branch September 20, 2026 11:13
elasticdotventures added a commit that referenced this pull request Sep 20, 2026
…anch (#45)

PR #43's rev pin (a1f6a89) pointed at feat/mbse-requirements, whose
tip no longer exists as a reachable ref after ufo-types#29 squash-
merged it into main and the branch was deleted. Re-pinned to the
resulting merge commit on main (ee873488). Verified: cargo build -p
kr0ki-core and cargo test -p kr0ki-core --lib (156/156) both pass.
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