Skip to content

test(rust): run the provider-composition corpus in the Rust port - #711

Merged
dmealing merged 1 commit into
mainfrom
fm/mo-140-w0-r3
Dec 4, 2026
Merged

dmealing merged 1 commit into
mainfrom
fm/mo-140-w0-r3

Conversation

@dmealing

@dmealing dmealing commented Dec 3, 2026

Copy link
Copy Markdown
Member

What Changed

  • Adds server/rust/metaobjects/tests/provider_composition_conformance.rs, a runner for the shared fixtures/provider-composition-conformance/ corpus (11 error-shape, 4 compose-load, 3 attr-ownership cases). Error-shape cases compose the named providers through providers::compose_registry and check the expected error code, or the sealed-registry probe failure for sealThenRegister. Compose-load cases strict-load a document after composition. Attr-ownership cases check TypeRegistry::attr_owner and common_attr_owner for each attribute.
  • Updates docs/CONFORMANCE.md to mark the Rust port as covering provider-composition-conformance/ (was —) and to list the corpus in the Rust cargo test row.
  • Updates docs/ports/rust.md with a row describing the corpus coverage.

No runtime or manifest vocabulary changes; metamodelVersion is unchanged.

Validation

Risk Assessment

✅ Low: The change adds only a Rust conformance test and matching doc rows; its named providers match the corpus contract and the TypeScript reference, it covers all three manifest shapes (11, 4 and 3 cases), and no product code or metamodel vocabulary changes.

Testing

Ran the new Rust runner cargo test -p metaobjects --test provider_composition_conformance against the committed fixtures; 3 test groups passed, exit 0, covering the 18 fixture files. That run is local, real product code against the committed corpus, so it counts as live for this scenario. The CLI has no provider-composition surface, so there was no end-user CLI scenario to drive. Broad regression came from the configured test command scripts/ci-local.sh --affected --strict-toolchains, which passed at this target commit. No source changed in this turn, so it was not re-run.

  • Live validation: ✅ go - 1 of 2 scenarios driven live against the product
Scenario Result Live Evidence
Rust port composes all 18 shared provider-composition corpus cases (11 error-shape, 4 compose-load, 3 attr-ownership) against the real registry ✅ pass live cargo test -p metaobjects --test provider_composition_conformance in server/rust: 3 tests ok, exit 0
Rust CLI end-user surface for provider composition ⏸️ untested no The CLI exposes init/gen/verify/eject/agent-docs only. Provider composition is not a CLI command, so no end-user CLI scenario exists for this change.

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 1 of 2 scenarios driven live against the product
Scenario Result Live Evidence
Rust port composes all 18 shared provider-composition corpus cases (11 error-shape, 4 compose-load, 3 attr-ownership) against the real registry ✅ pass live cargo test -p metaobjects --test provider_composition_conformance in server/rust: 3 tests ok, exit 0
Rust CLI end-user surface for provider composition ⏸️ untested no The CLI exposes init/gen/verify/eject/agent-docs only. Provider composition is not a CLI command, so no end-user CLI scenario exists for this change.
  • scripts/ci-local.sh --affected --strict-toolchains
  • cargo test -p metaobjects --test provider_composition_conformance (in server/rust) — 3 passed, 0 failed
  • Counted fixtures in fixtures/provider-composition-conformance/ (json at top level and in subdirs) — 18, matching the commit's stated case count
  • Read the Rust CLI help (cargo run -p metaobjects-cli -- --help) to confirm no provider-composition command exists
  • git status --short after the run — clean
⏭️ **Document** - skipped

Step was skipped.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Add metaobjects/tests/provider_composition_conformance.rs, which runs all 18
cases of fixtures/provider-composition-conformance/ through the canonical named
providers: the 11 error-shape manifests (duplicate id, missing dependency, cycle,
attr conflict, attr shadow, common-attr conflict and ERR_REGISTRY_SEALED), the 4
compose-load manifests (a consumer extend of view.currency survives a strict load
and a typo or misplaced core attr is still refused) and the 3 attr-ownership
manifests (ADR-0062 owners). The registry already implemented every rule; no
library code changes. Mark Rust green for the corpus in docs/CONFORMANCE.md and
docs/ports/rust.md.

metamodelVersion and the registered vocabulary do not move.
@dmealing
dmealing merged commit 0310a39 into main Dec 4, 2026
11 checks passed
@dmealing
dmealing deleted the fm/mo-140-w0-r3 branch December 4, 2026 00:24
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