The unit-test and integration-test workflows currently gate on overall project coverage via cargo llvm-cov --fail-under-lines. This works but leaves two gaps:
- Integration workflow needs a path-exclusion regex to scope its threshold (excluding
models/, core/, utils/ etc., which the unit gate already covers). Unit workflow doesn't need this — Cargo features can scope what's compiled — but integration tests must compile everything, so a regex is the only in-tree option.
- No patch/diff coverage gate. Today a PR can add new code with low coverage as long as overall % stays above the threshold. A higher bar on new/modified lines specifically is required.
Codecov solves both in one setup:
- Per-flag thresholds (unit, integration) replace the integration regex — each workflow uploads lcov.info with a flag, Codecov segregates server-side.
- Built-in patch threshold enforces "new lines must be ≥ X% covered" without affecting legacy code.
- Inline PR comments showing per-file diff coverage.
The unit-test and integration-test workflows currently gate on overall project coverage via
cargo llvm-cov --fail-under-lines. This works but leaves two gaps:models/,core/,utils/etc., which the unit gate already covers). Unit workflow doesn't need this — Cargo features can scope what's compiled — but integration tests must compile everything, so a regex is the only in-tree option.Codecovsolves both in one setup: