[PR #2263] [CLOSED] fix(browser): preserve the declared consequential hint in WebMCP discovery #5125

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2263
Author: @aznikline
Created: 10/12/2026
Status: ❌ Closed

Base: main ← Head: fix/webmcp-annotations


📝 Commits (9)

  • 449c58a fix(browser): preserve the declared consequential hint in WebMCP discovery
  • 354ec7c docs(browser): qualify WebMCP trial/flag prerequisites and hint semantics
  • 273286f fix(browser): retain WebMCP annotation uncertainty
  • cf136ee test(browser): cover consequential hint comparison uncertainty
  • b1c6f3f fix(browser): remove duplicate comparison coverage during main sync
  • 6313398 fix(ci): isolate Linux Hopper process fixture inventory
  • 3e73f94 chore: merge main into PR #2263
  • 5a35249 Merge commit '8fef2aa64e' into codex/ci-wave3-2263
  • aec3226 Merge branch 'main' into fix/webmcp-annotations

📊 Changes

10 files changed (+378 additions, -78 deletions)

View changed files

📝 docs/browser-observation.md (+31 -1)
📝 src/browser/CdpWebMcpDiscovery.ts (+22 -6)
📝 src/domain/webCaptureDiff.ts (+46 -12)
➕ src/domain/webMcpDiscovery.test.ts (+128 -0)
📝 src/domain/webMcpDiscovery.ts (+3 -0)
📝 tests/boundary/browser/cdpBrowserProvider.document_script.test.ts (+71 -55)
📝 tests/boundary/browser/webCaptureDiff.test.ts (+57 -0)
📝 tests/boundary/cli/browserCli.test.ts (+8 -1)
📝 tests/fixtures/fakeCdpBrowserEvents.ts (+11 -3)
📝 tests/fixtures/fakeCdpBrowserTypes.ts (+1 -0)

📄 Description

Summary

  • The CDP WebMCP.Annotation type carries an optional consequential boolean; normalizeTool dropped it, so the declared hint never reached Evidence.
  • Surface consequential in webMcpToolSchema.annotations as z.boolean().nullable().optional(): true/false are declared values, null means the declaration did not provide the hint, and a missing key keeps older captures parseable in compare_web_captures (same pattern as effective_url).
  • Update docs/browser-observation.md: WebMCP discovery prerequisites (origin-trial conditions vs WebMCPTesting flag, attach-only/no-navigation semantics) and the annotation value semantics.
  • Known gap (unchanged behavior, documented): a protocol debugging hint exists on Chromium main (JS-visible from Chrome ~156) and is not surfaced; nothing is claimed about it.

Test plan

  • src/domain/webMcpDiscovery.test.ts — declared true/false/null, historical capture missing the key, createEvidenceBundle → serialize → parse round-trip
  • cdpBrowserProvider.document_script.test.ts, browserCli.test.ts — provider and CLI Evidence paths; vitest --maxWorkers=4 pass
  • npx tsc --noEmit, oxlint, verify:module-boundaries clean
  • Real-provider check (Chrome 154, attached CDP): zapier.com declared consequential: false; value survived inspect-evidence-bundle re-read and evidence-export canonical re-encode (Evidence ev_e451abd5…)

Scope note

Passive discovery only — no WebMCP.invokeTool, no page evaluation, no navigation is added.

Generated with Devin


🔄 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/2263 **Author:** [@aznikline](https://github.com/aznikline) **Created:** 10/12/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/webmcp-annotations` --- ### 📝 Commits (9) - [`449c58a`](https://github.com/morluto/rea/commit/449c58a3732bbdfb6afead48f76a8194dfa10412) fix(browser): preserve the declared consequential hint in WebMCP discovery - [`354ec7c`](https://github.com/morluto/rea/commit/354ec7cee092e9c5c62ac8827a1bdf610feb8655) docs(browser): qualify WebMCP trial/flag prerequisites and hint semantics - [`273286f`](https://github.com/morluto/rea/commit/273286fee19885799af135961aeb8dda18c82e3e) fix(browser): retain WebMCP annotation uncertainty - [`cf136ee`](https://github.com/morluto/rea/commit/cf136ee3b25d33b42d38f2b25cbb57c609a051aa) test(browser): cover consequential hint comparison uncertainty - [`b1c6f3f`](https://github.com/morluto/rea/commit/b1c6f3f43639f2077540c0e4cde86f4736db7425) fix(browser): remove duplicate comparison coverage during main sync - [`6313398`](https://github.com/morluto/rea/commit/6313398913238c3bf8480d78f3d1599aae70916c) fix(ci): isolate Linux Hopper process fixture inventory - [`3e73f94`](https://github.com/morluto/rea/commit/3e73f945a239e7d08f3f789bcb48a0c59d978a1a) chore: merge main into PR #2263 - [`5a35249`](https://github.com/morluto/rea/commit/5a35249f2b5c582639c82ac6da184c3bd9f51535) Merge commit '8fef2aa64ec1ee742e8b70b825938d30a0ea7319' into codex/ci-wave3-2263 - [`aec3226`](https://github.com/morluto/rea/commit/aec3226efa26e0e1f9eace1c1428ee08cd01b57e) Merge branch 'main' into fix/webmcp-annotations ### 📊 Changes **10 files changed** (+378 additions, -78 deletions) <details> <summary>View changed files</summary> 📝 `docs/browser-observation.md` (+31 -1) 📝 `src/browser/CdpWebMcpDiscovery.ts` (+22 -6) 📝 `src/domain/webCaptureDiff.ts` (+46 -12) ➕ `src/domain/webMcpDiscovery.test.ts` (+128 -0) 📝 `src/domain/webMcpDiscovery.ts` (+3 -0) 📝 `tests/boundary/browser/cdpBrowserProvider.document_script.test.ts` (+71 -55) 📝 `tests/boundary/browser/webCaptureDiff.test.ts` (+57 -0) 📝 `tests/boundary/cli/browserCli.test.ts` (+8 -1) 📝 `tests/fixtures/fakeCdpBrowserEvents.ts` (+11 -3) 📝 `tests/fixtures/fakeCdpBrowserTypes.ts` (+1 -0) </details> ### 📄 Description ## Summary - The CDP `WebMCP.Annotation` type carries an optional `consequential` boolean; `normalizeTool` dropped it, so the declared hint never reached Evidence. - Surface `consequential` in `webMcpToolSchema.annotations` as `z.boolean().nullable().optional()`: `true`/`false` are declared values, `null` means the declaration did not provide the hint, and a missing key keeps older captures parseable in `compare_web_captures` (same pattern as `effective_url`). - Update `docs/browser-observation.md`: WebMCP discovery prerequisites (origin-trial conditions vs `WebMCPTesting` flag, attach-only/no-navigation semantics) and the annotation value semantics. - Known gap (unchanged behavior, documented): a protocol `debugging` hint exists on Chromium main (JS-visible from Chrome ~156) and is not surfaced; nothing is claimed about it. #### Test plan - [x] `src/domain/webMcpDiscovery.test.ts` — declared true/false/null, historical capture missing the key, `createEvidenceBundle` → serialize → parse round-trip - [x] `cdpBrowserProvider.document_script.test.ts`, `browserCli.test.ts` — provider and CLI Evidence paths; `vitest --maxWorkers=4` pass - [x] `npx tsc --noEmit`, `oxlint`, `verify:module-boundaries` clean - [x] Real-provider check (Chrome 154, attached CDP): zapier.com declared `consequential: false`; value survived `inspect-evidence-bundle` re-read and `evidence-export` canonical re-encode (Evidence `ev_e451abd5…`) #### Scope note Passive discovery only — no `WebMCP.invokeTool`, no page evaluation, no navigation is added. Generated with [Devin](https://devin.ai) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:04:10 +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#5125
No description provided.