Skip to content

fix(validate): coverage diagnostics name the link + satisfier types (REQ-147, #350)#394

Merged
avrabe merged 1 commit into
mainfrom
fix/coverage-diagnostic-guidance
Jun 2, 2026
Merged

fix(validate): coverage diagnostics name the link + satisfier types (REQ-147, #350)#394
avrabe merged 1 commit into
mainfrom
fix/coverage-diagnostic-guidance

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Jun 2, 2026

Addresses #350 (the actionable, schema-agnostic half).

Problem

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 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)

  1. The required-backlink coverage diagnostic now names the incoming link type + allowed source types inline:

    Every SW requirement should be verified … — needs an incoming verifies link from one of [sw-verification, unit-verification, sw-integration-verification]

  2. 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.

Verification

  • New aspice repro: a sw-req with no verification backlink now shows the link + types inline; the gaps summary prints the --explain pointer; --explain gives the per-rule breakdown.
  • All 74 validate::tests pass; clippy --all-targets + fmt clean; rivet validate + rivet docs check PASS.

Triage of #350's other points

  • Suggestion 2 (allow direct test→sw-req, or a scaffold-verification command) is ASPICE/schema intent — maintainer call.
  • Suggestion 4 (crate: undeclared-field noise) is already mitigated by rivet validate --min-severity warning (REQ-137) + schema extends.
  • Filed REQ-148 (draft): a generic coverage-rule-consistency meta-check — the aspice swe1-has-verification rule advertises from-types (unit-verification, sw-integration-verification) that no link rule permits to verifiessw-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

…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>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

📐 Rivet artifact delta

Change Count
Added 2
Removed 0
Modified 0
Downstream impacted (depth ≤ 5) 0

Graph

graph 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
Loading
Added
  • REQ-147
  • REQ-148

📎 Full HTML dashboard attached as workflow artifact rivet-delta-pr-394download from the workflow run.

Posted by rivet-delta workflow. The graph shows only changed artifacts; open the HTML dashboard (above) for full context.

@avrabe avrabe merged commit b097e49 into main Jun 2, 2026
19 of 38 checks passed
@avrabe avrabe deleted the fix/coverage-diagnostic-guidance branch June 2, 2026 10:39
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
rivet-core/src/validate.rs 75.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant