mirror of
https://github.com/stablyai/orca.git
synced 2026-09-23 16:02:24 +00:00
* perf(orchestration): bound mutation ledger and run pages Co-authored-by: Orca <help@stably.ai> * fix(orchestration): close retention pagination gaps * fix(orchestration): preserve unpaginated run listing Co-authored-by: Orca <help@stably.ai> * fix(orchestration): reject malformed run cursors --------- Co-authored-by: Orca <help@stably.ai> Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>
17 lines
646 B
TypeScript
17 lines
646 B
TypeScript
import { describe, expect, it, vi } from 'vitest'
|
|
import { listAllOrchestrationRuns } from './orchestration-run-pages'
|
|
|
|
describe('orchestration Run pagination compatibility', () => {
|
|
it('stops after an old server response without nextCursor', async () => {
|
|
const call = vi.fn().mockResolvedValue({
|
|
result: { runs: [{ id: 'run_old', objective: 'Old server Run' }] }
|
|
})
|
|
|
|
await expect(listAllOrchestrationRuns({ call })).resolves.toEqual([
|
|
{ id: 'run_old', objective: 'Old server Run' }
|
|
])
|
|
expect(call).toHaveBeenCalledTimes(1)
|
|
expect(call).toHaveBeenCalledWith('orchestration.runList', { limit: 100 })
|
|
})
|
|
})
|