[PR #3467] [CLOSED] test(browser): cover WebMCP cleanup outcomes #5758

Closed
opened 2026-10-31 01:09:12 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3467
Author: @maxazure
Created: 10/14/2026
Status: ❌ Closed

Base: main ← Head: fix/webmcp-domain-cleanup-3193


📝 Commits (2)

  • 89ae8da fix(browser): disable WebMCP before releasing discovery sessions
  • 08ee0e9 Merge upstream WebMCP cleanup and retain regression coverage

📊 Changes

2 files changed (+35 additions, -1 deletions)

View changed files

📝 tests/boundary/browser/cdpBrowserProvider.document_script.test.ts (+34 -1)
📝 tests/fixtures/fakeCdpBrowserResults.ts (+1 -0)

📄 Description

Summary

Keep independent WebMCP teardown regression coverage after the production fix landed on main in 57a23f0a2d. Related: #3193 (already resolved upstream).

Changes

Merged main bb49252523 without rewriting history. Production code now matches that main revision, including its shared cleanup-domain policy. The remaining diff only:

  • models a successful WebMCP.disable reply in the simulated CDP fixture;
  • checks that sockets close after successful discovery;
  • checks teardown when the experimental domain is unavailable;
  • preserves discovered tools and detaches when WebMCP.disable returns an explicit error.

Removed the superseded per-operation cleanup parameter and the incompatible assertion that unrelated operations never attempt WebMCP.disable. Existing upstream success-path ordering assertions are retained.

Validation

Exact published tree b1cc2144af, Linux cloud, Node 24.18.0 / npm 11.16.0:

  • 46 tests passed across the document/script/WebMCP, lifecycle/cancellation and browser-socket suites.
  • npm run check:fast and npm run check passed.
  • npm run verify:test-discovery passed: 1,298 files.
  • git diff --check passed.
  • A temporary wire-protocol fixture probe received {} for WebMCP.disable; removing its fixture case produced -32601 Method not found. The probe was not included in the PR.

Published through the GitHub connector with a tree identical to the validated local merge tree. Current-head CI completed successfully on 2026-10-14: 13 successful checks and 19 skipped, no failures. Tests use a simulated CDP peer; real Chrome and WebMCP-specific hanging-disable behavior were not exercised. This is test coverage for an existing fix, not a claim of a new production defect.

Author readiness

Human owner: @maxazure

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

The owner confirmed personal review of this revised test-only scope on 2026-10-15.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/3467 **Author:** [@maxazure](https://github.com/maxazure) **Created:** 10/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/webmcp-domain-cleanup-3193` --- ### 📝 Commits (2) - [`89ae8da`](https://github.com/morluto/rea/commit/89ae8da28b66dbbfc5f303b61eb2a44db5fd35a8) fix(browser): disable WebMCP before releasing discovery sessions - [`08ee0e9`](https://github.com/morluto/rea/commit/08ee0e9869735899976dea664dd92bc4c211bfc7) Merge upstream WebMCP cleanup and retain regression coverage ### 📊 Changes **2 files changed** (+35 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tests/boundary/browser/cdpBrowserProvider.document_script.test.ts` (+34 -1) 📝 `tests/fixtures/fakeCdpBrowserResults.ts` (+1 -0) </details> ### 📄 Description ## Summary Keep independent WebMCP teardown regression coverage after the production fix landed on main in 57a23f0a2da0fdc3835e203718ded8acea5a34e6. Related: #3193 (already resolved upstream). ## Changes Merged main bb49252523d13c48e6d3fb7c4cfd5f95400fcd53 without rewriting history. Production code now matches that main revision, including its shared cleanup-domain policy. The remaining diff only: - models a successful WebMCP.disable reply in the simulated CDP fixture; - checks that sockets close after successful discovery; - checks teardown when the experimental domain is unavailable; - preserves discovered tools and detaches when WebMCP.disable returns an explicit error. Removed the superseded per-operation cleanup parameter and the incompatible assertion that unrelated operations never attempt WebMCP.disable. Existing upstream success-path ordering assertions are retained. ## Validation Exact published tree b1cc2144afa665fcab63f8be3414a0e239683241, Linux cloud, Node 24.18.0 / npm 11.16.0: - 46 tests passed across the document/script/WebMCP, lifecycle/cancellation and browser-socket suites. - npm run check:fast and npm run check passed. - npm run verify:test-discovery passed: 1,298 files. - git diff --check passed. - A temporary wire-protocol fixture probe received {} for WebMCP.disable; removing its fixture case produced -32601 Method not found. The probe was not included in the PR. Published through the GitHub connector with a tree identical to the validated local merge tree. [Current-head CI](https://github.com/morluto/rea/actions/runs/38646503849) completed successfully on 2026-10-14: 13 successful checks and 19 skipped, no failures. Tests use a simulated CDP peer; real Chrome and WebMCP-specific hanging-disable behavior were not exercised. This is test coverage for an existing fix, not a claim of a new production defect. ## Author readiness Human owner: @maxazure - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. The owner confirmed personal review of this revised test-only scope on 2026-10-15. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:09:12 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#5758
No description provided.