Repository navigation
feat(watchdog): rung-2 wedge probe — page renderer responsiveness (#10630) - #13015
Merged
Merged
Conversation
#10630) Rung 2 re-validated a CDP session using only browser-level signals: /json/version, /json/list, and Storage.getCookies over the browser websocket. A hung page renderer answers all three, so a wedged browser passed re-validation while every scrape kept failing — the silent shape of the 2026-11-13→16 outage. - cdpPageResponsive: sends a trivial Runtime.evaluate over the page target's own debugger websocket and bounds the wait; answering at all is the signal, the value is discarded. - pickAllowlistTarget: pure choice of the page-type allowlist target carrying a debugger websocket (background pages, workers, and off-origin pages never count as "the page is open"). - rung 2 now validates in layers (page open -> renderer answers -> cookies by name). A wedge triggers the same bounded supervised restart as a dead endpoint, followed by the FULL validation again; a restart that leaves the page hung is a failure, not a repair. Tests: new test/watchdog-wedge.test.ts — a wire oracle (fake CDP page websocket: answers / never replies / CDP error / dead endpoint) and a target-choice oracle. All four watchdog suites: 54 pass.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 49 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The code-owned CDP wedge probe for #10630, named as next slice (1) in Lane GF's landed record on PR #12965: a CDP-level check that the target page is responsive, not just that the port is listening — plus restart-and-revalidate on wedge.
The gap
Rung 2 (the repair rung for
browser-down/cdp-unreachable) validated a session using only browser-level signals:/json/version,/json/list, andStorage.getCookiesover the browser websocket. A hung page renderer answers all three, so a wedged browser passed re-validation as "succeeded" while every scrape kept failing — the silent shape of the 2026-11-13→16 outage.Change (
pm-stack/exporters/src/watchdog.ts)cdpPageResponsive(wsUrl, timeoutMs)— sends a trivialRuntime.evaluateover the page target's own debugger websocket and bounds the wait. The reply value is discarded; answering at all is the signal. Error replies, dead endpoints, and silence all read unresponsive with a named detail; nothing throws.pickAllowlistTarget(targets, origins)— pure choice of the page-type allowlist target carrying a debugger websocket. Background pages, workers, and off-origin pages never count as "the page is open"; an allowlist page with no debugger websocket is now an honest failure ("cannot probe it") instead of a silent pass.Verification
test/watchdog-wedge.test.ts(8 tests): a wire oracle — a fake CDP page websocket that answers / never replies (hung-renderer shape) / replies with a CDP error / is a dead endpoint — and a target-choice oracle forpickAllowlistTarget.Scope honesty
Refs #10630 — the issue stays open. Remaining there: the Mistral gatherer failure classification (
session-expiredvscdp-unavailable, etc.), which is OpenChamber-side per the 2026-11-22 decision, not this repo.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.