test(e2e): PROD-COVERAGE done-bar guard — every prod-feasible flow live-tested or exempt - #187
Merged
Merged
Conversation
… 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
enabled auto-merge (squash)
June 5, 2026 09:12
size-limit report 📦
|
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 ofdocs/sessions/2026-06-04/PROD-COVERAGE-MATRIX.md. The canonical inventory: 88liveroute-legs (each must have a spec) + 33exemptlegs (each with a non-emptyreasonmirroring 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 innpm run gate, no network, noE2E_*secrets). Registry-iterating (CLAUDE.md rule 18):liveflow appears in ≥1 spec's exported covered set,exemptflow has a non-empty 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/testruntime into vitest (task option 3). No spec test logic changed — only the manifest moved to a sibling + re-export.vite.config.ts— includee2e/**/*.test.ts(vitest-only guards), still excludee2e/*.spec.ts(playwright runtime).Verification
npx vitest run e2e/prod-coverage-donebar.test.ts→ 5 passed (coverage complete, all exemptions justified).liveflow reds the guard with an actionable message; green again after revert (guard is honest, not papered over).npm run gategreen:tsc --noEmit+vite build+ 81 test files / 1120 passed.🤖 Generated with Claude Code