mirror of
https://github.com/stablyai/orca.git
synced 2026-11-18 11:54:46 +00:00
test: read the failed reuse start's dispatch without a cast
This commit is contained in:
+5
-4
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user