test: lock in the app readiness gate with static, deterministic and real-stack probes (E00-S03-T06)

This commit is contained in:
implementer
2026-08-30 01:56:22 +00:00
parent ebdee5daa5
commit c20110be15
4 changed files with 807 additions and 5 deletions
+9 -1
View File
@@ -111,15 +111,23 @@ function reservePort() {
/**
* Boots the committed server source on `port`. Returns `{ child, stderr }`;
* the child writes its stderr into the `stderr()` closure for diagnostics.
*
* The child boots WITHOUT `DATABASE_URL` (it is stripped from the inherited
* env): since E00-S03-T06 the health endpoint is the readiness probe, and the
* no-DATABASE_URL path is the one with no startup migration run to wait for —
* the server reports ready immediately, so this smoke test stays deterministic
* and exercises exactly the committed no-migration readiness path.
*/
function bootServer(port) {
const args =
tsExecMode() === 'strip-types-flag'
? ['--experimental-strip-types', SERVER_SRC]
: [SERVER_SRC];
const env = { ...process.env, PORT: String(port) };
delete env.DATABASE_URL;
const child = spawn(process.execPath, args, {
cwd: REPO_ROOT,
env: { ...process.env, PORT: String(port) },
env,
stdio: ['ignore', 'ignore', 'pipe'],
});
let stderr = '';