Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions packages/cli/tests/integration/codex-stop-nudge.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ function runCodexStop(cwd: string, input: Record<string, unknown> = {}) {
});
}

function expectNoContinuation(stdout: string): void {
const parsed = JSON.parse(stdout.trim()) as { decision?: string };
expect(parsed.decision).toBeUndefined();
}

describe('Codex Stop architecture drift nudge', () => {
let cwd = '';

Expand Down Expand Up @@ -113,7 +118,7 @@ describe('Codex Stop architecture drift nudge', () => {
expect(result.status).toBe(0);
// Merged Stop adapter unifies the no-op output on valid JSON `{}` (no decision)
// — the retro half requires parseable stdout — rather than empty output.
expect(JSON.parse(result.stdout.trim()).decision).toBeUndefined();
expectNoContinuation(result.stdout);
expect(result.stderr).toBe('');
});

Expand All @@ -125,7 +130,7 @@ describe('Codex Stop architecture drift nudge', () => {
expect(result.status).toBe(0);
// Merged Stop adapter unifies the no-op output on valid JSON `{}` (no decision)
// — the retro half requires parseable stdout — rather than empty output.
expect(JSON.parse(result.stdout.trim()).decision).toBeUndefined();
expectNoContinuation(result.stdout);
expect(result.stderr).toBe('');
});

Expand All @@ -137,7 +142,7 @@ describe('Codex Stop architecture drift nudge', () => {
expect(result.status).toBe(0);
// Merged Stop adapter unifies the no-op output on valid JSON `{}` (no decision)
// — the retro half requires parseable stdout — rather than empty output.
expect(JSON.parse(result.stdout.trim()).decision).toBeUndefined();
expectNoContinuation(result.stdout);
expect(result.stderr).toBe('');
});
});