Skip to content

Commit 4de7062

Browse files
t3dotggclaude
andcommitted
test(server): wait for the interrupt failure activity, not only the stop
The reactor stops the session and then records the failure activity in a second dispatch. The test waited only for the stop, so a read between the two missed the activity. It passed on main because the first identity lookup for the missing test folder spawned git and slowed the reads. That folder now skips git, which exposed the race about half the time locally. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
1 parent 5963f28 commit 4de7062

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3685,7 +3685,13 @@ describe("ProviderCommandReactor", () => {
36853685
const thread = (await harness.readModel()).threads.find(
36863686
(entry) => entry.id === ThreadId.make("thread-1"),
36873687
);
3688-
return thread?.session?.status === "stopped";
3688+
// The reactor stops the session, then records the failure activity.
3689+
return (
3690+
thread?.session?.status === "stopped" &&
3691+
thread.activities.some(
3692+
(activity) => activity.kind === "provider.turn.interrupt.failed",
3693+
)
3694+
);
36893695
}),
36903696
);
36913697

0 commit comments

Comments
 (0)