Skip to content

test(e2e): PROD-COVERAGE done-bar guard — every prod-feasible flow live-tested or exempt - #187

Merged
mastermanas805 merged 2 commits into
mainfrom
test/prod-coverage-donebar-guard
Jun 5, 2026
Merged

test(e2e): PROD-COVERAGE done-bar guard — every prod-feasible flow live-tested or exempt#187
mastermanas805 merged 2 commits into
mainfrom
test/prod-coverage-donebar-guard

Conversation

@mastermanas805

Copy link
Copy Markdown
Member

What

The final piece of "every user control/flow covered by a live PROD integration test": a static, network-free drift guard that reds CI whenever a prod-feasible flow is added without either a live-prod spec or a justified exemption.

How

  • e2e/prod-coverage-manifest.ts — in-repo mirror of docs/sessions/2026-06-04/PROD-COVERAGE-MATRIX.md. The canonical inventory: 88 live route-legs (each must have a spec) + 33 exempt legs (each with a non-empty reason mirroring the matrix — Brevo-gated email delivery, Razorpay charge, real-GitHub-OAuth, full-Kaniko-build-deferred, team-tier-gated, OPTIONS/CORS, static content, operator/admin routes, live-DNS custom domains, destructive team purge). Self-contained so the guard reads no cross-repo file at test time.
  • e2e/prod-coverage-donebar.test.ts — a vitest .test.ts (runs in npm run gate, no network, no E2E_* secrets). Registry-iterating (CLAUDE.md rule 18):
    • (a) every live flow appears in ≥1 spec's exported covered set,
    • (b) every exempt flow has a non-empty reason,
    • (c) no flow untagged / duplicated,
    • plus reverse-drift: no spec-covered route escapes the inventory.
    • Failure messages name the offending flow + the fix ("add a live-* spec covering X, or tag X exempt-with-reason").
  • e2e/live-*.coverage.ts — each live spec's covered-route manifest extracted into a playwright-free sibling the spec re-exports (coveredRoutes) and the guard imports. This keeps the guard from pulling the @playwright/test runtime into vitest (task option 3). No spec test logic changed — only the manifest moved to a sibling + re-export.
  • vite.config.ts — include e2e/**/*.test.ts (vitest-only guards), still exclude e2e/*.spec.ts (playwright runtime).

Verification

  • npx vitest run e2e/prod-coverage-donebar.test.ts5 passed (coverage complete, all exemptions justified).
  • Negative test confirmed: injecting an uncovered live flow reds the guard with an actionable message; green again after revert (guard is honest, not papered over).
  • npm run gate green: tsc --noEmit + vite build + 81 test files / 1120 passed.
  • New files 100% line-covered (lcov LF==LH) — satisfies the patch-coverage gate.
  • No genuinely-uncovered flow surfaced — the Batch A/B/C waves closed the LIVE-PROD-TODO set; the guard now ratchets it shut.

🤖 Generated with Claude Code

… flow is live-tested or exempt

Final piece of "every user control/flow covered by a live PROD integration
test". A network-free vitest guard that reds CI whenever a prod-feasible flow
is added without either a live-prod spec or a justified exemption.

- e2e/prod-coverage-manifest.ts: in-repo mirror of the PROD-COVERAGE-MATRIX —
  88 `live` route-legs + ~33 `exempt` legs (each with a reason mirroring the
  matrix: Brevo-gated email, Razorpay charge, real-GitHub-OAuth,
  full-Kaniko-build-deferred, team-tier-gated, OPTIONS/CORS, static content,
  operator/admin, live-DNS domains, destructive team purge).
- e2e/prod-coverage-donebar.test.ts: registry-iterating guard (rule 18) —
  (a) every `live` flow is covered by >=1 live-*.spec, (b) every `exempt` flow
  has a non-empty reason, (c) no flow untagged/duplicated, plus reverse-drift
  (no spec-covered route escapes the inventory). Failure messages name the
  offending flow and the fix.
- e2e/live-*.coverage.ts: each live spec's covered-route manifest extracted to a
  playwright-free sibling the spec re-exports and the guard imports — so the
  guard never pulls the @playwright/test runtime into vitest.
- vite.config.ts: include e2e/**/*.test.ts (vitest-only guards), still exclude
  e2e/*.spec.ts (playwright runtime).

Guard PASSES locally (current coverage complete, all exemptions justified);
npm run gate green; new files 100% covered.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mastermanas805
mastermanas805 enabled auto-merge (squash) June 5, 2026 09:12
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

size-limit report 📦

Path Size
dist/assets/index-902QtfQT.js 161.98 KB (0%)
dist/assets/index-BsJUZYRr.css 6.13 KB (0%)

…t guard

The default Playwright config's implicit testMatch also globs *.test.ts, so it
tried to run e2e/prod-coverage-donebar.test.ts (a vitest-only guard) under the
Playwright runtime and crashed (`Cannot read properties of undefined (reading
'config')` — vitest describe/it under Playwright). Pin testMatch to *.spec.ts;
the live/auth-contract/auth-roundtrip configs already use explicit per-spec
testMatch and are unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mastermanas805
mastermanas805 merged commit 4cf37ca into main Jun 5, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant