From d278f6da778638d1065ec3363d1ce01fb1fd87db Mon Sep 17 00:00:00 2001 From: Codex Date: Sat, 27 Jun 2026 09:28:03 +0000 Subject: [PATCH] fix: retry observe navigation timeouts --- .../src/hwlab-node-web-observe-analyzer-timing-source.ts | 2 +- scripts/src/hwlab-node-web-observe-runner-source.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/src/hwlab-node-web-observe-analyzer-timing-source.ts b/scripts/src/hwlab-node-web-observe-analyzer-timing-source.ts index 730ec7f8..f90a8a25 100644 --- a/scripts/src/hwlab-node-web-observe-analyzer-timing-source.ts +++ b/scripts/src/hwlab-node-web-observe-analyzer-timing-source.ts @@ -2044,7 +2044,7 @@ async function artifactSummary(artifacts) { function compactManifest(value) { if (!value) return null; - return { jobId: value.jobId, stateDir: value.stateDir, baseUrl: value.baseUrl, targetPath: value.targetPath, startedAt: value.startedAt, status: value.status, pageAuthority: value.pageAuthority ?? null, sampling: value.sampling, pageProvenance: value.pageProvenance ?? null, safety: value.safety }; + return { jobId: value.jobId, stateDir: value.stateDir, baseUrl: value.baseUrl, targetPath: value.targetPath, startedAt: value.startedAt, status: value.status, pageAuthority: value.pageAuthority ?? null, navigation: value.navigation ?? null, sampling: value.sampling, pageProvenance: value.pageProvenance ?? null, safety: value.safety }; } function compactHeartbeat(value) { diff --git a/scripts/src/hwlab-node-web-observe-runner-source.ts b/scripts/src/hwlab-node-web-observe-runner-source.ts index 96aed6f0..ee43aa2e 100644 --- a/scripts/src/hwlab-node-web-observe-runner-source.ts +++ b/scripts/src/hwlab-node-web-observe-runner-source.ts @@ -1054,7 +1054,7 @@ async function gotoTarget(rawTarget) { } catch (error) { const message = error instanceof Error ? error.message : String(error); attempts.push({ attempt, ok: false, failureKind: navigationFailureKind(message), message: redactErrorMessage(message), readiness: error?.navigationReadiness ?? null }); - if (/workbench-app-not-ready/iu.test(message)) { + if (/workbench-app-not-ready|navigation timeout|page\.goto:\s*timeout|timeout\s+\d+ms\s+exceeded/iu.test(message)) { const lateReadiness = await waitForTargetPageReady(page, target, { timeoutMs: 5000 }).catch(() => null); if (lateReadiness?.ok) { const pageProvenance = await refreshPageProvenance("goto-late-ready", null); @@ -1188,7 +1188,7 @@ function compactPageProvenance(value) { } function isRetryableNavigationError(message) { - return /net::ERR_NETWORK_CHANGED|net::ERR_ABORTED|net::ERR_CONNECTION_RESET|net::ERR_NAME_NOT_RESOLVED|Navigation timeout|workbench-app-not-ready/iu.test(String(message || "")); + return /net::ERR_NETWORK_CHANGED|net::ERR_ABORTED|net::ERR_CONNECTION_RESET|net::ERR_NAME_NOT_RESOLVED|Navigation timeout|page\.goto:\s*timeout|timeout\s+\d+ms\s+exceeded|workbench-app-not-ready/iu.test(String(message || "")); } function navigationFailureKind(message) { @@ -1197,7 +1197,7 @@ function navigationFailureKind(message) { if (/net::ERR_ABORTED/iu.test(text)) return "net::ERR_ABORTED"; if (/net::ERR_CONNECTION_RESET/iu.test(text)) return "net::ERR_CONNECTION_RESET"; if (/net::ERR_NAME_NOT_RESOLVED/iu.test(text)) return "net::ERR_NAME_NOT_RESOLVED"; - if (/Navigation timeout/iu.test(text)) return "navigation-timeout"; + if (/Navigation timeout|page\.goto:\s*timeout|timeout\s+\d+ms\s+exceeded/iu.test(text)) return "navigation-timeout"; if (/workbench-app-not-ready/iu.test(text)) return "workbench-app-not-ready"; return "navigation-error"; }