Skip to content

Commit 85af7f2

Browse files
salman1993claude
andcommitted
docs(agents): audit uncovered code from line-level coverage
coverage-summary.json only has per-file totals, so it cannot locate newly uncovered code, and gains elsewhere in a file can offset losses. Emit the json reporter and compare statement and branch hit counts in coverage-final.json between merge base and head; keep json-summary for the aggregate budget. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Salman Mohammed <[email protected]>
1 parent 1e62c31 commit 85af7f2

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

‎.agents/skills/test-audit/CAMPAIGN.md‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ bin/pnpm exec vitest run --coverage.enabled --coverage.provider=v8 \
4848
--coverage.include='src/**' --coverage.include='browser-host/**' \
4949
--coverage.exclude='**/*testing.ts' --coverage.exclude='**/test-*.ts' \
5050
--coverage.exclude='**/*fixture*' --coverage.exclude='**/*.journey.mjs' \
51-
--coverage.reporter=json-summary --coverage.reporter=text-summary \
51+
--coverage.reporter=json --coverage.reporter=json-summary \
52+
--coverage.reporter=text-summary \
5253
--coverage.reportsDirectory=<scratch dir>
5354
```
5455

@@ -60,9 +61,13 @@ bin/pnpm exec vitest run --coverage.enabled --coverage.provider=v8 \
6061
- Measure each PR at its merge base and its head, and charge that delta
6162
against one budget for the whole goal. `main` moves between PRs, so a fixed
6263
baseline mixes in other changes.
63-
- Diff the per-file entries in `coverage-summary.json`. A newly uncovered line
64-
means no remaining Vitest test executes it. Each such line needs one of
65-
three explanations:
64+
- Use `coverage-summary.json` only for the aggregate budget; per-file totals
65+
hide losses that gains elsewhere in the same file offset. Find newly
66+
uncovered code in `coverage-final.json`: each statement and branch with a
67+
nonzero hit count at the merge base and zero at the head. Match locations
68+
directly in source files the PR leaves unchanged, and through the PR's diff
69+
in files it edits. Newly uncovered code means no remaining Vitest test
70+
executes it. Each such statement or branch needs one of three explanations:
6671
- it carries no contract;
6772
- it is dead code, deleted in the same PR;
6873
- a named browser or Rust test covers it.

0 commit comments

Comments
 (0)