fix: harden relay navigate retry tests (#30612) (thanks @Sid-Qin)

This commit is contained in:
Peter Steinberger
2026-03-02 06:14:38 +00:00
parent 1c7374f15d
commit ed4fe9e945
2 changed files with 23 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ Docs: https://docs.openclaw.ai
### Fixes
- Browser/Relay navigation recovery: retry once after detached-frame and closed-target navigation errors by forcing a CDP reconnect, reducing transient relay navigation failures during renderer swaps. (#30612) Thanks @Sid-Qin.
- Browser/Remote CDP ownership checks: skip local-process ownership errors for non-loopback remote CDP profiles when HTTP is reachable but the websocket handshake fails, and surface the remote websocket attach/retry path instead. (#15582) Landed from contributor (#28780) Thanks @stubbi, @bsormagec, @unblockedgamesstudio and @vincentkoc.
- Docker/Image health checks: add Dockerfile `HEALTHCHECK` that probes gateway `GET /healthz` so container runtimes can mark unhealthy instances without requiring auth credentials in the probe command. (#11478) Thanks @U-C4N and @vincentkoc.
- Daemon/systemd checks in containers: treat missing `systemctl` invocations (including `spawn systemctl ENOENT`/`EACCES`) as unavailable service state during `is-enabled` checks, preventing container flows from failing with `Gateway service check failed` before install/status handling can continue. (#26089) Thanks @sahilsatralkar and @vincentkoc.

View File

@@ -75,4 +75,26 @@ describe("pw-tools-core.snapshot navigate guard", () => {
expect(goto).toHaveBeenCalledTimes(2);
expect(result.url).toBe("https://example.com/recovered");
});
it("does not reconnect for non-retryable navigation failures", async () => {
const goto = vi
.fn<(...args: unknown[]) => Promise<void>>()
.mockRejectedValueOnce(new Error("net::ERR_ABORTED"));
setPwToolsCoreCurrentPage({
goto,
url: vi.fn(() => "https://example.com/aborted"),
});
await expect(
mod.navigateViaPlaywright({
cdpUrl: "http://127.0.0.1:18792",
targetId: "tab-1",
url: "https://example.com/aborted",
ssrfPolicy: { allowPrivateNetwork: true },
}),
).rejects.toThrow("net::ERR_ABORTED");
expect(getPwToolsCoreSessionMocks().forceDisconnectPlaywrightForTarget).not.toHaveBeenCalled();
expect(getPwToolsCoreSessionMocks().getPageForTargetId).toHaveBeenCalledTimes(1);
});
});