From ea431410842332763ee5ef350114cd4d90ab2191 Mon Sep 17 00:00:00 2001 From: Aidan Daly Date: Thu, 1 Oct 2026 18:17:24 +0000 Subject: [PATCH] test(e2e): wait for batch evaluation before archiving --- e2e-tests/archive-lifecycle.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/e2e-tests/archive-lifecycle.test.ts b/e2e-tests/archive-lifecycle.test.ts index 8dd74d167d..0072cb3233 100644 --- a/e2e-tests/archive-lifecycle.test.ts +++ b/e2e-tests/archive-lifecycle.test.ts @@ -116,7 +116,7 @@ describe.sequential('e2e: archive command lifecycle', () => { // ════════════════════════════════════════════════════════════════════════ it.skipIf(!canRun)( - 'runs batch evaluation and captures the ID', + 'waits for batch evaluation to finish and captures the ID', async () => { await retry( async () => { @@ -129,6 +129,7 @@ describe.sequential('e2e: archive command lifecycle', () => { 'Builtin.Faithfulness', '--lookback-days', '1', + '--wait', '--json', ]); expect(result.exitCode, `batch-evaluation failed (stdout: ${result.stdout}, stderr: ${result.stderr})`).toBe( @@ -137,7 +138,7 @@ describe.sequential('e2e: archive command lifecycle', () => { const json = parseJsonOutput(result.stdout) as Record; expect(json).toHaveProperty('success', true); expect(json.id).toBeTruthy(); - expect(json.status).not.toBe('FAILED'); + expect(['COMPLETED', 'COMPLETED_WITH_ERRORS', 'STOPPED']).toContain(json.status); batchEvaluationId = json.id as string; }, 6,