Status: Accepted (2026-11-28). Implements the PLAN follow-up “gates must not pass on skipped tests”.
DB-backed tests skip when Postgres doesn’t answer within 2 s, which is right for a laptop without Docker. Under load-test pressure, though, 21 API tests skipped instead of running, and a gate still passed. During wave 3 a realtime crash at startup also showed up only as a skipped pipeline test. A gate (CI, P3) must fail in both cases.
databaseUnavailable() from @linorahq/server-common/testing once at module level (already true for api, docworker, realtime, mcp and server-common).LINORA_REQUIRE_DB=1 (or true), that helper retries the connection 3 times (5 s each, with a short pause) and then throws. The whole test file fails with “LINORA_REQUIRE_DB=1: Postgres not reachable …”, and nothing is skipped. Without the flag, behaviour is unchanged (one 2 s attempt, then a skip reason).strictSkip(t, why) covers environment skips that are not the database (a child tier failed to start): a skip normally, a failure in strict mode. apps/api and apps/docworker use it. Realtime and MCP tests should switch to it as well (their owners).LINORA_REQUIRE_DB=1 (O1 wires CI). Gates are never run during a load test.packages/server-common/test/testing.test.ts runs a real nested test file against a dead port. It skips without the flag and fails with it.