feat(trace): rivet trace-results — forward req→test-result trace (REQ-238 pt1, #547)#645
Merged
Conversation
…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>
📐 Rivet artifact delta
Graphgraph 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
Modified
Posted by |
There was a problem hiding this comment.
⚠️ 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 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.
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)
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-deadProjectContext::load_full(loads results).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-targetsclean. No dashboard code → no Playwright needed for this slice.🤖 Generated with Claude Code