From 93cd4299d718fb6a434d9ae01537393a1a211814 Mon Sep 17 00:00:00 2001 From: Dotta Date: Sun, 8 Nov 2026 22:33:26 -0600 Subject: [PATCH] test(evals): wait for the persisted pause reply's profile link before following it Run 42560576472 observed the thread the moment the CEO run settled. The reply was on screen with its profile link, but the persisted comment had not rendered yet, so the link collector found nothing. The scripted person now re-reads the rendered thread for up to 30 seconds before failing. Co-Authored-By: Claude Opus 5.5 --- .../chat-catalog-domains/runtime-agent-lifecycle.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/runner-e2e/chat-catalog-domains/runtime-agent-lifecycle.ts b/tests/runner-e2e/chat-catalog-domains/runtime-agent-lifecycle.ts index 311485a37e7..a2f8c6b8b73 100644 --- a/tests/runner-e2e/chat-catalog-domains/runtime-agent-lifecycle.ts +++ b/tests/runner-e2e/chat-catalog-domains/runtime-agent-lifecycle.ts @@ -58,7 +58,11 @@ export const runtimeLifecycleCases = [runtimeDefinition("agents.pause-agent", ct state.beforeHumanStatus = beforeHuman.status; state.beforeHumanLifecycleState = beforeHuman.lifecycleState; state.workerRunStatusBeforeHuman = (await ctx.allRuns()).find(run => run.id === state.workerRunId)?.status; state.agentPauseStatus = await probeAgentPermission(ctx, `/api/agents/${worker.id}/pause`, "POST", {}); - const o = await observeRuntime(ctx, state); + // The persisted reply can render a moment after the run settles; wait for its link, bounded. + let o = await observeRuntime(ctx, state); + for (const until = Date.now() + 30_000; !agentLink(o, worker) && Date.now() < until;) { + await ctx.input.page.waitForTimeout(2_000); o = await observeRuntime(ctx, state); + } const source = ctx.input.page.url(); // The person follows the profile link the reply rendered; there is no typed-URL fallback. const href = agentLink(o, worker);