diff --git a/test/helpers/autoplan-guard-pty.ts b/test/helpers/autoplan-guard-pty.ts index 4e3401d10..0d181ccb1 100644 --- a/test/helpers/autoplan-guard-pty.ts +++ b/test/helpers/autoplan-guard-pty.ts @@ -140,7 +140,7 @@ export function dispatchEventRewriter(artifacts: string, substituted: (phase: Di pending = events.pop()!; return events.map(e => take(e + '\n\n')).join(''); }, - end: (): string => { const rest = pending; pending = ''; return rest; }, + end: (): string => { const rest = (held ? held.raw.join('') : '') + pending; held = null; pending = ''; return rest; }, }; } diff --git a/test/skill-e2e-autoplan-guard-pty.test.ts b/test/skill-e2e-autoplan-guard-pty.test.ts index fb3d7f5fe..3362abb4c 100644 --- a/test/skill-e2e-autoplan-guard-pty.test.ts +++ b/test/skill-e2e-autoplan-guard-pty.test.ts @@ -32,7 +32,7 @@ describeIfSelected('autoplan publication guard live PTY', ['autoplan-guard-pty'] const s = prepareGuardSession(process.env.ANTHROPIC_API_KEY); const relay = startDispatchRelay(path.join(s.project, '.gstack', 'tmp', 'autoplan')); const session = await launchClaudePty({ permissionMode: null, model: MODEL, cwd: s.project, env: { ...s.env, ANTHROPIC_BASE_URL: relay.url }, - timeoutMs: 540_000, observeScreen: true }); + timeoutMs: 540_000, observeScreen: true }).catch(error => { relay.stop(); throw error; }); const started = performance.now(); const prompts: string[] = []; let phase1Ms: number | null = null;