Skip to content

fix(browser): make extension deep doctor probe page snapshots - #118361

Closed
clawsweeper[bot] wants to merge 1 commit into
mainfrom
clawsweeper/issue-openclaw-openclaw-116747
Closed

clawsweeper[bot] wants to merge 1 commit into
mainfrom
clawsweeper/issue-openclaw-openclaw-116747

Conversation

@clawsweeper

@clawsweeper clawsweeper Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Fixes #116747.

What this changes

  • Makes browser doctor --deep exercise extension profiles through the existing snapshotAriaViaPlaywright flow when no per-tab CDP WebSocket is available.
  • Preserves the 15-second extension relay deadline while making timed-out forwarded CDP commands identify their routed tab and CDP method.

Why

Transport readiness and tab enumeration can succeed while a page-level extension relay command stalls. The deep diagnostic must probe that page-command path and return a failure summary that operators can act on.

Scope

This is a browser-plugin-only repair. It adds no configuration, retries, fallback connection path, ordinary doctor readiness change, or changelog edit.

Thanks to @RothElektronik for the reported reproduction in #116747. #113921 remains historical context for a separate established-connection enumeration fix; #113955 remains a distinct cold-connect issue.

@clawsweeper clawsweeper Bot added clawsweeper Tracked by ClawSweeper automation clawsweeper:autogenerated PR created automatically by ClawSweeper clawsweeper:autofix Maintainer opted this PR into bounded ClawSweeper-reviewed autofix without merge labels Aug 3, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P1 High-priority user-facing bug, regression, or broken workflow. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor Author

Codex review: needs changes before merge.

What this changes

This PR adds extension-backed page snapshots to deep browser diagnostics and identifies the tab and CDP method in relay timeout errors.

Example: Tab 7 stops answering Accessibility.getFullAXTree while the extension relay remains connected.

  • Before: The deep diagnostic skips page capture when no per-tab WebSocket exists, and relay timeouts identify only cdp.
  • After: The diagnostic attempts page capture, and the relay timeout identifies tabId=7 and method=Accessibility.getFullAXTree.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful diagnostic work remains, but the confirmed reference-state regression blocks merge.
Proof confidence 🌊 off-meta tidepool Not applicable: The ordinary contributor-proof gate is exempt for this bot-authored PR; inspected route and relay tests use mocked snapshots and sockets, and evidence on the closed related PR does not validate this head.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Partial
User problem: Deep browser diagnostics can skip the page-command path while transport readiness appears healthy.
Reason: The diagnostic improvement has clear value, but it does not establish a repair for the underlying renderer or CDP stall described in the linked report.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Needs changes before merge - 2 items remain

Keep open: this PR addresses a diagnostic gap still present on main, but its successful probe overwrites active action references.

Priority: P2
Reviewed head: 2532feb490cb7b4e05df868ec4296a0364484b2a

Before merge

  • Preserve active action references during the doctor probe (P2) - After an agent snapshot returns e1 for this tab, a successful deep-doctor call invokes snapshotAriaViaPlaywright, which publishes its 25-node ax reference map, clears existing DOM markers, and changes the page’s reference mode to role. A subsequent action using e1 then fails with Unknown ref even though the page did not change. Current main’s renamed publication helper retains this side effect. Use capture-only behavior that leaves reference state and markers intact. This concern was discovered late in earlier reviews of the same unchanged head and remains unresolved.
  • Complete next step - Resolve the reported merge conflicts against current main while preserving its validated-endpoint and cancellation safeguards.

Findings

  • [P2] Preserve active action references during the doctor probe — extensions/browser/src/browser/routes/basic.ts:294-299

Tests

  • Missing end-to-end proof: The added tests do not exercise successful snapshot–doctor–act ordering or delayed failure through the direct doctor client; no base/head execution was performed in this read-only review.
Agent review details

How this fits together

Browser doctor selects a profile and tab, probes page accessibility through direct CDP or Playwright and the extension relay, and returns a health report.

flowchart TD
 A[Deep doctor request] --> B[Profile and tab selection]
 B --> C[Direct CDP capture]
 B --> D[Playwright capture]
 D --> E[Extension relay and Chrome]
 C --> F[Doctor report]
 E --> F
 D --> G[Action reference cache]
Loading

Technical review

Best possible solution:

Use capture-only diagnostics that preserve action references and main’s cancellation safeguards while returning target-specific failures within the caller’s budget.

Do we have a high-confidence way to reproduce the issue?

Source establishes the failure sequence: obtain an agent snapshot containing e1, call /doctor?deep=true on the same extension tab, then act using e1; the probe replaces the reference map and refLocator throws Unknown ref.

Is this the best way to solve the issue?

This is the right diagnostic owner but not the best implementation: reuse accessibility capture without its reference-publication side effects; retries or broader readiness checks would not repair that boundary.

