From 69042febb2aec33110925e9be853f41329100d6d Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Wed, 14 Oct 2026 20:08:40 -0700 Subject: [PATCH] test: reduce coordinator mail polling overhead (#28945) --- .../structured-chat-coordinator-mail-rig.test-fixture.ts | 2 +- src/main/runtime/structured-chat-coordinator-mail.test.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/runtime/structured-chat-coordinator-mail-rig.test-fixture.ts b/src/main/runtime/structured-chat-coordinator-mail-rig.test-fixture.ts index bd74bdd1b75..0b5e99fdda8 100644 --- a/src/main/runtime/structured-chat-coordinator-mail-rig.test-fixture.ts +++ b/src/main/runtime/structured-chat-coordinator-mail-rig.test-fixture.ts @@ -294,7 +294,7 @@ afterEach(async () => { }) // Pointers are sent on asynchronous edges; the default 1s wait is too tight under a loaded parallel run. -export const WAIT = { timeout: 10_000 } +export const WAIT = { timeout: 10_000, interval: 10 } export const POINTER = /You have 1 orchestration message\. Run `orca(-dev)? orchestration check --run run_\w+`\./ diff --git a/src/main/runtime/structured-chat-coordinator-mail.test.ts b/src/main/runtime/structured-chat-coordinator-mail.test.ts index 49453beb171..079647ba803 100644 --- a/src/main/runtime/structured-chat-coordinator-mail.test.ts +++ b/src/main/runtime/structured-chat-coordinator-mail.test.ts @@ -259,6 +259,7 @@ describe('a worker result reaches the structured chat that coordinates it', () = // provider still dies, so exactly one start proves it is pointed once, not in a loop. restartRuntime() const before = providerFaults.starts + await observationClock.observe(2_000) await vi.waitFor(() => expect(providerFaults.turnStarts).toBe(2), WAIT) await observationClock.observe(1_500) await edgesAnswered() @@ -524,6 +525,7 @@ describe('a /clear keeps the chat its orchestration address', () => { }) it('points mail the earlier context never took at the fresh context, without a user message', async () => { + observationClock.start() const chat = await openChat(COORDINATOR) const { runId, taskId } = await coordinatorRunAndTask() await finishWorker(taskId) @@ -537,6 +539,7 @@ describe('a /clear keeps the chat its orchestration address', () => { const cleared = await clearChat(COORDINATOR) expect(cleared).toBe(COORDINATOR) + await observationClock.observe(2_000) await vi.waitFor(() => expect(connectionFor(cleared).turns[0]?.text).toMatch(POINTER), WAIT) await settleTurn(cleared, 0) await vi.waitFor(