[PR #777] [MERGED] fix(cli): align structured output guard with native flags #2235

Closed
opened 2026-10-16 21:16:04 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/cli-output-native-flags-20261006


📝 Commits (1)

  • f32351c fix(cli): align structured output guard with native flags

📊 Changes

2 files changed (+21 additions, -5 deletions)

View changed files

📝 src/cliOutput.ts (+2 -5)
📝 tests/boundary/cli/cliOutput.test.ts (+19 -0)

📄 Description

Problem

REA's output preflight and the installed Incur 0.6.1 builtin flag parser disagree about effective output format. The parser scans builtin flags past -- and only recognizes the spaced --format form. The preflight stops at the delimiter and accepts an equals-form override.

Actual production requests such as providers -- --json --token-limit 5 and providers --json --format=toon --token-limit 5 bypass the structured-output guard and emit truncated, invalid JSON error documents.

Change

Align those two preflight decisions with the actual parser. The existing unsupported-output-combination error is emitted as a complete JSON document before dispatch. This does not add new argument grammar or change Incur's delimiter behavior.

Verification

  • Both actual built CLI requests reproduced truncated, nonparseable JSON before the change.
  • Six focused CLI output/sanitization tests pass afterward, including both production request paths and existing valid-format/error/artifact controls.
  • npm run check and check:fast pass with 125 existing lint warnings and zero errors.

AI-assisted implementation, independently reviewed; signed commit with DCO.


🔄 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/777 **Author:** [@rudycelekli](https://github.com/rudycelekli) **Created:** 10/6/2026 **Status:** ✅ Merged **Merged:** 10/7/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/cli-output-native-flags-20261006` --- ### 📝 Commits (1) - [`f32351c`](https://github.com/morluto/rea/commit/f32351c2134a75d4beb57a4d3ce0b994256caabe) fix(cli): align structured output guard with native flags ### 📊 Changes **2 files changed** (+21 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `src/cliOutput.ts` (+2 -5) 📝 `tests/boundary/cli/cliOutput.test.ts` (+19 -0) </details> ### 📄 Description ## Problem REA's output preflight and the installed Incur 0.6.1 builtin flag parser disagree about effective output format. The parser scans builtin flags past `--` and only recognizes the spaced `--format` form. The preflight stops at the delimiter and accepts an equals-form override. Actual production requests such as `providers -- --json --token-limit 5` and `providers --json --format=toon --token-limit 5` bypass the structured-output guard and emit truncated, invalid JSON error documents. ## Change Align those two preflight decisions with the actual parser. The existing unsupported-output-combination error is emitted as a complete JSON document before dispatch. This does not add new argument grammar or change Incur's delimiter behavior. ## Verification - Both actual built CLI requests reproduced truncated, nonparseable JSON before the change. - Six focused CLI output/sanitization tests pass afterward, including both production request paths and existing valid-format/error/artifact controls. - npm run check and check:fast pass with 125 existing lint warnings and zero errors. AI-assisted implementation, independently reviewed; signed commit with DCO. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:16:04 +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#2235
No description provided.