fix(validate): coverage diagnostics name the link + satisfier types (REQ-147, #350)#394
Merged
Merged
Conversation
…REQ-147, #350) Marking a sw-req `implemented` then running `rivet validate` produced coverage diagnostics that said WHAT was missing but not HOW to satisfy it; the reporter reverse-engineered the required shape from an unrelated link-target rejection ("a whole detour"). Two schema-agnostic guidance improvements (no rule semantics changed): - The `required-backlink` coverage diagnostic now appends the incoming link type and allowed source types, e.g. "… — needs an incoming `verifies` link from one of [sw-verification, unit-verification, sw-integration-verification]". - The `Lifecycle coverage gaps` summary now points at `rivet validate --explain <ID>`, which lists each rule's satisfied/MISSING state with the exact incoming link + source types (and alternates) — verified the pointer resolves to that breakdown. Also files REQ-148 (draft): a generic `coverage-rule-consistency` meta-check to flag a `required-backlink` rule whose `from-types` include types no link rule permits to form the backlink (the aspice `swe1-has-verification` lists unit/integration-verification as sw-req satisfiers, but only sw-verification can `verifies`→sw-req). Deferred — needs conservative implementation to avoid false positives; the aspice from-types intent itself is a maintainer/compliance call (#350/#355). All 74 validate tests pass; clippy --all-targets + fmt clean; rivet validate + docs check PASS. Implements: REQ-147 Refs: REQ-125, REQ-148 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
📐 Rivet artifact delta
Graphgraph LR
REQ_147["REQ-147"]:::added
REQ_148["REQ-148"]:::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! |
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.
Addresses #350 (the actionable, schema-agnostic half).
Problem
Marking a
sw-reqimplementedthen runningrivet validateproduced coverage diagnostics that said what was missing but not how to satisfy it. The reporter authored a verification linking directly to the sw-req, got a link-target rejection, and only then reverse-engineered the required shape — "a whole detour."Fix (no rule semantics changed)
required-backlinkcoverage diagnostic now names the incoming link type + allowed source types inline:Lifecycle coverage gapssummary now points atrivet validate --explain <ID>, which lists each rule's satisfied/MISSING state with the exact incoming link + source types (and alternates). Verified the pointer resolves to that breakdown.Verification
sw-reqwith no verification backlink now shows the link + types inline; the gaps summary prints the--explainpointer;--explaingives the per-rule breakdown.validate::testspass; clippy--all-targets+ fmt clean;rivet validate+rivet docs checkPASS.Triage of #350's other points
scaffold-verificationcommand) is ASPICE/schema intent — maintainer call.crate:undeclared-field noise) is already mitigated byrivet validate --min-severity warning(REQ-137) + schemaextends.coverage-rule-consistencymeta-check — the aspiceswe1-has-verificationrule advertisesfrom-types(unit-verification,sw-integration-verification) that no link rule permits toverifies→sw-req, which is why the reporter's direct link was rejected. Deferred: needs conservative implementation (target constraints live in both link-types and per-type link-fields) to avoid false positives, and whether the aspice from-types is itself wrong is a compliance-semantics call.Implements: REQ-147
🤖 Generated with Claude Code