mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-11 23:49:01 +02:00
fix: sweep wave 3 — the execFileSync family gets timeouts (90 sites, 17 files)
The tripwire's regex covered spawnSync/execSync/Bun.spawnSync but not execFileSync — an entire blocking sync-spawn API family that could reintroduce the shard-wedge class undetected (ship review army). Same mechanical recipe as waves 1-2: timeout: 30_000 default, 120_000 for slow ops, shared wrappers fixed once, string-needle sites skipped with reasons. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
008ddb3697
commit
e4954aaebb
@@ -31,6 +31,7 @@ let tmpGstackHome: string;
|
||||
|
||||
function runStart(args: string[] = [], env: Record<string, string> = {}): string {
|
||||
return execFileSync(START, ['--skill', 'testskill', ...args], {
|
||||
timeout: 30_000,
|
||||
encoding: 'utf-8',
|
||||
cwd: tmpHome, // no CLAUDE.md/AGENTS.md, not the repo — routing detection stays cold
|
||||
env: {
|
||||
@@ -150,6 +151,7 @@ describe('gstack-skill-start behavior', () => {
|
||||
fs.copyFileSync(START, path.join(fakeBin, 'gstack-skill-start'));
|
||||
fs.chmodSync(path.join(fakeBin, 'gstack-skill-start'), 0o755);
|
||||
const out = execFileSync(path.join(fakeBin, 'gstack-skill-start'), ['--skill', 't'], {
|
||||
timeout: 30_000,
|
||||
encoding: 'utf-8',
|
||||
cwd: tmpHome,
|
||||
env: { PATH: process.env.PATH!, HOME: tmpHome, GSTACK_HOME: tmpGstackHome },
|
||||
@@ -317,7 +319,7 @@ describe('gstack-skill-end', () => {
|
||||
const out = execFileSync(
|
||||
END,
|
||||
['--skill', 't', '--outcome', 'success', '--session-id', 'sid-1', '--tel-start', String(start)],
|
||||
{ encoding: 'utf-8', cwd: tmpHome, env: { PATH: process.env.PATH!, HOME: tmpHome, GSTACK_HOME: tmpGstackHome } },
|
||||
{ timeout: 30_000, encoding: 'utf-8', cwd: tmpHome, env: { PATH: process.env.PATH!, HOME: tmpHome, GSTACK_HOME: tmpGstackHome } },
|
||||
);
|
||||
const m = out.match(/SKILL_END: recorded outcome=success duration_s=(\d+)/);
|
||||
expect(m).not.toBeNull();
|
||||
@@ -338,6 +340,7 @@ describe('gstack-skill-end', () => {
|
||||
const pending = path.join(tmpGstackHome, 'analytics', '.pending-sid-2');
|
||||
fs.writeFileSync(pending, 'x');
|
||||
execFileSync(END, ['--skill', 't', '--outcome', 'abort', '--session-id', 'sid-2', '--tel-start', 'bogus'], {
|
||||
timeout: 30_000,
|
||||
encoding: 'utf-8',
|
||||
cwd: tmpHome,
|
||||
env: { PATH: process.env.PATH!, HOME: tmpHome, GSTACK_HOME: tmpGstackHome },
|
||||
|
||||
Reference in New Issue
Block a user