Skip to content

feat(trace): rivet trace-results — forward req→test-result trace (REQ-238 pt1, #547)#645

Merged
avrabe merged 1 commit into
mainfrom
feat/req-238-result-trace
Jul 1, 2026
Merged

feat(trace): rivet trace-results — forward req→test-result trace (REQ-238 pt1, #547)#645
avrabe merged 1 commit into
mainfrom
feat/req-238-result-trace

Conversation

@avrabe

@avrabe avrabe commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

What

First slice of #547 ("graphical way to trace req → test results"). Tracing currently runs test→artifact; this adds the reverse — from a requirement, the tests/results that cover it — as a mechanism + CLI surface. The graphical dashboard view is the follow-up slice (that's the part that needs the Playwright E2E gate).

This slice (fully verifiable locally)

  • rivet-core result_trace: BFS over backlinks from a requirement (multi-hop through the ASPICE V), each reached artifact annotated with its latest test-result status + a roll-up verdict (passing / failing / no-evidence). Pure, 4 unit tests.
  • rivet trace-results <id>: text tree or JSON — the JSON is exactly what the dashboard view will consume. Exits non-zero on a failing covering test (gate-usable). Uses the previously-dead ProjectContext::load_full (loads results).
Test-result trace for REQ-1: ✓ passing
  TEST-1 --verifies--> REQ-1   [pass]

Scope note

REQ-238 stays implemented (not verified) and #547 stays open: the requirement is the graphical view, which this foundation enables but does not render yet. That slice needs the dashboard/serve work + Playwright.

Verification

result_trace 4 + cli_commands 152 green; clippy --all-targets clean. No dashboard code → no Playwright needed for this slice.

🤖 Generated with Claude Code

…REQ-238 pt1, #547)

Tracing currently runs test -> artifact (the authored `verifies` direction); a
user needed the reverse — from a requirement, see the tests/results that cover
it. This adds the mechanism + a CLI surface; the graphical dashboard view is
the follow-up slice.

rivet-core `result_trace`: BFS over backlinks from a requirement (multi-hop
through the ASPICE V), annotating each reached artifact with its latest
test-result status, plus a roll-up verdict (passing / failing / no-evidence).
Pure + unit-tested (multi-hop chain, failing verdict, no-evidence, depth cap).

`rivet trace-results <id>`: text tree or JSON (the JSON is exactly what the
dashboard graphical view will consume). Exits non-zero when a covering test
recorded a FAILING result, so it is usable as a per-requirement gate. Wired
through the previously-unused `ProjectContext::load_full` (loads the result
store).

REQ-238 stays `implemented` (not verified): the requirement is the *graphical*
trace view, which this foundation enables but does not yet render. Confirmed
end-to-end: REQ-1 <- verifies TEST-1 reports passing/exit-0, flips to
failing/exit-1 when the result flips.

Implements: REQ-238
Refs: FEAT-001
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@avrabe avrabe merged commit aa7aeb5 into main Jul 1, 2026
23 checks passed
@avrabe avrabe deleted the feat/req-238-result-trace branch July 1, 2026 08:05
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

📐 Rivet artifact delta

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

Graph

graph LR
  REQ_238["REQ-238"]:::modified
  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
Modified
ID Changes
REQ-238

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

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ 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: 6bd945d Previous: 57eefd5 Ratio
link_graph_build/10000 37365045 ns/iter (± 4643188) 27279600 ns/iter (± 1422247) 1.37

This comment was automatically generated by workflow using github-action-benchmark.

@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.36709% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
rivet-core/src/result_trace.rs 99.36% 1 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