1.4 KiB
1.4 KiB
ECP-0030: Workspace Coverage Reporting
Status: Draft
Problem
We want high-confidence changes across the entire codebase, not only the newest crates. Today, we have unit tests in a subset of crates and no standardized, reproducible, formal coverage artifact.
Decision
- Adopt workspace-level coverage as a first-class artifact using
cargo-llvm-cov. - Provide repeatable
justcommands that generate:- LCOV (
tmp/coverage/workspace.lcov) - HTML report (
tmp/coverage/workspace-html/index.html) - A short summary (
tmp/coverage/workspace.summary.txt)
- LCOV (
- Prefer running coverage via
nix developsoac-ffmpegbuilds consistently (FFmpeg headers/libs present).
Details
Commands:
just test-workspacejust cov-workspace/just cov-workspace-html(whencargo llvm-covis available, typically insidenix develop)just cov-workspace-nix/just cov-workspace-html-nix(self-contained, runs throughnix develop)cargo llvm-cov -p ec-core -p ec-crypto -p ec-hdhomerun -p ec-iroh -p ec-linux-iptv -p ec-moq -p ec-ts(unit-coverage subset that doesn't require FFmpeg headers)
Coverage excludes:
third_party/target/tmp/
Consequences
- Contributors can review regressions with an objective report, not only "tests passed".
- Running coverage outside Nix may not work on macOS/Linux unless FFmpeg dev headers are installed; the Nix path is the canonical one.