Commit 41380d4
test(matrix): misc route coverage — incidents/confirm-deletion/usage-wall/webhook-inspector/experiments (exempt→mapped)
Closes the last real-flow wave of the route-coverage tail: the five "misc"
routes that lived in route_donebar_guard_test.go's routeCoverageExemptions
with a TODO pointer and no mapped test now move exempt→mapped, backed by a new
DB-backed handler-integration suite (misc_routes_block_integration_test.go,
TestMiscBlock_*) that drives each route through the SAME middleware chain
router.go wires against a real migrated Postgres:
- GET /api/v1/incidents → TestMiscBlock_Incidents_PublicFeed
public status-page feed contract ({ok,items,total,status_page}, no auth).
- GET /auth/email/confirm-deletion → TestMiscBlock_ConfirmDeletionRedirect_TokenBranches
tokenized email-link redirect (token IS the credential): present token →
302 to dashboard with token carried verbatim; missing/blank → canonical
400 missing_token envelope.
- GET /api/v1/usage/wall → TestMiscBlock_UsageWall_RealDBContract
RequireAuth chain + real Postgres: 401 unauth, near_wall=true + flattened
metadata + cache headers, team-tier short-circuit, team-scoped isolation.
- GET /api/v1/webhooks/:token/requests → TestMiscBlock_WebhookInspector_TokenScopedAndIsolated
receive→store→inspect round-trip: token-as-bearer reads only its own
captures (cross-token isolation), invalid→400, unknown→404, cross-team
session→403.
- POST /api/v1/experiments/converted → TestExperimentsConverted_WritesAuditRow
already DB-backed + production-router covered by experiments_test.go; the
row points there rather than duplicating the audit round-trip.
Helpers are prefixed misc* (no redefinition of miniRedis/doJSON/decodeBody/
requireTestDB). After the move, the remaining routeCoverageExemptions hold only
legitimately-exempt routes (OPTIONS/CORS preflight, app.All verb fan-out,
static content, GitHub-App OAuth/HMAC callbacks, internal/operator + admin-
console, SES/Brevo provider webhooks) plus the W3 billing/api-keys/audit + W4
stack-env real flows that carry their own matrix-wave TODO pointers.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 32ee67f commit 41380d4
2 files changed
Lines changed: 503 additions & 11 deletions
0 commit comments