+| 059 | Revive the 128 permanently-skipped DB/handler tests | P1 | L | — | DONE — reviewer-approved after 1 revision round, **merged**. Main went **1006 → 1097 passing, skips 128 → 40**: **91 previously-dark tests now execute**, including the Connector auto-apply chain, verifier-gated confirm/forget, Cartographer dispatch, VIPS page loading and the counsellor brief. `pnpm check` 18 warnings, 0 failures. **Round 1 was rolled back**: its `dotenv/config` opened every Lane B gate on any machine with a `.env`, and on the operator's tree that meant tests connecting to a **live Neon database** as table owner (`23 failed / 1112 passed / 1 skipped`). The fix gates Lane B on a dedicated `TEST_DATABASE_URL`, and — the structural half — `test/setup.ts` now **deletes** an ambient `DATABASE_URL` when that opt-in is absent, so a test escaping its gate dies on "DATABASE_URL is not set" rather than silently reaching production. The executor proved the gate both **shuts** (simulated `.env`, census byte-identical) and **opens** (bogus `TEST_DATABASE_URL` on port 2 → every error `ECONNREFUSED 127.0.0.1:2`, so the opt-in wins over the ambient value), and added a canary asserting no ambient `DATABASE_URL` survives into the test process. **Reviewer re-verified on the operator's real tree with the real `.env`:** 1097/40/0, canary green, Lane B still skipped, and `pnpm test:db` now exits 1 rather than reporting a false-green all-skipped run. **Still deferred (no Postgres anywhere):** Step 2 and Step 7b — `test/db.test.ts` keeps `@ts-nocheck` and its 26 gated tests. **Plan 063's drizzle-orm gate therefore remains CLOSED.** Scope note: README gained a "Running the database-backed tests" subsection — outside the plan's literal file list, but the reviewer's revision brief asked for the variable to be documented and that is where the DB runbook lives. |
0 commit comments