feat(supplier): cross-org boundary MVP — external-anchor + 3-state coverage (#253)#286
Merged
Conversation
…verage (#253) MVP for the cross-organizational / supplier-management traceability track (docs/design/cross-org-supplier-traceability.md §6). - **`external-anchor` artifact type** in `schemas/common.yaml`: a typed leaf marking the point at which the in-house chain hands off to a supplier. Fields: `source-of-truth` (mapping), `expected-derived-types` (list of artifact types the supplier is contracted to produce), `received-status` (enum: not-received / received-as-reqif|pdf|oslc| polarion-export|arxml|other), `contract-reference` (optional, points at the DIA / PO). - **3-state coverage** in `rivet-core/src/coverage.rs`: `CoverageEntry` gains `external_boundary: usize` + `external_boundary_ids: Vec<String>`. Sum invariant: `covered + external_boundary + uncovered_ids.len() == total`. Classification rule: when an unsatisfied source artifact has a forward link to an `external-anchor` whose `expected-derived-types` overlaps the rule's target types (or the rule is unrestricted), it counts as `external_boundary` instead of `uncovered`. Off-contract anchors do NOT silently absorb gaps. - **`rivet supplier list`** + **`rivet supplier check`** CLI commands — read-only surface for the auditor. `list` enumerates declared anchors with their received-status and expected derivatives; `check` prints the 3-state breakdown filtered to rules with boundary or uncovered findings. - **`rivet coverage`** text and JSON output extended with the new fields. Text output adds a Boundary column and breakdown summary only when at least one boundary exists, keeping the common case uncluttered. JSON adds `external_boundary`, `external_boundary_ids`, `accounted_percentage` to each rule and an `external_boundary` total to the overall block (additive, no schema break). Tests: - Unit tests for the classification rule: boundary terminates chain, off-contract anchor still uncovered, 3-state sum invariant. - 3 integration tests: `supplier list` text output, `supplier list` JSON shape, `supplier check` classifies a delegated DD as external_boundary. Out of MVP scope (deferred to Phase 2 per the design doc): structured external link target, federation handshake / `rivet supplier pull`, field-mapping recipes, FederationProvenance. The MVP describes the boundary without federating across it — the audit-critical step. Implements: REQ-010, REQ-004, REQ-007 Refs: FEAT-001 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
📐 Rivet artifact deltaNo artifact changes in this PR. Code-only changes (renderer, CLI wiring, tests) don't touch the artifact graph. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This was referenced May 16, 2026
Open
avrabe
added a commit
that referenced
this pull request
May 16, 2026
…290) * release(v0.10.0): variant + supplier + AI session + TCL workstream A Workspace version bump 0.9.0 → 0.10.0. Theme: audit-grade story — three orthogonal features that together move rivet from "trace your project" to "describe the boundary and defend the tool's role across it." Highlights (full notes in CHANGELOG.md): - Variant-aware properties — per-variant field values (#285, #255). - Cross-org / supplier-boundary coverage MVP (#286, #253). - AI session provenance — schema half (#289, partially #127). - Tool-qualification workstream A — typed claim + dossier (#289). - rivet stats --qualification + --qualification-mode flag (#289). - TCL/TQL numbering convention fix in dogfood STPA (#289). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(release): docs-check violations on v0.10.0 release commit Two docs-check violations on PR #290: - VersionConsistency: vscode-rivet/package.json bumped 0.9.0 → 0.10.0 (it has its own version field, not workspace-inherited). - SubcommandReferences: CHANGELOG mentioned `rivet audit` which is a Phase 2 future subcommand. Rephrased to "audit-side enforcement subcommand" so the literal `rivet audit` no longer parses as a current-cli reference. Local `rivet docs check` now passes (54 files, 0 violations). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
5 tasks
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
MVP for the cross-organizational / supplier-management traceability track (
docs/design/cross-org-supplier-traceability.md§6). Smallest version that demonstrates the boundary-coverage semantic — stops conflating "we missed it" with "delegated to a supplier."What ships
external-anchorartifact type inschemas/common.yaml— a typed leaf marking the point where the in-house chain hands off to a supplier. Fields:source-of-truth,expected-derived-types(contract),received-status(lifecycle of the delivery),contract-reference.3-state coverage in
rivet-core/src/coverage.rs—CoverageEntrygainsexternal_boundary+external_boundary_ids(additive; existing JSON contract unchanged). Sum invariant:covered + external_boundary + uncovered_ids.len() == total. Classification rule: only counts as boundary when the anchor'sexpected-derived-typesactually covers the rule's target type — off-contract anchors do not silently absorb gaps.rivet supplier list+rivet supplier check— read-only auditor surface.listshows declared anchors;checkprints the 3-state breakdown filtered to rules with boundary or uncovered findings.rivet coverageoutput extended additively. Text adds a Boundary column + summary line only when ≥1 boundary exists. JSON addsexternal_boundary,external_boundary_ids,accounted_percentage.What is NOT in this PR
Deferred to Phase 2 per the design doc:
derives-from-externalwith mapping target).rivet supplier pullfor ReqIF / file).FederationProvenanceblock on imported artifacts.The MVP describes the boundary without federating across it. That's the audit-critical step; federation is the Phase 2 follow-up.
Test plan
cargo test -p rivet-core --lib coverage::— 8 pass (2 new boundary tests: chain-terminates-as-boundary; off-contract-anchor-still-uncovered).cargo test --workspace --lib— green (988 → 990 after the two new tests).cargo test -p rivet-cli --test cli_commands supplier— 3 pass (list text, list json, check classifies DD as boundary).cargo clippy --workspace --all-targets— clean.rivet supplier list+rivet supplier checkon a project with anexternal-anchor+ delegating DD produce the expected text + JSON output.🤖 Generated with Claude Code