Skip to content

fix(browser): require exact WebMCP receiver segments - #4279

Closed
geekwolf wants to merge 1 commit into
morluto:mainfrom
geekwolf:fix/webmcp-receiver-boundary
Closed

geekwolf wants to merge 1 commit into
morluto:mainfrom
geekwolf:fix/webmcp-receiver-boundary

Conversation

@geekwolf

@geekwolf geekwolf commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Upstream integration update — 2026-10-16

Main already includes the fix in 38f92d108e3148cdf47e4ffbfe3de8a76e795d51, referencing #4205 and this PR, with Geekwolf credited as co-author. Its AST-segment implementation additionally rejects dotted-key collisions. Replaying this draft's older suffix-based implementation over it would lose that stronger boundary, so no replacement code push is proposed.

Verified upstream main 808339f0b1cf3837445f392b5d5f1f362d64a27d on Windows x64 with Node 24.18.0 / npm 11.16.0: all 39 analyzer tests and the compiled WebMCP CLI regression passed. The CLI uses a simulated CDP producer and checks retained source and receiver collisions; this does not establish real Chrome or runtime WebMCP behavior. This PR remains open/draft; code integration is not a GitHub merge of this PR. The original proposal and its historical verification follow.


Summary

Fixes #4205. Static WebMCP extraction no longer treats foobar_modelContext.registerTool as a declaration. Bare modelContext and exact nested member segments remain supported, including existing optional/literal-computed forms.

Change and scope

Require the receiver segment boundary in the owning captured-source classifier. No alias inference, source execution, API/schema change or new provider capability. Captured source and the page-declared-untrusted classification are retained. Maintainer capability-scope decision: not applicable to this bounded correction.

Evidence and validation

  • On main 93c620c3, the new regression failed with two false suffix declarations; the other 38 analyzer tests passed.
  • After the fix, 39 analyzer tests and one compiled CLI workflow passed. The CLI exercises real HTTP/WebSocket transport with a simulated CDP producer, checks four accepted and four rejected source forms, retained exact source and closed connections. This does not establish real Chrome or runtime WebMCP behavior.
  • check:fast, verify:test-discovery (1,388 files), staged formatting/lint and git diff --check passed. Invoked with Node 24.18.0 / npm 11.16.0 on Windows x64.
  • npm run check stopped on an existing formatting issue in unchanged src/adb/AdbProvider.ts; the complete check is not claimed. Full CI remains required.

Author readiness

Human owner: @geekwolf

  • 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.

morluto added a commit that referenced this pull request Oct 16, 2026
Inspect AST property segments instead of flattened suffixes. Reject dotted-key and suffix collisions while retaining page-declared trust and source evidence through the CLI.

Refs: #4205, #4279

Co-authored-by: Geekwolf <[email protected]>
@geekwolf geekwolf closed this Oct 16, 2026
@morluto morluto added bug Something isn't working area: runtime Process capture and runtime observation labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: runtime Process capture and runtime observation bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Receiver name suffix creates a false static WebMCP declaration

2 participants