mirror of
https://github.com/stablyai/orca.git
synced 2026-10-17 00:03:08 +00:00
test: pin that inspection errors do not accelerate the relaxed cadence
The 10s error-backoff ceiling would undercut the 15s no-evidence tier (erroring scans polling more often than healthy ones); the Math.max cap prevents that but had no regression guard. Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
+14
@@ -138,6 +138,20 @@ describe('agent completion no-evidence inspection cadence', () => {
|
||||
expect(inspectProcess).toHaveBeenCalledTimes(8)
|
||||
})
|
||||
|
||||
it('does not accelerate the relaxed cadence when inspections keep erroring', async () => {
|
||||
const inspectProcess = vi.fn(async () => {
|
||||
throw new Error('scan failed')
|
||||
})
|
||||
const { coordinator } = createCoordinator(inspectProcess)
|
||||
|
||||
coordinator.startProcessTracking()
|
||||
await vi.advanceTimersByTimeAsync(60_000)
|
||||
|
||||
// The error backoff ceiling (10s) must not undercut the 15s tier: erroring
|
||||
// scans would otherwise poll MORE often than healthy ones (15s → 10s).
|
||||
expect(inspectProcess).toHaveBeenCalledTimes(4)
|
||||
})
|
||||
|
||||
it('keeps a recognized agent on the full active cadence on a costly host', async () => {
|
||||
const inspectProcess = vi.fn(async () => processResult('codex'))
|
||||
const { coordinator } = createCoordinator(inspectProcess)
|
||||
|
||||
Reference in New Issue
Block a user