diff --git a/tests/control-hardening.test.ts b/tests/control-hardening.test.ts index 5afe9e9..cd1e0de 100644 --- a/tests/control-hardening.test.ts +++ b/tests/control-hardening.test.ts @@ -399,9 +399,11 @@ describe('signed runner receipts and real rollback state machine', () => { const envelope = (await broker.poll(runner, environment.id))!; expect(envelope.payload.release.id).toBe(oldest.id); const status = async (id: string) => (await db.transaction('alpha', tx => tx.get('release', id)))!; + // Canceled runs fail their pending release outright (see run-lifecycle's invalidation case), + // so the stale release no longer waits on the queue with a "request a new release" reason. expect(await status(canceled.release.id)).toMatchObject({ status: 'failed', - failureReason: expect.stringContaining('request a new release'), + failureReason: 'The run was canceled', }); // Continuing the paused run may make its release current again. expect((await status(paused.release.id)).status).toBe('ready');