feat(coverage): rivet coverage --matrix — V&V matrix from repo-status artifacts#243
Open
feat(coverage): rivet coverage --matrix — V&V matrix from repo-status artifacts#243
Conversation
… artifacts Adds the V&V coverage matrix view to `rivet coverage`: reads `repo-status` artifacts (schema `vv-coverage` from PR #232) and renders a per-repo × per-technique matrix in text, json, markdown, or html. Sub-issue 2 of #188. Sub-issue 1 (the schema) shipped in #232; the cross-repo aggregator (sub-issue 3) is still out of scope here per the prior triage decomposition because the agent's GitHub access is restricted to `pulseengine/rivet` only. ## Surface - New flag `--matrix` on the existing `Coverage` subcommand. Mutually exclusive with `--tests` at the clap layer. - `--format` accepts `text` (default), `json`, `markdown`, `html` when `--matrix` is set; the original `text|json` contract for non-matrix coverage is preserved. ## Cell semantics | State | Glyph | JSON | Meaning | |----------|-------|-------------|----------------------------------------| | absent | · | "absent" | Technique not in `techniques-applied`. | | applied | ○ | "applied" | Applied but not gated in CI. | | gated | ● | "gated" | In `techniques-gated-in-ci`. | Columns are the sorted union of `techniques-applied` ∪ `techniques-gated-in-ci` across all rows, so the matrix only shows techniques at least one repo cares about. ## Output - text: fixed-width table with the legend on top. - markdown: pipe table; pastes verbatim into a PR body or wiki. - html: `<section><table>` fragment with `cell-{absent,applied,gated}` classes for downstream styling, with `&` and friends escaped. - json: structured `{command: "coverage-matrix", columns, repos[]}` envelope. Each repo carries its raw lists plus a precomputed `cells[]` so consumers don't have to recompute set membership. ## Verification - 7 new integration tests in `rivet-cli/tests/cli_commands.rs`: markdown / html / json / text-default rendering, invalid-format diagnostic, `--matrix` × `--tests` clap conflict, empty-project graceful render across all four formats. - `cargo test -p rivet-cli` — full suite green (432 tests). - `cargo test -p rivet-core --lib` — 896 pass. - `cargo clippy -p rivet-cli --all-targets -- -D warnings` — clean. - `cargo fmt --all -- --check` — clean. - `rivet validate` diagnostics unchanged from origin/main (pre-existing 6 errors in the spar-external fixture, untouched here). ## Docs - New `coverage-matrix` topic in `rivet docs` documenting the surface, cell semantics, authoring `repo-status`, and the four output formats. - New `schema/vv-coverage` topic exposing the schema YAML directly. Refs: #188 Refs: #184 Implements: REQ-007 Co-authored-by: Claude <noreply@anthropic.com>
7 tasks
📐 Rivet artifact deltaNo artifact changes in this PR. Code-only changes (renderer, CLI wiring, tests) don't touch the artifact graph. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 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.
Sub-issue 2 of #188 — the consumer surface for the
repo-statusschema that landed via #232. Readsrepo-statusartifacts from the local project and renders a per-repo × per-technique V&V coverage matrix in text, json, markdown, or html.The cross-repo aggregator (sub-issue 3 of the prior triage decomposition) is still out of scope here because this triage agent's GitHub access is restricted to
pulseengine/rivetonly.Acceptance — sub-issue 2 of #188
Per the triage comment on #188 (2026-04-26):
Mapped to bullets:
rivet coverage --matrixflag accepted. New--matrixflag on the existingCoverageclap variant; mutually exclusive with--tests.coverage_matrix_markdown.<section><table>fragment withcell-{absent,applied,gated}classes;&/</>escaped. Test:coverage_matrix_html.{command: "coverage-matrix", columns, repos[]}with per-cell{technique, status}records. Test:coverage_matrix_json.rivet.yaml. Readsrepo-statusartifacts viaProjectContext::load; cross-repo aggregation deferred to sub-issue 3.rivet-cli/tests/cli_commands.rscovering markdown / html / json / text-default rendering, invalid-format diagnostic,--matrix×--testsclap conflict, and empty-project graceful render across all four formats.coverage_matrix_invalid_format_fails(lists the four valid options) andcoverage_matrix_conflicts_with_tests_flag(clap-level mutual exclusion).Cell semantics
·"absent"techniques-applied.○"applied"●"gated"techniques-gated-in-ci.Columns are the sorted union of
techniques-applied∪techniques-gated-in-ciacross all rows, so the matrix only shows techniques at least one repo cares about.Docs
coverage-matrixtopic inrivet docsdocumenting the surface, cell semantics, authoringrepo-status, and the four output formats.schema/vv-coveragetopic exposing the schema YAML.Test plan
cargo test -p rivet-cli— full suite greencargo test -p rivet-core --lib— 896 passcargo clippy -p rivet-cli --all-targets -- -D warnings— cleancargo fmt --all -- --check— cleanrivet validatediagnostics unchanged fromorigin/main(the 6 pre-existing errors are in thespar-externalcross-repo fixture, untouched by this PR)rivet coverage --matrix --format markdownagainst a tmpdir with threerepo-statusartifacts produces the expected tableCloses part of #188. Does not close the issue — sub-issues 3 (cross-repo aggregator), 4 (publishing pipeline), and 5 (per-standard mapping) remain.
Refs: #188
Refs: #184
🤖 Generated with Claude Code — issue-triage agent run 2026-04-29.
Generated by Claude Code