From 6bdb0bf1bedcef29c990c8ecd152d8f4026f2afa Mon Sep 17 00:00:00 2001 From: garrytan Date: Wed, 30 Sep 2026 13:04:59 +0000 Subject: [PATCH] test(office-hours-attempt): the fake judge SDK response carries stop_reason like the real API (structured judge requires end_turn) --- test/office-hours-attempt.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/office-hours-attempt.test.ts b/test/office-hours-attempt.test.ts index 94a25295f..e612d56c4 100644 --- a/test/office-hours-attempt.test.ts +++ b/test/office-hours-attempt.test.ts @@ -606,7 +606,7 @@ const fakeJudgeRequest = async (body, options) => { const id = attempt; await new Promise(resolve => setTimeout(resolve, scenario === 'late-judge' ? 130 : 10)); event({ kind: 'judge-ready', id, aborted: options?.signal?.aborted ?? false }); - return { content: [{ type: 'text', text: JSON.stringify({ reason_substance: scenario === 'bad-score' ? 3 : 5, reasoning: 'fixture specific tradeoff' }) }] }; + return { stop_reason: 'end_turn', content: [{ type: 'text', text: JSON.stringify({ reason_substance: scenario === 'bad-score' ? 3 : 5, reasoning: 'fixture specific tradeoff' }) }] }; }; mock.module('@anthropic-ai/sdk', () => ({ default: class { messages = { create: fakeJudgeRequest }; } })); globalThis.fetch = () => { throw new Error('No network is permitted in this free lifecycle fixture'); };