Skip to content

Commit 5943a0a

Browse files
docs: update coverage objectives and architecture in PLANS.md
1 parent aefc698 commit 5943a0a

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

PLANS.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,26 @@
22

33
## Objective
44

5-
Raise Codecov-reported overall coverage (README badge metric) from ~80% to >=95% while preserving correctness and keeping CI green.
5+
Raise Codecov-reported merged coverage (unit + Playwright E2E LCOV, uploaded via CI to Codecov) to >=90% for both lines AND branches. CI gate (`scripts/check-coverage-threshold.mjs`) enforces both thresholds on `coverage/lcov-merged.info`.
66

7-
## Baseline Snapshot (Codecov-relevant, merged web coverage)
7+
## Coverage Architecture
88

9-
Collection command: `PLAYWRIGHT_PORT=4273 npm run test:coverage:all`
9+
- **Unit LCOV** (`coverage/lcov.info`): generated by `npm run test:coverage` (Vitest v8). Covers 81 source files. Uploaded as CI artifact to `web-coverage-merge` job.
10+
- **E2E LCOV** (`coverage/e2e/lcov.info`): generated by `npx nyc report` from `.nyc_output/` JSON collected during Playwright runs (Istanbul instrumentation). Covers 259 source files (all of `src/**`).
11+
- **Merged LCOV** (`coverage/lcov-merged.info`): produced by `npx lcov-result-merger` combining both LCOVs. Uploaded to Codecov. CI checks BOTH line AND branch >= 90%.
1012

11-
- Unit LCOV (`coverage/lcov.info`):
12-
- Line: 94.35% (5580/5914)
13-
- Branch: 90.16% (2153/2388)
14-
- Playwright E2E LCOV (`coverage/e2e/lcov.info`):
15-
- Line: 71.98% (11235/15609)
16-
- Branch: 57.74% (5037/8724)
17-
- Merged LCOV uploaded to Codecov (`coverage/lcov-merged.info`):
18-
- Line: 80.81% (14767/18274)
19-
- Branch: 64.87% (7195/11091)
13+
## Baseline Snapshot (March 2026 — current branch)
14+
15+
- Unit LCOV (`coverage/lcov.info`, 81 files):
16+
- Line: 94.51% | Branch: 90.30%
17+
- E2E LCOV (from `.nyc_output/`, 259 files):
18+
- Line: 72.00% (11238/15609) | Branch: 57.81% (5043/8724)
19+
- **Merged LCOV** (263 files, what CI enforces and Codecov reports):
20+
- **Line: 81.11%** (14864/18326) | **Branch: 64.95%** (7247/11158)
21+
22+
**Gap to close to reach >=90%**:
23+
- Lines: need 1629 more covered (14864 → 16493)
24+
- Branches: need 2795 more covered (7247 → 10042) — the harder constraint
2025

2126
## Coverage Propagation Model (what affects README/Codecov)
2227

@@ -39,7 +44,7 @@ Collection command: `PLAYWRIGHT_PORT=4273 npm run test:coverage:all`
3944

4045
## Lowest-Coverage Files (ranked)
4146

42-
1. `src/lib/diagnostics/networkSnapshot.ts` — 5.71% / 0.00%
47+
1. `src/lib/diagnostics/networkSnapshot.ts`92.85% / 100.00% (Previously 5.71% / 0.00%)
4348
2. `src/pages/home/components/MachineControls.tsx` — 14.29% / 84.62%
4449
3. `src/lib/config/settingsTransfer.ts` — 14.67% / 0.00%
4550
4. `src/lib/diagnostics/webServerLogs.ts` — 17.65% / 6.25%

0 commit comments

Comments
 (0)