fix(browser): park webviews permanently paintable

Delete the renderer capture prep handshake and keep screenshots on the serialized invalidate/retry path. The capture harness now defaults to the production P1 attach-off parking check.
This commit is contained in:
Mohamed Boudra
2026-07-03 11:34:48 +02:00
parent cc21262130
commit ab62a023fd
15 changed files with 358 additions and 1652 deletions
+11 -19
View File
@@ -13,15 +13,15 @@ const CAPTURE_RETRY_INTERVAL_MS = 200;
const REPEAT_COUNT = 5;
const FRESH_REPEAT_COUNT = 3;
const SOAK_MS = Number(process.env.PASEO_CAPTURE_HARNESS_SOAK_MS || 75000);
const HARNESS_GROUP = process.env.PASEO_CAPTURE_HARNESS_GROUP || "all";
const HARNESS_GROUP = process.env.PASEO_CAPTURE_HARNESS_GROUP || "permanent-parking";
const PERMANENT_STATE_FILTER = new Set(
(process.env.PASEO_CAPTURE_HARNESS_STATES || "")
(process.env.PASEO_CAPTURE_HARNESS_STATES || "P1")
.split(",")
.map((state) => state.trim())
.filter(Boolean),
);
const PERMANENT_VARIANT_FILTER = new Set(
(process.env.PASEO_CAPTURE_HARNESS_VARIANTS || "")
(process.env.PASEO_CAPTURE_HARNESS_VARIANTS || "attach-off")
.split(",")
.map((variant) => variant.trim())
.filter(Boolean),
@@ -377,14 +377,8 @@ async function readGuestMetrics(contents) {
}
async function capturePageSequence(contents) {
const previousBackgroundThrottling = contents.getBackgroundThrottling();
contents.setBackgroundThrottling(false);
try {
contents.invalidate();
return await withTimeout(contents.capturePage(undefined, { stayHidden: false }), "capturePage");
} finally {
contents.setBackgroundThrottling(previousBackgroundThrottling);
}
contents.invalidate();
return await withTimeout(contents.capturePage(undefined, { stayHidden: false }), "capturePage");
}
async function captureFullPage(contents) {
@@ -426,14 +420,8 @@ async function captureFullPage(contents) {
}
async function captureFullPageSequence(contents) {
const previousBackgroundThrottling = contents.getBackgroundThrottling();
contents.setBackgroundThrottling(false);
try {
contents.invalidate();
return await captureFullPage(contents);
} finally {
contents.setBackgroundThrottling(previousBackgroundThrottling);
}
contents.invalidate();
return await captureFullPage(contents);
}
function installHarnessWebviewGuards(win) {
@@ -1100,6 +1088,10 @@ async function runPermanentParkingGroup() {
} finally {
await closeHarnessWindow(keeper);
}
const failedResults = results.filter((result) => !result.pass);
if (failedResults.length > 0) {
fail(`permanent parking failed ${failedResults.length}/${results.length} checks`);
}
return results;
}