Repository navigation
test(rust): run the provider-composition corpus in the Rust port - #711
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
server/rust/metaobjects/tests/provider_composition_conformance.rs, a runner for the sharedfixtures/provider-composition-conformance/corpus (11 error-shape, 4 compose-load, 3 attr-ownership cases). Error-shape cases compose the named providers throughproviders::compose_registryand check the expected error code, or the sealed-registry probe failure forsealThenRegister. Compose-load cases strict-load a document after composition. Attr-ownership cases checkTypeRegistry::attr_ownerandcommon_attr_ownerfor each attribute.docs/CONFORMANCE.mdto mark the Rust port as coveringprovider-composition-conformance/(was—) and to list the corpus in the Rustcargo testrow.docs/ports/rust.mdwith a row describing the corpus coverage.No runtime or manifest vocabulary changes;
metamodelVersionis 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_conformanceagainst 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 commandscripts/ci-local.sh --affected --strict-toolchains, which passed at this target commit. No source changed in this turn, so it was not re-run.cargo test -p metaobjects --test provider_composition_conformancein server/rust: 3 tests ok, exit 0Pipeline
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.
cargo test -p metaobjects --test provider_composition_conformancein server/rust: 3 tests ok, exit 0scripts/ci-local.sh --affected --strict-toolchainscargo test -p metaobjects --test provider_composition_conformance(in server/rust) — 3 passed, 0 failedCounted fixtures in fixtures/provider-composition-conformance/ (json at top level and in subdirs) — 18, matching the commit's stated case countRead the Rust CLI help (cargo run -p metaobjects-cli -- --help) to confirm no provider-composition command existsgit status --shortafter the run — clean⏭️ **Document** - skipped
Step was skipped.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.