[PR #981] [MERGED] fix(cli): preserve output and comparison input validation #2551

Closed
opened 2026-10-17 21:07:29 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: codex/audit-wave3-cli


📝 Commits (4)

  • 020551c fix(cli): mirror consumed output flag values
  • 1755f9d fix(cli): reject malformed browser normalization JSON
  • 0ee00b4 Merge remote-tracking branch 'origin/main' into codex/audit-wave3-cli
  • bfc5068 style(cli): format browser input diagnostics

📊 Changes

4 files changed (+172 additions, -21 deletions)

View changed files

📝 src/cli/browserAdvancedCommands.ts (+35 -10)
📝 src/cliOutput.ts (+20 -11)
📝 tests/boundary/cli/browserCli.test.ts (+51 -0)
📝 tests/boundary/cli/cliOutput.test.ts (+66 -0)

📄 Description

What changed

The CLI output guard now follows the values Incur actually consumes for its built-in output flags. Empty and equals-style values no longer change output-format handling incorrectly, and recognized parser failures retain their JSON error reason instead of being truncated or misclassified.

compare-web-captures now distinguishes malformed JSON text from omitted/defaulted normalization. Malformed before, after, or supplied normalization JSON returns a field-specific invalid_format issue under the canonical compare_web_captures operation. Omitted normalization can still use its existing default, while valid caller-supplied policies remain in the comparison result. MCP receives structured inputs and is unaffected by this CLI text-parsing fix.

These changes preserve caller-selected values and comparison metadata; they do not infer sensitivity from argument names or text patterns.

Verification

  • npm run test:focused -- tests/boundary/cli/cliOutput.test.ts tests/boundary/cli/browserCli.test.ts — 11 production-dispatcher tests passed; focused runner built the project.
  • npm run check:fast — passed.
  • npm run format:check — passed.
  • No real browser provider workflow was claimed or run for the malformed-JSON validation case.

🔄 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/981 **Author:** [@morluto](https://github.com/morluto) **Created:** 10/7/2026 **Status:** ✅ Merged **Merged:** 10/7/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `codex/audit-wave3-cli` --- ### 📝 Commits (4) - [`020551c`](https://github.com/morluto/rea/commit/020551c014552c060f493a56237e4b323bdcdb4a) fix(cli): mirror consumed output flag values - [`1755f9d`](https://github.com/morluto/rea/commit/1755f9dda8852415c68d9a3f6275a1ee4b923005) fix(cli): reject malformed browser normalization JSON - [`0ee00b4`](https://github.com/morluto/rea/commit/0ee00b496307ddb15e4828ce9b109e5233ed96e0) Merge remote-tracking branch 'origin/main' into codex/audit-wave3-cli - [`bfc5068`](https://github.com/morluto/rea/commit/bfc5068d321098106999f64620a46195dfb6513c) style(cli): format browser input diagnostics ### 📊 Changes **4 files changed** (+172 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `src/cli/browserAdvancedCommands.ts` (+35 -10) 📝 `src/cliOutput.ts` (+20 -11) 📝 `tests/boundary/cli/browserCli.test.ts` (+51 -0) 📝 `tests/boundary/cli/cliOutput.test.ts` (+66 -0) </details> ### 📄 Description ## What changed The CLI output guard now follows the values Incur actually consumes for its built-in output flags. Empty and equals-style values no longer change output-format handling incorrectly, and recognized parser failures retain their JSON error reason instead of being truncated or misclassified. `compare-web-captures` now distinguishes malformed JSON text from omitted/defaulted normalization. Malformed before, after, or supplied normalization JSON returns a field-specific `invalid_format` issue under the canonical `compare_web_captures` operation. Omitted normalization can still use its existing default, while valid caller-supplied policies remain in the comparison result. MCP receives structured inputs and is unaffected by this CLI text-parsing fix. These changes preserve caller-selected values and comparison metadata; they do not infer sensitivity from argument names or text patterns. ## Verification - `npm run test:focused -- tests/boundary/cli/cliOutput.test.ts tests/boundary/cli/browserCli.test.ts` — 11 production-dispatcher tests passed; focused runner built the project. - `npm run check:fast` — passed. - `npm run format:check` — passed. - No real browser provider workflow was claimed or run for the malformed-JSON validation case. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:07:29 +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#2551
No description provided.