diff --git a/src/main/runtime/rpc/methods/orchestration/worker/start/failed-worker-start-report.test.ts b/src/main/runtime/rpc/methods/orchestration/worker/start/failed-worker-start-report.test.ts index 0ac7a8ec392..ba0dceae158 100644 --- a/src/main/runtime/rpc/methods/orchestration/worker/start/failed-worker-start-report.test.ts +++ b/src/main/runtime/rpc/methods/orchestration/worker/start/failed-worker-start-report.test.ts @@ -62,17 +62,18 @@ describe('a worker-start that fails', () => { exitCode: null }) const task = h.db.createTask({ spec: 'follow up on the PR', runId: h.activeRunId }) - const receipt = (await h.call('orchestration.workerStart', { + const receipt = await h.call('orchestration.workerStart', { task: task.id, from: 'term_coord', terminal: 'term_reused' - })) as { state: string; dispatchId: string } - expect(receipt.state).toBe('failed') + }) + expect(receipt).toMatchObject({ state: 'failed' }) + const dispatchId = h.db.getDispatchContext(task.id)?.id const [lost] = h.db.getUnreadRunMailbox(h.activeRunId, 100, ['escalation']) expect(lost?.body).not.toContain('worker-read') await expect( - h.call('orchestration.workerRead', { dispatch: receipt.dispatchId }) + h.call('orchestration.workerRead', { dispatch: dispatchId }) ).rejects.toMatchObject({ code: 'worker_never_started', message: expect.stringContaining('never started: Agent did not become ready')