[PR #2294] [MERGED] fix(cli): retain correction details across adjacent browser commands #5146

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

📋 Pull Request Information

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

Base: main ← Head: fix/browser-diagnostics-followup-2230


📝 Commits (3)

  • c1c4a6f fix(cli): retain correction details across browser commands
  • 898b086 fix(browser): retain diagnostics from the selected input branch
  • e41cf3d fix(cli): recognize incomplete browser scenarios by their owned fields

📊 Changes

5 files changed (+269 additions, -23 deletions)

View changed files

📝 src/cli/browserAdvancedCommands.ts (+41 -17)
📝 src/domain/browserObservation.ts (+12 -5)
📝 tests/boundary/cli/browserCli.test.ts (+114 -1)
📝 tests/boundary/cli/browserInputDiagnostics.test.ts (+73 -0)
📝 tests/boundary/mcp/toolSchemaValidity.test.ts (+29 -0)

📄 Description

After #2230, invalid inputs to adjacent browser commands could still lose the correction details produced by their contracts. Preserve those details for discover-webmcp-tools, compare-web-captures, and capture-web-screenshot.

Scenario comparisons now select their named input contract from schema-owned capture fields, preserving normalization policy errors and missing or misspelled scenario-manifest diagnostics instead of replacing them with passive-capture fallback errors. Passive snapshots retain compatibility with extra caller metadata. Inspection selects its schema branch from include_script_sources, so an invalid endpoint produces only the endpoint correction. Omitted flags still default to false for inspection and true for bundle analysis.

#2230 was squash-merged first, preserving @369Apps's original contribution. This follow-up incorporates @chqcjq's adjacent fixes from #2247 with coauthor credit. It replaces the previous fork-target contribution PR, 369Apps/rea#1, and addresses the two subsequent browser diagnostics review threads.

Validation: 42 tests passed across six CLI/MCP boundary suites, including invalid normalization policies, malformed captures, endpoint diagnostics, and actual SDK-advertised schema acceptance/default parity. The two CLI suites also passed after the missing/misspelled manifest regressions were added (23 tests). npm run check and npm run docs:check passed. Standards and Spec reviews found no remaining actionable findings. Browser workflow verification uses the fake CDP fixture; this patch makes no new real-browser/provider claims.

Refs #2180, #2230, #2247.


🔄 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/2294 **Author:** [@morluto](https://github.com/morluto) **Created:** 10/12/2026 **Status:** ✅ Merged **Merged:** 10/12/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/browser-diagnostics-followup-2230` --- ### 📝 Commits (3) - [`c1c4a6f`](https://github.com/morluto/rea/commit/c1c4a6f4b46684cea465e68bee1ce682c1bacc32) fix(cli): retain correction details across browser commands - [`898b086`](https://github.com/morluto/rea/commit/898b086e54b3a32ec97e62d32f7fe47b1893e020) fix(browser): retain diagnostics from the selected input branch - [`e41cf3d`](https://github.com/morluto/rea/commit/e41cf3df3710e870f0f664d4b26c126f9cc60458) fix(cli): recognize incomplete browser scenarios by their owned fields ### 📊 Changes **5 files changed** (+269 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `src/cli/browserAdvancedCommands.ts` (+41 -17) 📝 `src/domain/browserObservation.ts` (+12 -5) 📝 `tests/boundary/cli/browserCli.test.ts` (+114 -1) 📝 `tests/boundary/cli/browserInputDiagnostics.test.ts` (+73 -0) 📝 `tests/boundary/mcp/toolSchemaValidity.test.ts` (+29 -0) </details> ### 📄 Description After #2230, invalid inputs to adjacent browser commands could still lose the correction details produced by their contracts. Preserve those details for `discover-webmcp-tools`, `compare-web-captures`, and `capture-web-screenshot`. Scenario comparisons now select their named input contract from schema-owned capture fields, preserving normalization policy errors and missing or misspelled scenario-manifest diagnostics instead of replacing them with passive-capture fallback errors. Passive snapshots retain compatibility with extra caller metadata. Inspection selects its schema branch from `include_script_sources`, so an invalid endpoint produces only the endpoint correction. Omitted flags still default to false for inspection and true for bundle analysis. #2230 was squash-merged first, preserving @369Apps's original contribution. This follow-up incorporates @chqcjq's adjacent fixes from #2247 with coauthor credit. It replaces the previous fork-target contribution PR, 369Apps/rea#1, and addresses the two subsequent browser diagnostics review threads. Validation: 42 tests passed across six CLI/MCP boundary suites, including invalid normalization policies, malformed captures, endpoint diagnostics, and actual SDK-advertised schema acceptance/default parity. The two CLI suites also passed after the missing/misspelled manifest regressions were added (23 tests). `npm run check` and `npm run docs:check` passed. Standards and Spec reviews found no remaining actionable findings. Browser workflow verification uses the fake CDP fixture; this patch makes no new real-browser/provider claims. Refs #2180, #2230, #2247. --- <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:20 +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#5146
No description provided.