[PR #4823] [MERGED] fix(cli): preserve spaced output flag values #6425

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

📋 Pull Request Information

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

Base: main ← Head: codex/fix-valued-output-argument


📝 Commits (6)

  • 9b868f0 fix(cli): preserve spaced output flag values
  • 0ccd0e6 docs(readme): fix French heading spacing
  • a9aab54 Merge branch 'codex/fix-french-readme-format' into codex/fix-valued-output-argument
  • 2bbb299 fix(ci): retain portable build cache until snapshot upload
  • beb1064 test(browser): assert composed Electron cleanup failures
  • 34e3477 fix(cli): resolve output argument merge conflicts

📊 Changes

2 files changed (+50 additions, -7 deletions)

View changed files

📝 src/cliOutput.ts (+17 -7)
📝 tests/boundary/cli/cliOutput.test.ts (+33 -0)

📄 Description

Problem and outcome

rea --filter-output --format=json providers --json treats --format=json as the filter's literal value in Incur. REA's token-by-token normalizer split that owned value into --format, json, leaving json to be parsed as a command. The equivalent equals form already worked.

Normalize once with a forward scan that preserves the next nonempty token of each spaced valued output flag. Split equals forms only when the token is an option, preserving Incur's existing missing/empty-value semantics. The shared validator and streaming output consumers continue to use the same normalized arguments.

Merge resolution

Merged main at 666842434 in 34e347703. Main already includes #4824's French README correction, portable cache staging repair and composed Electron cleanup assertions. Retain those versions and remove the superseded build-job cache-retention workaround. Relative to current main, only src/cliOutput.ts and tests/boundary/cli/cliOutput.test.ts change.

Validation

Executed for the merge resolution on macOS with pinned Node 24.18.0:

  • npm run test:focused -- tests/boundary/cli/cliOutput.test.ts tests/boundary/process/electronLaunchRejections.test.ts: 38/38 passed, including 25 CLI output tests and 13 Electron launch rejection tests. This exercises the compiled public CLI, spaced/equals forms, malformed-filter and missing-value controls, structured output, artifact diagnostics, and main's composed cleanup assertions.
  • npm run check:fast: typecheck and lint passed; pre-push repeated the check successfully.
  • Pre-commit formatting/lint and git diff origin/main...HEAD --check: passed.

The author's original Windows regressions failed before the fix (5 failed / 20 passed) and passed afterward (25/25). Those results and the earlier full npm run check apply to the pre-merge revision; a full check and Windows tests were not rerun for this merge resolution. Hosted CI for the new head is pending. Electron launch tests cover controlled failures and local Playwright failure paths, not a real application investigation.

Routine CLI correctness fix, no separate capability scope decision required. No MCP schema, provider, dependency, generated metadata, authority or release changes. Prepared with AI assistance. No separate issue was opened for this reproduced residual normalizer defect.

Author readiness

Human owner: @ShuaixinHuang

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

🔄 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/4823 **Author:** [@ShuaixinHuang](https://github.com/ShuaixinHuang) **Created:** 10/17/2026 **Status:** ✅ Merged **Merged:** 10/17/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `codex/fix-valued-output-argument` --- ### 📝 Commits (6) - [`9b868f0`](https://github.com/morluto/rea/commit/9b868f0f393239366e8dc1a1ab07d241fd1ea6f7) fix(cli): preserve spaced output flag values - [`0ccd0e6`](https://github.com/morluto/rea/commit/0ccd0e69992a1e08a5650f213b6f627e87931e7e) docs(readme): fix French heading spacing - [`a9aab54`](https://github.com/morluto/rea/commit/a9aab54a3c3f3bb384813edf554096d71f2d71ac) Merge branch 'codex/fix-french-readme-format' into codex/fix-valued-output-argument - [`2bbb299`](https://github.com/morluto/rea/commit/2bbb299b3a266671f0a74591c9d3eae7d8551562) fix(ci): retain portable build cache until snapshot upload - [`beb1064`](https://github.com/morluto/rea/commit/beb106404fbb44ab44468865445a8b58fe068cdb) test(browser): assert composed Electron cleanup failures - [`34e3477`](https://github.com/morluto/rea/commit/34e3477038a92825b4ce4682c84530c7f49ff8de) fix(cli): resolve output argument merge conflicts ### 📊 Changes **2 files changed** (+50 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `src/cliOutput.ts` (+17 -7) 📝 `tests/boundary/cli/cliOutput.test.ts` (+33 -0) </details> ### 📄 Description ## Problem and outcome `rea --filter-output --format=json providers --json` treats `--format=json` as the filter's literal value in Incur. REA's token-by-token normalizer split that owned value into `--format`, `json`, leaving `json` to be parsed as a command. The equivalent equals form already worked. Normalize once with a forward scan that preserves the next nonempty token of each spaced valued output flag. Split equals forms only when the token is an option, preserving Incur's existing missing/empty-value semantics. The shared validator and streaming output consumers continue to use the same normalized arguments. ## Merge resolution Merged main at `666842434` in `34e347703`. Main already includes #4824's French README correction, portable cache staging repair and composed Electron cleanup assertions. Retain those versions and remove the superseded build-job cache-retention workaround. Relative to current main, only `src/cliOutput.ts` and `tests/boundary/cli/cliOutput.test.ts` change. ## Validation Executed for the merge resolution on macOS with pinned Node 24.18.0: - `npm run test:focused -- tests/boundary/cli/cliOutput.test.ts tests/boundary/process/electronLaunchRejections.test.ts`: **38/38 passed**, including 25 CLI output tests and 13 Electron launch rejection tests. This exercises the compiled public CLI, spaced/equals forms, malformed-filter and missing-value controls, structured output, artifact diagnostics, and main's composed cleanup assertions. - `npm run check:fast`: typecheck and lint passed; pre-push repeated the check successfully. - Pre-commit formatting/lint and `git diff origin/main...HEAD --check`: passed. The author's original Windows regressions failed before the fix (5 failed / 20 passed) and passed afterward (25/25). Those results and the earlier full `npm run check` apply to the pre-merge revision; a full check and Windows tests were not rerun for this merge resolution. Hosted CI for the new head is pending. Electron launch tests cover controlled failures and local Playwright failure paths, not a real application investigation. Routine CLI correctness fix, no separate capability scope decision required. No MCP schema, provider, dependency, generated metadata, authority or release changes. Prepared with AI assistance. No separate issue was opened for this reproduced residual normalizer defect. ## Author readiness Human owner: @ShuaixinHuang - [ ] 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:14:21 +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#6425
No description provided.