refactor(agent): trim obsolete loop surfaces
This commit is contained in:
@@ -226,7 +226,6 @@ describe('dsh-agent-spine-demo bundle', () => {
|
||||
})
|
||||
|
||||
handle.agent.followup([{ type: 'text', text: 'recover' }])
|
||||
await expect.poll(() => adapter.requests).toBe(2)
|
||||
await waitForIdle(ctx, handle.agent)
|
||||
|
||||
expect(adapter.requests).toBe(2)
|
||||
|
||||
@@ -388,7 +388,6 @@ export function formatTurnFailure(reason: TurnEndReason): string {
|
||||
case 'error': return `failed at step ${reason.step}: ${'failure' in reason ? reason.failure.message : reason.message}`
|
||||
case 'disposed': return 'was disposed'
|
||||
case 'max-tokens': return 'reached the model output-token limit'
|
||||
case 'rejected': return `was rejected: ${reason.reason}`
|
||||
case 'interrupted': return 'was interrupted during persistence recovery'
|
||||
default: return `ended with ${JSON.stringify(reason)}`
|
||||
}
|
||||
|
||||
@@ -501,7 +501,6 @@ describe('formatTurnFailure', () => {
|
||||
[{ kind: 'error', step: 3, failure: { message: 'provider bad', code: 'SERVER' } }, 'failed at step 3: provider bad'],
|
||||
[{ kind: 'disposed' }, 'was disposed'],
|
||||
[{ kind: 'max-tokens' }, 'output-token limit'],
|
||||
[{ kind: 'rejected', reason: 'policy' }, 'was rejected: policy'],
|
||||
[{ kind: 'interrupted' }, 'persistence recovery'],
|
||||
]
|
||||
for (const [reason, expected] of cases) expect(formatTurnFailure(reason)).toContain(expected)
|
||||
|
||||
Reference in New Issue
Block a user