release(v0.12.0): multi-file feature models — REQ-083#312
Merged
Conversation
…Verus CI silent-failure) REQ-083 — multi-file feature models: each model file stays a standalone, independently-solvable unit; a feature-model-binding file mounts sub-models at parent features with explicit mapping + prefix namespacing (the externals: prefix:ID model). The v0.12.0 headline. REQ-084 — the Verus Proofs CI job's Nix install fails on the no-sudo self-hosted runner, so `Verify Verus specs` is skipped while the continue-on-error job stays green: a proof job verifying nothing. Proven on PR #311 run 26246893086. Refs: FEAT-135
Feature models can now be composed across files. A new feature-model-binding file (`kind: feature-model-binding`) mounts standalone sub-model files at parent features under an explicit, unique prefix. `FeatureModel::load_composed` splices each sub-model into its parent — prefixing feature names, child refs, the root, and bare feature tokens in constraint strings — unions the constraint sets, and runs the normal construction + tree validation once over the merged result. Each model file remains independently solvable via `from_yaml` (refactored to share `from_yaml_struct`). A broken mount fails loudly: missing file, absent or `leaf` mount point, duplicate prefix, or cyclic composition each return an error rather than silently skipping (F2 silent-failure class). `is_symbol_cont` in the s-expr lexer now accepts `:`, so a namespaced feature reference (`prefix:feature`) lexes as a single symbol — required for cross-prefix constraints like `(implies car pwt:four-wheel)`. CLI wiring (`rivet variant` commands accepting a binding file) is a follow-up. Implements: REQ-083
…-083) Completes REQ-083: the CLI surface for multi-file feature model composition. `FeatureModel::load(path)` dispatches on the file's `kind:` — a `feature-model-binding` file is composed via `load_composed`, any other file is parsed as a single model via `from_yaml`. The nine `FeatureModel::from_yaml` call sites across the `rivet variant` and `rivet validate --model` paths now route through `load`, so every command transparently accepts a binding file wherever it accepted a plain model. Adds `rivet-cli/tests/variant_compose.rs` — integration tests driving the real binary: `variant list` / `solve` over a composition, and a broken mount failing loudly with a non-zero exit. Documents the `feature-model-binding` compose format in docs/feature-model-schema.md. Implements: REQ-083
Bump workspace + VS Code extension to 0.12.0 and add the CHANGELOG section. v0.12.0 ships multi-file feature model composition: a feature-model-binding file mounts standalone sub-model files onto parent features under explicit, unique prefixes, resolving to one tree. Minor version — new file kind and new rivet variant input behaviour, no breaking schema or CLI removal. Refs: REQ-083
📐 Rivet artifact delta
Graphgraph LR
REQ_083["REQ-083"]:::added
REQ_084["REQ-084"]:::added
classDef added fill:#d4edda,stroke:#28a745,color:#155724
classDef removed fill:#f8d7da,stroke:#dc3545,color:#721c24
classDef modified fill:#fff3cd,stroke:#ffc107,color:#856404
classDef overflow fill:#e2e3e5,stroke:#6c757d,color:#495057,stroke-dasharray: 3 3
Added
Posted by |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Rivet Criterion Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: 3169bb9 | Previous: f9ac472 | Ratio |
|---|---|---|---|
query/10000 |
136026 ns/iter (± 678) |
93063 ns/iter (± 966) |
1.46 |
This comment was automatically generated by workflow using github-action-benchmark.
RUSTSEC-2026-0149 is a high-severity advisory in wasmtime-wasi 43, a transitive dependency behind the optional, non-default `wasm` feature — the same class as the 13 wasmtime advisories the audit step already ignores. The 43.x line has no fixed release; clearing it for real needs a wasmtime 43->45 major bump, which is out of scope for this release. Add it to the existing `--ignore` list so the audit reflects a triaged state rather than an untriaged failure.
Add five error-path tests for feature-model composition: empty `compose:`, a parent listed twice, multiple candidate roots, a cyclic binding (every parent mounted), and a composition cycle deeper than the root caught by the recursion-path guard. These exercise REQ-083's "a broken mount is a hard error, never a silent skip" Acceptance criterion across every detection branch. Verifies: REQ-083
…Q-083) An llvm-cov pass surfaced a real gap: prefix_constraint / flush_constraint_token — the tokeniser that rewrites bare feature names inside a sub-model's own constraint strings — had zero coverage, because no test composed a sub-model that declared constraints. Add five tests: a sub-model whose constraint is prefixed and proven to still fire under the solver after composition; sub-model attribute-schema merge; attribute-schema key collision; the FeatureModel::load kind-dispatcher; and an unreadable/malformed binding file. feature_model.rs line coverage 84.6% -> 87.4%; the composition functions (load_composed, load_and_splice, splice_into) now sit at 89-100% with no CRAP-flagged anti-patterns. Verifies: REQ-083
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.
Summary
v0.12.0 ships multi-file feature model composition (REQ-083). A
product line can now be authored as a top-level feature model plus
per-level sub-models in their own files — vehicle → powertrain → ECU —
each file a valid, independently solvable model on its own.
feature-model-binding: acompose:list mountsstandalone sub-model files onto parent features. Each mount declares
an explicit, unique
prefix:; the sub-model's features are namespacedunder it (
pwt:four-wheel), mirroring theexternals: prefix:IDmodel. Composition is recursive and resolves to one tree.
FeatureModel::load_composed/FeatureModel::load(core);every
rivet variantcommand +rivet validate --modelnow routethrough
load, so a binding file is accepted wherever a plain modelwas.
:in a symbol, so cross-prefix constraintslike
(implies car pwt:four-wheel)parse.leafmount point,duplicate prefix, cyclic composition — is a hard error, never a
silent skip (F2 silent-failure class).
Composition resolves sub-model files by path relative to the binding
file, within one repository; cross-git-repo composition is tracked
separately as a follow-on.
Also files REQ-084 (the Verus CI job's Nix install fails silently on the
self-hosted runner — proven on #311).
Test plan
cargo test -p rivet-core -p rivet-cligreen (1054 core lib + allintegration suites, incl. 8
compose_*core tests + 3variant_composeCLI tests)cargo clippy— no new warnings;cargo fmtcleanrivet variant list/solve --model binding.yamlcomposes;broken mount exits non-zero
continue-on-error)🤖 Generated with Claude Code