Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…t v1 (Track B commit 1)
New crate spar-variants implements the consumer side of the v1 contract
(docs/contracts/rivet-spar-variant-v1.md). Reads rivet's resolved-variant
JSON blob, exposes a `keep_in_variant` predicate that applies intersection-
semantics binding rules to HIR items, and validates strict version
matching ("1" only — v2 readers refused per contract).
No CLI integration in this commit (--variant flag wiring lands when
rivet's emitter side ships and we have an end-to-end test loop). No
HasBindingIdentity impls for spar-hir-def types yet — adapter ships
with the CLI commit. Stub types are used in unit tests.
Per Track B contract v1 (#144).
New requirement: REQ-VARIANT-001.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
87e9906 to
a2f7f9d
Compare
This was referenced Apr 27, 2026
avrabe
added a commit
that referenced
this pull request
Apr 27, 2026
…ommit 6/8) Wires spar-variants (Track B v0.7.x consumer crate, #162) into spar moves verify and spar moves enumerate. Both commands now accept --variant NAME (implicit; shells out to rivet) and --variant-context PATH (explicit; reads the JSON blob directly per the v1 contract). Variant filter is applied before overlay validation: items not in the selected variant are dropped from the analysis surface, matching the contract's intersection semantics. Output includes variant + feature model hash for audit trail. New requirement: REQ-MIGRATION-008. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
avrabe
added a commit
that referenced
this pull request
Apr 27, 2026
…ommit 6/8) (#173) * chore(release): bump to v0.7.1 + add CHANGELOG Promotes the v0.7.x line to a tagged release. Headlines: - Track A v0.7.0 (IRQ-aware hierarchical RTA + Lean theorems) - Track A v0.7.1 (PIP/PCP blocking) - Track B v0.7.x foundation (variant contract spec + spar-variants consumer crate) - v0.7.x verification infrastructure: Lean + Bazel + proptest CI gates (#135), Kani harnesses (#136), cargo-fuzz (#138), criterion benchmarks (#137) Track D Phase 1 (TSN/WCTT) and Track E commits 1-4 are also on main at the time of this tag and ship in the resulting binaries; they will be advertised as v0.8.0 features when Track E is fully closed. Cargo.toml workspace version + vscode-spar/package.json bumped to 0.7.1. CHANGELOG.md created (Keep a Changelog format). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(moves): rivet variant integration in verify/enumerate (Track E commit 6/8) Wires spar-variants (Track B v0.7.x consumer crate, #162) into spar moves verify and spar moves enumerate. Both commands now accept --variant NAME (implicit; shells out to rivet) and --variant-context PATH (explicit; reads the JSON blob directly per the v1 contract). Variant filter is applied before overlay validation: items not in the selected variant are dropped from the analysis surface, matching the contract's intersection semantics. Output includes variant + feature model hash for audit trail. New requirement: REQ-MIGRATION-008. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
avrabe
added a commit
that referenced
this pull request
Apr 27, 2026
… 7/8) Adds docs/cli/moves.md — comprehensive user-facing documentation for `spar moves verify` and `spar moves enumerate`, covering flags, exit codes, JSON/text output schemas, candidate-set derivation, multi-objective ranking, rivet-variant integration, and a worked example. Updates COMPLIANCE.md: - Header date + version line (v0.7.1 released / v0.8.0 in progress). - Renames "In progress / v0.7.0" -> "v0.7.1 (released 2026-04-27)". - Promotes Track B from "foundation only" to including spar-variants consumer crate (#162). - New "v0.8.0 (in progress on main)" section with Track D Phase 1 (6/6) + Track E (7/8 with this commit) + Track F. - New "v0.9.0 horizon" listing Track E commit 8 (MCP), spar-insight, Track D Phase 2 conditional on demand. Track E commit 7 of 8. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Speculative consumer side for the rivet ↔ spar variant binding contract v1
(docs/contracts/rivet-spar-variant-v1.md, proposed in #144).
Rivet's emitter is in flight; this crate is ready for it.
spar-variants(sibling ofspar-network) — depends only onspar-hir-defandserde/serde_json.VariantContext::from_jsonparses the v1 blob and strictly rejects anyrivet_spar_context_version != "1"(v2 readers refused per contract §"Compatibility and versioning").Bindingcovers both file-scoped (artifact) and symbol-scoped (symbol) entries viaserde(untagged).HasBindingIdentitytrait — minimal identity adapter HIR items will implement.keep_in_variant(item, context)applies the contract's intersection semantics: an item is kept iff every matching binding has itsrequiressatisfied; items with no matching binding are kept unconditionally as variant-independent infrastructure.Out of scope for this commit (deferred to Track B commit 2 alongside CLI wiring):
--variant/--variant-contextflags onspar-cli.impl HasBindingIdentityforspar-hir-deftypes — tests use a localStubItem.The symbol-binding matcher uses textual prefix-matching (
<symbol>followed by.,::, or end-of-string) which covers nested-in-body items per contract §"Symbol granularity"; aTODO(track-b-commit-2+)flags the inheritance corner-case that needs HIR-level "contains" plumbing rather than string-shape.Artifacts
REQ-VARIANT-001("Consume rivet's variant context blob (v1) and filter HIR").TEST-VARIANTS-CONSUMERlinked toREQ-VARIANT-001.Test plan
cargo build -p spar-variantscleancargo test -p spar-variants— 17 tests pass (10 spec'd + 7 incidental coverage)cargo build --workspacecleancargo test --workspace— all greencargo clippy --workspace --all-targets -- -D warningscleancargo fmt --all -- --checkcleanrivet validatePASS (91 advisory warnings, all pre-existing)Contract-spec ambiguities encountered
None blocking. One soft point worth flagging for the v1 finalization pass:
./, fold\→/. No..resolution, no case-folding, no canonicalization against the filesystem. That's almost certainly the right v1 behaviour (project-relative paths, no I/O on the consumer side) but the spec could be tighter. Not blocking commit 1 — happy to firm up once the emitter is exercising real fixtures.🤖 Generated with Claude Code