Skip to content

refactor(mcp): bind browser observation tools through the shared table - #11622

Merged
morluto merged 1 commit into
refactor/bind-frida-toolsfrom
refactor/bind-browser-tools
Nov 16, 2026
Merged

morluto merged 1 commit into
refactor/bind-frida-toolsfrom
refactor/bind-browser-tools

Conversation

@morluto

@morluto morluto commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Summary

Binds the eight browser observation tools (list_browser_targets, inspect_web_page, analyze_web_bundle, observe_web_session, discover_webmcp_tools, compare_web_captures, capture_web_screenshot, compare_web_screenshots) through the shared binding table instead of eight hand-written registerTool handlers. Stacked on #11621.

Problem and expected behavior

registerBrowserTools.ts called runEvidenceToolOperation once per tool to get one behavior the table lacked: when the optional browser provider failed to load, refuse every call as unavailable before admission. Expected: the table states that once per binding, and the loop owns it.

Change and scope

  • src/server/contractToolBindings.ts: Evidence bindings take unavailable?: OptionalProviderLoadFailure; when set, the loop registers a handler that refuses each call with optionalProviderUnavailable(failure, tool) before admission (the same result runEvidenceToolOperation delivered).
  • src/server/serviceToolBindings.ts: browserObservation group ({ browser, loadFailure }); analyze_web_bundle keeps its summary preflight and view projection. createServer.ts registers it with the same dependencies (analysis admission, session recording and lookup).
  • Removed src/server/registerBrowserTools.ts; baseline 8 sites removed.

Behavior visible to MCP clients: none expected. list_browser_targets now receives the request's progress reporter like the other browser tools (it previously received only the signal).

Not included: registerBrowserScenarioTool.ts (1 site), Electron (waits on D7), binary diagnostics; each still calls runEvidenceToolOperation and can move to unavailable later.

Contract and boundary impact

  • Semantic owner and earliest changed stage: MCP registration; the optional-provider refusal moves into the binding loop.
  • Contribution scope fit and linked maintainer decision: not applicable.
  • CLI and MCP/tool-catalog contract: schemas unchanged; CLI unchanged.
  • Provider, bridge, target-format, or platform compatibility: none.
  • Evidence, artifact, provenance, or reconstruction contract: unchanged.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): browser providers and their cleanup are unchanged.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: none.

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • optionalProviderIsolation.test.ts covers the load-failure refusal for list_browser_targets through createServer; browser, source-map cancellation, late-abort, partial-Evidence and bundle view/containment suites run unchanged.
  • Remaining proof gaps: no real browser run.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • npm run test:focused -- tests/boundary/mcp/observationPartialEvidenceDelivery.test.ts tests/boundary/mcp/browserMcp.test.ts tests/boundary/mcp/lateAbortApplicationEvidenceMcp.test.ts tests/boundary/mcp/browserSourceMapCancellationMcp.test.ts tests/boundary/mcp/optionalProviderIsolation.test.ts tests/boundary/mcp/webBundleContainmentMcp.test.ts tests/boundary/mcp/webBundleViewsMcp.test.ts tests/boundary/mcp/toolSchemaValidity.test.ts — 48 passed
  • node scripts/verify/architecture-guards.mjs --shrink-baselines — baseline lowered, passed
  • npm run check:fast — passed
  • npx oxfmt on changed files — clean

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: none run.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: none.

Author readiness

Human owner:

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

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-16T00:21:35.954503Z
We couldn’t complete this review. Comment @codex review to try again.
7754a4d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@greptile-apps

greptile-apps Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Low impact] The PR appears safe to merge based on the reviewed changes.

Summary

Moves eight browser observation tools into the shared binding table without changing their public contracts.

  • Browser observation tools now register through the shared binding table.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Browser service bindings] --> B[Shared registration loop]
  B --> C{Provider failed to load?}
  C -->|Yes| D[Return unavailable error]
  C -->|No| E[Admit analysis]
  E --> F[Run browser operation]
  F --> G[Record Evidence and deliver result]
Loading

Reviews (1) · Last reviewed commit: "refactor(mcp): bind browser observation ..." · Reviewed by Greptile

@morluto
morluto merged commit 55906a7 into refactor/bind-frida-tools Nov 16, 2026
2 checks passed
@morluto
morluto deleted the refactor/bind-browser-tools branch November 16, 2026 00:27
morluto added a commit that referenced this pull request Nov 16, 2026
…red table (#11621)

* refactor(mcp): bind Frida discovery and session tools through the shared table

* refactor(mcp): bind browser observation tools through the shared table (#11622)

* refactor(mcp): bind session record tools through the shared table (#11625)

* fix(mcp): record a completed provider-backed workflow's Evidence once before delivery

* refactor(mcp): bind Rizin debugger tools under external-mutation admission through the shared table (#11629)

* refactor(mcp): bind Rizin debugger tools under external-mutation admission through the shared table

* test(mcp): cancel a Rizin command during its retirement close, and route moved code to the reverse-tools lane
@morluto morluto added the area: mcp MCP server, transport, and tool registration label Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: mcp MCP server, transport, and tool registration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant