Skip to content

fix(mcp): normalize browser scenario input errors - #4661

Merged
morluto merged 1 commit into
morluto:mainfrom
gongfpp:fix/mcp-browser-scenario-input-diagnostic
Oct 17, 2026
Merged

morluto merged 1 commit into
morluto:mainfrom
gongfpp:fix/mcp-browser-scenario-input-diagnostic

Conversation

@gongfpp

@gongfpp gongfpp commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #4636

Summary

  • Normalize MCP browser-scenario validation failures into the canonical typed AnalysisInputError instead of returning raw Zod issues.
  • Reuse the shared input-issue projection in the CLI path to keep both adapters aligned.
  • Add real stdio MCP coverage for undeclared secret references and duplicate action IDs, including canonical paths/remediation, CLI parity, and a successful post-error ping.

Validation on current main

  • npm run test:focused -- tests/boundary/mcp/browserScenarioInputDiagnosticsMcp.test.ts tests/boundary/cli/scenarioCliInputDiagnostics.test.ts — passed (6 tests).
  • npm run test:acceptance -- --run tests/acceptance/providers/jebConfigurationIsolation.test.ts — passed (2 tests); current main includes the Linux PATH prerequisite fix for this test.
  • npm run check and npm run check:fast pre-push hook — passed.

Base sync

  • Main already includes the JEB isolation test Linux PATH fix, so the PR drops its redundant changes to tests/acceptance/providers/jebConfigurationIsolation.test.ts.
  • Current PR base is main at 79d2b718. GitHub reports a clean merge state; git merge-tree against current upstream/main also reports no conflicts. The PR diff is limited to the MCP/CLI normalization and its MCP regression test.

CI status

  • Fresh CI run 39014596478 passed: source tests, static checks, package build, Portable tests, all five test shards, native package checks, bundled Windows controls, and CI required.
  • Greptile Review and Conventional PR title checks passed. Classifier-designated optional lanes were skipped.

Author readiness

  • I reviewed the final diff and relevant existing code.
  • I verified the change and validation evidence.
  • This PR is ready for initial maintainer review.

@gongfpp
gongfpp marked this pull request as ready for review October 17, 2026 03:07
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-17T03:07:37.038651Z 3e3f55d Draft marked ready
ℹ️ 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

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@greptile-apps

greptile-apps Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable defects were found.

Summary

The PR turns browser-scenario validation failures into the shared AnalysisInputError response.

  • Browser scenario errors now use the same diagnostics in MCP and the CLI.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Browser scenario input] --> B{Schema accepts input?}
  B -->|No| C[Shared AnalysisInputError helper]
  C --> D[CLI or MCP error response]
  B -->|Yes| E[Existing browser capture flow]
Loading

Reviews (6) · Last reviewed commit: "fix(mcp): normalize browser scenario inp..." · Reviewed by Greptile

@gongfpp
gongfpp force-pushed the fix/mcp-browser-scenario-input-diagnostic branch from 4c86f19 to 102ac30 Compare October 17, 2026 03:54
@gongfpp
gongfpp force-pushed the fix/mcp-browser-scenario-input-diagnostic branch from 0fa4655 to 6f2fc0f Compare October 17, 2026 07:41
@morluto
morluto merged commit 5a7e8a1 into morluto:main Oct 17, 2026
36 checks passed
@morluto

morluto commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Thank you, @gongfpp, for giving browser-scenario input failures the same typed error shape across MCP and CLI. The undeclared-secret and duplicate-action cases now have a clear path to correction, while the MCP session remains usable after an error.

@morluto morluto added area: mcp MCP server, transport, and tool registration bug Something isn't working labels Nov 23, 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 bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] MCP browser scenario validation omits the typed input-error diagnostic

2 participants