[PR #4661] [MERGED] fix(mcp): normalize browser scenario input errors #6346

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4661
Author: @gongfpp
Created: 10/17/2026
Status: ✅ Merged
Merged: 10/17/2026
Merged by: @morluto

Base: main ← Head: fix/mcp-browser-scenario-input-diagnostic


📝 Commits (1)

  • 6f2fc0f fix(mcp): normalize browser scenario input errors

📊 Changes

3 files changed (+149 additions, -5 deletions)

View changed files

📝 src/cliBrowserScenarioCommands.ts (+4 -4)
📝 src/server/registerBrowserScenarioTool.ts (+15 -1)
➕ tests/boundary/mcp/browserScenarioInputDiagnosticsMcp.test.ts (+130 -0)

📄 Description

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.

🔄 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/4661 **Author:** [@gongfpp](https://github.com/gongfpp) **Created:** 10/17/2026 **Status:** ✅ Merged **Merged:** 10/17/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/mcp-browser-scenario-input-diagnostic` --- ### 📝 Commits (1) - [`6f2fc0f`](https://github.com/morluto/rea/commit/6f2fc0fc59eb7a9f4815222e24bdc7cd2fb56a60) fix(mcp): normalize browser scenario input errors ### 📊 Changes **3 files changed** (+149 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `src/cliBrowserScenarioCommands.ts` (+4 -4) 📝 `src/server/registerBrowserScenarioTool.ts` (+15 -1) ➕ `tests/boundary/mcp/browserScenarioInputDiagnosticsMcp.test.ts` (+130 -0) </details> ### 📄 Description 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](https://github.com/morluto/rea/actions/runs/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 - [x] I reviewed the final diff and relevant existing code. - [x] I verified the change and validation evidence. - [x] This PR is ready for initial maintainer review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:13:45 +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#6346
No description provided.