Skip to content

Commit f8f3bcb

Browse files
author
e2e
committed
fix(windows): finish packaged smoke after verified shutdown
1 parent 21ac3b6 commit f8f3bcb

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

scripts/release/windows-server-smoke-checks.mjs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,16 @@ async function main() {
271271
await workerHandshake(bun, path.join(payloadDir, 'dist-server', 'server', 'gjc-bun-worker.js'));
272272
const { version } = JSON.parse(await fs.readFile(path.join(payloadDir, 'package.json'), 'utf8'));
273273
await serverSmoke(payloadDir, version);
274-
console.log('Windows payload smoke passed: Node, SQLite, ConPTY, core, ripgrep, Bun worker, supervised model catalog/Job chain, desktop bootstrap/auth, frontend and graceful shutdown.');
274+
await new Promise((resolve, reject) => {
275+
process.stdout.write('Windows payload smoke passed: Node, SQLite, ConPTY, core, ripgrep, Bun worker, supervised model catalog/Job chain, desktop bootstrap/auth, frontend and graceful shutdown.\n', error => error ? reject(error) : resolve());
276+
});
275277
}
276278

277-
if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) await main();
279+
if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
280+
await main();
281+
// All worker/server exits and the final output flush have been awaited.
282+
// node-pty's Windows native helpers can retain event-loop handles afterwards;
283+
// this short-lived checker must finish explicitly, like the production server.
284+
// The caller independently reaps the owned Job and verifies no descendants.
285+
process.exit(0);
286+
}

0 commit comments

Comments
 (0)