mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-10 12:37:55 +01:00
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
b31950c439
commit
93cd4299d7
1 file changed
+5
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user