Restore the conditions eight converted QA scripts were waiting for

The harness conversion replaced pauses that stood in for real conditions
with camera readiness: the cables and infrastructure idle checks started
measuring while the overlay was still fading in after moveEnd, directions
sampled before its maneuver dots had ground cells, three scripts clicked
before the loading cover was gone, the credits check hit-tested during UI
transitions, and the oblique traffic flight lost its height cap. Each now
waits for its condition; idle checks observe without requesting frames
and record the reasons of the frames they count; readiness waits for the
startup cover and no longer requests frames while polling.
This commit is contained in:
German Khokhlov committed 2026-11-10 20:14:50 +04:00
1 parent 2c62e1e378
commit b5cc4feacb
11 files changed
+480 -51

No files matched your search

+2 -21
View File
@@ -27,6 +27,7 @@ import { evaluateWithGeo } from './qa/geometry.mjs';
* FAIL. Commits nothing.
*/
import { whenSettled } from './qa/ready.mjs';
import { measureIdleRender } from './qa/idle.mjs';
import { launchBrowser, closeBrowser } from './qa/browser.mjs';
import fs from 'node:fs';
import path from 'node:path';
@@ -297,27 +298,7 @@ try {
// ── parked-idle honesty: the LOD walk must not force continuous render ─
await whenSettled(page);
const idle = await page.evaluate(async () => {
// The debug handle's own governor read (no /src import: runs on a build).
const { getRenderGovernorDiagnostics } = window.__godsEyeView;
return new Promise((resolve) => {
const startedAt = Date.now();
const tilesLoadedBefore = window.__godsEyeView.engine.surface.tilesLoaded();
let renders = 0;
let framesWithPendingTiles = 0;
const remove = window.__godsEyeView.engine.frames.postRender.addEventListener(() => {
renders += 1;
if (!window.__godsEyeView.engine.surface.tilesLoaded()) framesWithPendingTiles += 1;
});
setTimeout(() => {
remove();
const governor = getRenderGovernorDiagnostics();
resolve({ renders, tilesLoadedBefore, tilesLoadedAfter: window.__godsEyeView.engine.surface.tilesLoaded(),
framesWithPendingTiles, mode: governor.mode, holds: governor.holds,
requests: governor.recentRequests.filter(request => request.at >= startedAt) });
}, 5_000);
});
});
const idle = await measureIdleRender(page);
report(CONTROL
? 'parked idle, control (postRender fires / 5s)'
: 'parked idle with infra ON (postRender fires / 5s)', idle);