diff --git a/src/main/codex/codex-structured-question-order.test.ts b/src/main/codex/codex-structured-question-order.test.ts index 35758327076b..ff9a210e17ad 100644 --- a/src/main/codex/codex-structured-question-order.test.ts +++ b/src/main/codex/codex-structured-question-order.test.ts @@ -97,7 +97,7 @@ beforeEach(async () => { now: () => (clock += 1) }) expect((await host.attach(CALLER, hostTestAttachParams(null))).ok).toBe(true) - const page = host.history({ sessionId: SESSION, direction: 'tail' }) + const page = await host.history({ sessionId: SESSION, direction: 'tail' }) if (!page.ok) { throw new Error('no history page') } diff --git a/src/main/native-chat/agent-session-wire/structured-agent-session-accept-then-deliver.test.ts b/src/main/native-chat/agent-session-wire/structured-agent-session-accept-then-deliver.test.ts index d075dc06477c..c8cd54ab4f8e 100644 --- a/src/main/native-chat/agent-session-wire/structured-agent-session-accept-then-deliver.test.ts +++ b/src/main/native-chat/agent-session-wire/structured-agent-session-accept-then-deliver.test.ts @@ -334,9 +334,9 @@ describe('a start the chat needed and did not get', () => { acquire.mockRejectedValueOnce(new Error('spawn codex ENOENT')) const first = await accept('first') const second = await accept('second') - await eventually(() => expect(submission(second)?.dispatchState).toBe('rejected')) + await eventually(async () => expect((await submission(second))?.dispatchState).toBe('rejected')) - const snapshot = host.journalSnapshot(SESSION) + const snapshot = await host.journalSnapshot(SESSION) const errorRow = snapshot.items.find( (item) => item.body.kind === 'status' && item.body.tone === 'error' )?.itemId diff --git a/src/main/native-chat/agent-session-wire/structured-agent-session-send-restarts-failed-start.test.ts b/src/main/native-chat/agent-session-wire/structured-agent-session-send-restarts-failed-start.test.ts index db1d7a376633..5f6e541ae64f 100644 --- a/src/main/native-chat/agent-session-wire/structured-agent-session-send-restarts-failed-start.test.ts +++ b/src/main/native-chat/agent-session-wire/structured-agent-session-send-restarts-failed-start.test.ts @@ -211,7 +211,7 @@ describe('a send into a published session whose child ended before startup', () expect.stringMatching(/stopped before it finished starting: .*not signed in/) ]) // Accepted before the restart it needed, so the chat draws it above the row naming the cause. - const snapshot = host.journalSnapshot(SESSION) + const snapshot = await host.journalSnapshot(SESSION) const causeRow = snapshot.items.findLast((item) => item.body.kind === 'status')?.itemId const shown = [agentJournalSubmissionKey(held), causeRow] expect(