From 84c0eee9f2916e1f95951f10b0679edc646b1684 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Mon, 31 Aug 2026 21:12:39 +0000 Subject: [PATCH] test: spawn timeouts on absorbed-PR tests (v1.77 sync-spawn tripwire) The absorbed community tests (#2748, #2676, #2714, #2720) were authored before the v1.77 tripwire required a timeout on every sync spawn in the test trees. Co-Authored-By: Claude Fable 5 --- test/gstack-config-cross-project.test.ts | 1 + test/gstack-skill-start.test.ts | 1 + test/hostile-path-writers.test.ts | 1 + test/skill-browse-state-extraction.test.ts | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/test/gstack-config-cross-project.test.ts b/test/gstack-config-cross-project.test.ts index 93c323948..a52b4dc1c 100644 --- a/test/gstack-config-cross-project.test.ts +++ b/test/gstack-config-cross-project.test.ts @@ -19,6 +19,7 @@ let stateRoot: string; function cfg(args: string[]): { code: number; out: string; err: string } { const r = spawnSync(CONFIG, args, { + timeout: 30_000, encoding: "utf8", env: { ...process.env, GSTACK_STATE_ROOT: stateRoot }, }); diff --git a/test/gstack-skill-start.test.ts b/test/gstack-skill-start.test.ts index 3b81f43fb..13b036007 100644 --- a/test/gstack-skill-start.test.ts +++ b/test/gstack-skill-start.test.ts @@ -342,6 +342,7 @@ describe('gstack-skill-start behavior', () => { fs.writeFileSync(path.join(freshGh, '.feature-prompted-model-overlay'), ''); const acknowledged = execFileSync(localStart, ['--skill', 'testskill'], { + timeout: 30_000, encoding: 'utf-8', cwd: projectRoot, env, diff --git a/test/hostile-path-writers.test.ts b/test/hostile-path-writers.test.ts index 3379b6584..1a58d4e60 100644 --- a/test/hostile-path-writers.test.ts +++ b/test/hostile-path-writers.test.ts @@ -35,6 +35,7 @@ function runBin(bin: string, args: string[], env: Record = {}) { // cannot exec a shebang script directly (spawn would fail before the code // under test ever ran). const r = spawnSync('bash', [path.join(HOSTILE, 'bin', bin), ...args], { + timeout: 30_000, encoding: 'utf-8', env: { ...process.env, GSTACK_HOME: STATE, GSTACK_STATE_ROOT: '', ...env }, shell: false, diff --git a/test/skill-browse-state-extraction.test.ts b/test/skill-browse-state-extraction.test.ts index b3e781fd5..597e2a5fd 100644 --- a/test/skill-browse-state-extraction.test.ts +++ b/test/skill-browse-state-extraction.test.ts @@ -49,7 +49,7 @@ function extractViaSkill(source: string, field: 'pid' | 'port', stateFile: strin // have to be reproduced here. const pipeline = line!.slice(line!.indexOf('grep -o')); const script = `cat ${JSON.stringify(stateFile)} | ${pipeline.replace(/\)$/, '')}`; - return execFileSync('bash', ['-c', script], { encoding: 'utf-8' }).trim(); + return execFileSync('bash', ['-c', script], { encoding: 'utf-8', timeout: 30_000 }).trim(); } describe('/open-gstack-browser state-file extraction', () => {