-
fork: QE fail the run when the embedded Postgres probe fails
fork-tests / verify (pull_request) Skippedtrufflehog / scan (pull_request) Successful in 50sreleased this
2026-10-23 00:02:39 +00:00 | 3322 commits to local since this releasegetEmbeddedPostgresTestSupport()returnedsupported: falsewhen the
probe could not start a cluster, and every database-backed suite then did
describe.skip. The suite reported the file as skipped and the run ended
green. A run that never had a database is not a green run, and nothing in
the output said so.The probe failure is now loud. The support probe throws, so the file that
awaits it fails instead of skipping, and the message names the real
Postgres output that caused it.A host that genuinely cannot start an embedded Postgres cluster can still
skip the database-backed suites, by setting
PAPERCLIP_EMBEDDED_POSTGRES_UNSUPPORTED_OK=1. The opt-out is refused
whenCIis set: a CI run that skipped its database-backed suites would
report green without ever having had a database, which is the failure
mode this probe exists to prevent. The fork's own workflow pinsCI=true
on the suites step, so the property does not depend on a runner default.Two guards keep it that way.
packages/db/src/test-embedded-postgres.test.tsdrives the probe against
a cluster that can never start and asserts that it throws, that it names
the opt-out, that the opt-out works off CI, and that CI refuses it.server/src/__tests__/embedded-postgres-probe-failure.qe.test.tsproves
the property end to end. It runs a database-backed fixture against a host
whose embedded Postgres cannot start, in a nested vitest process, and
asserts that the nested run FAILS. Before this change the same run
reportedTest Files 1 skipped (1)and exited 0; it now reports
Test Files 1 failed (1)and exits 1.Test code and test support only, no production change.
Downloads