From 32412fa88beb213f6a12760dfce04ada1701b9b8 Mon Sep 17 00:00:00 2001 From: Bas van Rossem Date: Wed, 22 Jul 2026 11:14:58 +0200 Subject: [PATCH] docs(spec): set near-100% per-domain coverage as the working target --- .../2026-07-22-per-domain-test-safety-net-design.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/superpowers/specs/2026-07-22-per-domain-test-safety-net-design.md b/docs/superpowers/specs/2026-07-22-per-domain-test-safety-net-design.md index a5ae78d..be46404 100644 --- a/docs/superpowers/specs/2026-07-22-per-domain-test-safety-net-design.md +++ b/docs/superpowers/specs/2026-07-22-per-domain-test-safety-net-design.md @@ -14,7 +14,10 @@ changes can't silently break existing behavior, and shake out latent bugs in the 3. **Bug handling = log in Plane + fix trivial inline.** Every finding becomes a Plane work item; small/safe fixes land inline in the same pass; risky / behavior-changing ones get their own ticket and are deferred (flagged as such). -4. **No hard coverage threshold gate** now — measure and report; revisit a CI gate later. +4. **Target near-100% coverage per domain** (the working bar). Every remaining uncovered + line is either tested or explicitly annotated as defensive/unreachable — no silent gaps. + A CI threshold *gate* (build fails under X%) is still deferred; the target is enforced by + review for now. ## Current baseline (2026-07-22) @@ -40,7 +43,10 @@ changes can't silently break existing behavior, and shake out latent bugs in the - Config per workspace: include `src/**`; exclude tests, config files, and generated / non-logic files (`src/db/schema.ts`, `*.d.ts`, `main.tsx`, `vite-env.d.ts`). - Record a **baseline coverage % per domain** so every gap filled is measured, not guessed. -- **No hard threshold gate** now (arbitrary + flaky). Measure, report, revisit later. +- **Working target: near-100% per domain.** Drive each domain's coverage up until the only + remainder is genuinely defensive / unreachable code, which is annotated (`/* c8 ignore */` + with a reason) rather than left as a silent gap. A CI *gate* is still deferred — enforce by + review for now. ### 2. Fix the API harness fragility (prerequisite for reliable domain isolation) @@ -115,7 +121,8 @@ slog. Bugs found during a domain's pass are reported structurally and triaged pe ## Out of scope -- A CI coverage-threshold gate (deferred; measure first). +- A CI coverage-threshold gate that fails the build (deferred; the near-100% target is + enforced by review for now, not by CI). - E2E browser automation (Playwright/Cypress) — the client integration tests stay at the Testing-Library level. - Load/performance testing.