Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

fix(play-audit): give waitForFunction its options in the slot Playwright reads

nirholas8052120c4287
diff --git a/scripts/play-journey-audit.mjs b/scripts/play-journey-audit.mjs
index 358e90e38..f55f4eb57 100644
--- a/scripts/play-journey-audit.mjs
+++ b/scripts/play-journey-audit.mjs
@@ -70,7 +70,14 @@ async function waitFor(pred, budgetMs, label) {
if (left <= 0) { console.log(at(), `${label}: timed out after ${Math.round(budgetMs / 1000)}s`); return false; }
const started = Date.now();
try {
- await page.waitForFunction(pred, { timeout: left });
+ // The signature is waitForFunction(fn, arg, options). Passing the options
+ // object in the second slot makes it the predicate's ARGUMENT, so the
+ // timeout never applies and Playwright falls back to its 30s default,
+ // silently capping every budget this harness computes. That is not a small
+ // drift: it made the load scaling above inert, and on a box at load 66 it
+ // reported "LOADER NEVER CLEARED" after 30s of a budget the same line
+ // called 240s. The `undefined` is load-bearing.
+ await page.waitForFunction(pred, undefined, { timeout: left });
if (reloads) console.log(at(), `[note] ${label} survived ${reloads} hot-reload(s) from another agent's save`);
return true;
} catch (e) {