Full review comments:

  • [P2] Preserve active action references during the doctor probe — extensions/browser/src/browser/routes/basic.ts:294-299
    After an agent snapshot returns e1 for this tab, a successful deep-doctor call invokes snapshotAriaViaPlaywright, which publishes its 25-node ax reference map, clears existing DOM markers, and changes the page’s reference mode to role. A subsequent action using e1 then fails with Unknown ref even though the page did not change. Current main’s renamed publication helper retains this side effect. Use capture-only behavior that leaves reference state and markers intact. This concern was discovered late in earlier reviews of the same unchanged head and remains unresolved.
    Confidence: 0.99
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against ff908fed3f95.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +14, Tests +96. Total +110 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 27 13 +14
Tests 2 97 1 +96
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 124 14 +110

Review metrics

Metric Value Why it matters
Production versus test LOC Production +27/-13, net +14; tests +97/-1, net +96 Production growth provides the missing page diagnostic and routed timeout context; successful reference preservation remains uncovered.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #116747
Summary: This PR addresses the diagnostic portion of the linked page-command report; cold connection hangs remain distinct.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: A useful, bounded browser diagnostic improvement has a concrete interaction-state regression.
  • merge-risk: 🚨 session-state: A successful diagnostic replaces the selected tab’s active action-reference map.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🌊 off-meta tidepool and patch quality is 🦪 silver shellfish.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (13 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-08T03:54:15.051Z sha 2532feb :: needs changes before merge. :: [P1] Let deep-doctor callers receive the relay diagnostic
  • reviewed 2026-08-19T14:45:13.732Z sha 2532feb :: needs changes before merge. :: [P1] Let deep-doctor callers receive the relay diagnostic
  • reviewed 2026-08-23T12:13:28.195Z sha 2532feb :: found issues before merge. :: [P1] Align deep-doctor deadlines with the extension relay
  • reviewed 2026-08-29T12:33:28.452Z sha 2532feb :: found issues before merge. :: [P1] Align deep-doctor deadlines with the extension relay
  • reviewed 2026-08-29T13:00:44.395Z sha 2532feb :: needs changes before merge. :: [P1] Align deep-doctor deadlines with the extension relay
  • reviewed 2026-08-29T18:29:35.801Z sha 2532feb :: needs changes before merge. :: [P1] Keep the deep probe within its caller deadline
  • reviewed September 5, 2026, 4:16 PM ET / 20:16 UTC sha unknown :: blocked before merge. :: [P1] Keep the deep probe within its caller deadline | [P2] Preserve active action references during the doctor probe
  • reviewed 2026-10-02T15:34:30.896Z sha 2532feb :: blocked before merge. :: [P2] Preserve active action references during the doctor probe

Reviewed October 17, 2026, 12:24 PM ET / 16:24 UTC (Revision 14).

@clawsweeper clawsweeper Bot added the clawsweeper:human-review Needs maintainer review before ClawSweeper can continue label Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor Author

🦞✅
ClawSweeper is pausing this repair loop for human review.

Source: clawsweeper[bot]
Reason: - [ ] Preserve active action references during the doctor probe (P2) - A successful call also publishes its 25-node ax* reference map and changes the cached page’s reference mode to role. After an agent snapshot, ru...; Review finding: [P2] Preserve active action references during the doctor probe — extensions/browser/src/browser/routes/basic.ts:294-299 (sha=2532feb490cb7b4e05df868ec4296a0364484b2a)

Why human review is needed:
ClawSweeper found a blocker that should be resolved or accepted by a maintainer before the repair or automerge loop continues.

What the maintainer can do as a next step:
If the maintainer accepts the current risk and wants ClawSweeper to continue merge gates, comment @clawsweeper approve. If more work is needed, resolve the blocker first, then comment @clawsweeper automerge to re-review and continue. If automation should stay paused, leave clawsweeper:human-review in place or comment @clawsweeper stop.

I added clawsweeper:human-review and left the final call with a maintainer.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 4, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 19, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. and removed P1 High-priority user-facing bug, regression, or broken workflow. labels Sep 5, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Oct 14, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 17, 2026
@openclaw-barnacle

Copy link
Copy Markdown

Closing due to inactivity.
If you believe this PR should be revived, post in #clawtributors on Discord to talk to a maintainer.
That channel is the escape hatch for high-quality PRs that get auto-closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:autofix Maintainer opted this PR into bounded ClawSweeper-reviewed autofix without merge clawsweeper:autogenerated PR created automatically by ClawSweeper clawsweeper:human-review Needs maintainer review before ClawSweeper can continue clawsweeper Tracked by ClawSweeper automation merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: S stale Marked as stale due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Extension relay healthy per doctor, but CDP page commands (extract/snapshot/evaluate) time out

0 participants