Conversation
Introduces a `coverage_evidence` module mirroring the `results.rs` ResultStore pattern for branch / MC/DC / line coverage evidence emitted by external tools. The on-disk YAML schema is documented in upstream emitter pulseengine/witness's `docs/research/rivet-evidence-consumer.md` under `schema: https://pulseengine.eu/witness-rivet-evidence/v1`. This is a separate concept from the existing `coverage.rs` traceability- rule coverage. CoverageReport models the artifact graph; CoverageStore ingests test-run evidence for downstream rendering. Adds: - CoverageEvidence (per-artifact, per-run): artifact, coverage_type (branch | mcdc | line), total, covered, percentage, hits, uncovered branch ids - CoverageStore: insert, latest_for, history_for, summary; mirrors ResultStore semantics (newest-first ordering, summary from latest run) - load_evidence(file) and load_evidence_dir(dir): rejects unknown schema URLs, skips invalid files in dir-mode with a stderr warning - Error::CoverageEvidence variant for typed error propagation 9 unit tests cover: type display, completeness check, store ordering, latest_for / history_for, summary aggregation, YAML round-trip, unknown-schema rejection, mixed-dir filtering, nonexistent-dir handling. cargo test -p rivet-core --lib: 780 passed (including the 9 new). cargo clippy -p rivet-core -- -D warnings: clean. cargo deny check: pass. cargo fmt: clean. Implements: REQ-009 (rivet evidence consumption surface) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
📐 Rivet artifact deltaNo artifact changes in this PR. Code-only changes (renderer, CLI wiring, tests) don't touch the artifact graph. |
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: a8cad5c | Previous: c7d5664 | Ratio |
|---|---|---|---|
store_lookup/10000 |
471434 ns/iter (± 1467) |
378215 ns/iter (± 1969) |
1.25 |
traceability_matrix/1000 |
60828 ns/iter (± 179) |
43287 ns/iter (± 135) |
1.41 |
query/10000 |
116345 ns/iter (± 918) |
91697 ns/iter (± 323) |
1.27 |
This comment was automatically generated by workflow using github-action-benchmark.
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
Adds a
coverage_evidencemodule to rivet-core that consumes branch / MC/DC / line coverage evidence emitted by external tools (initially the upstream emitter at pulseengine/witness, schema URLhttps://pulseengine.eu/witness-rivet-evidence/v1).This is a separate concept from the existing
coverage.rstraceability-rule coverage:coverage.rs(existing) — models artifact-graph rule satisfactioncoverage_evidence.rs(new) — ingests external test-run evidence for downstream renderingThe on-disk YAML schema is documented in the upstream emitter at
pulseengine/witness/docs/research/rivet-evidence-consumer.md.What's added
CoverageEvidence(per-artifact, per-run): artifact, coverage_type (branch | mcdc | line), total, covered, percentage, hits, uncovered branch idsCoverageStore: insert, latest_for, history_for, summary; mirrorsResultStoresemantics (newest-first ordering, summary from latest run)load_evidence(file)andload_evidence_dir(dir): rejects unknown schema URLs, skips invalid files in dir-mode with a stderr warningError::CoverageEvidencevariant for typed error propagationEnd-to-end flow (post-merge + rivet release)
load_evidence_dir→ CoverageStorelatest_for/summaryTest plan
cargo test -p rivet-core --lib— 780 passed (9 new)cargo clippy -p rivet-core -- -D warnings— cleancargo deny check— passcargo fmt— cleanReviewer notes
load_evidence. Future versions will need a discriminator and explicit migration.load_evidence_diris intentionally permissive: invalid files emit a stderr warning and are skipped, so a directory mixing rivet evidence with other YAML doesn't fail the whole load. Strict mode would be a follow-up if needed.🤖 Generated with Claude Code