fix(web-probe): keep sampling through startup degradation (#709)
Co-authored-by: Codex <codex@noreply.local>
This commit is contained in:
@@ -80,13 +80,17 @@ try {
|
||||
await runControlCommand({ id: "startup-goto", type: "goto", path: targetPath, createdAt: new Date().toISOString(), source: "startup" }, async () => gotoTarget(targetPath));
|
||||
observerPage = await context.newPage();
|
||||
attachPassiveListeners(observerPage, "observer", observerPageId);
|
||||
await runControlCommand({ id: "startup-observer-goto", type: "observerGoto", path: targetPath, createdAt: new Date().toISOString(), source: "startup" }, async () => {
|
||||
const result = await syncObserverPageToControlSession("startup");
|
||||
if (!result?.ok) {
|
||||
throw Object.assign(new Error("observer startup did not reach the target workbench route: " + (result?.failureKind || result?.reason || "observer-not-ready")), { details: result });
|
||||
}
|
||||
return result;
|
||||
});
|
||||
await runControlCommand({ id: "startup-observer-goto", type: "observerGoto", path: targetPath, createdAt: new Date().toISOString(), source: "startup" }, async () => {
|
||||
const result = await syncObserverPageToControlSession("startup");
|
||||
if (!result?.ok) {
|
||||
await appendJsonl(files.control, eventRecord("observer-startup-degraded", {
|
||||
reason: result?.failureKind || result?.reason || "observer-not-ready",
|
||||
result: sanitize(result),
|
||||
valuesRedacted: true,
|
||||
}));
|
||||
}
|
||||
return result ?? { ok: false, reason: "observer-not-ready", pageRole: "observer", pageId: observerPageId, valuesRedacted: true };
|
||||
});
|
||||
terminalStatus = "running";
|
||||
await writeManifest({ status: "running", auth: publicAuth(auth) });
|
||||
await writeHeartbeat({ status: "running" });
|
||||
|
||||
Reference in New Issue
Block a user