Correct the coverage gates the guide advertises

The documented gates had drifted well below the real ones: the backend gate
reads 80 in the workflow, not 50, and the frontend thresholds are 96 lines
and statements, 91 functions, 92 branches, not the 80/85 pair recorded here.
Anyone trusting the old numbers would think they had headroom that CI does
not grant. The frontend type-check command is also named correctly now, since
invoking tsc through npx picks up a newer compiler and fails spuriously.
This commit is contained in:
2026-09-17 19:24:11 +02:00
parent c368042c7e
commit b5321c5e8e
+5 -5
View File
@@ -125,19 +125,19 @@ uv run ruff format --check . # format check
uv run pytest # tests with coverage (config in pyproject.toml)
```
CI gate: `--cov-fail-under=50` today (current total ~52%), climbing toward **90** as tests land. Don't lower it — only raise when coverage grows.
CI gate: `--cov-fail-under=80` today (current total ~84%), climbing toward **90** as tests land. Don't lower it — only raise when coverage grows.
**Frontend** (from `frontend/`):
```bash
npx tsc --noEmit # type check
npm run typecheck # type check (never npx tsc: it resolves a newer TS and emits a bogus TS5101)
npm run lint # ESLint, zero warnings
npm run coverage # Vitest with coverage
```
CI gates (measured baseline after `src/pages/**` inclusion):
- lines: **80%** | functions: **85%** | branches: **85%** | statements: **80%**
- These act as a regression ratchet, not a target. Current state (82.36% lines, 88.5% functions) shows pages are now visible and poorly covered (Auth, Tips, DevFetch at 0%); the intent is to raise thresholds over time, not to churn tests today.
- lines: 96 | functions: 91 | branches: 92 | statements: 96
- These act as a regression ratchet, not a target. Current coverage (97.26% lines/statements, 93.05% functions, 93.51% branches) exceeds thresholds; gates must never be lowered to pass.
### WHO RUNS THE VERIFICATION COMMANDS (cost rule)
@@ -156,7 +156,7 @@ needed is reading pass/fail and the failure output. Paying a large model to sit
than burning a large model on them.
This applies to the full-suite verification runs: `uv run pytest`, `uv run ruff check .`,
`uv run ruff format --check .`, `npx tsc --noEmit`, `npm run lint`, `npm run coverage`,
`uv run ruff format --check .`, `npm run typecheck`, `npm run lint`, `npm run coverage`,
`npx vitest run`, and `uv run alembic upgrade head`.
It does **not** apply to quick diagnostics while you are mid-task — reading a single file, a