[PR #506] [MERGED] fix(cli): fail commands returning projected analysis errors #2032

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

📋 Pull Request Information

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

Base: main ← Head: fix/rea-cli-projected-errors-20261004


📝 Commits (1)

  • c29b2ac fix(cli): fail commands returning projected analysis errors

📊 Changes

3 files changed (+59 additions, -0 deletions)

View changed files

📝 src/cliLogging.test.ts (+16 -0)
📝 src/cliLogging.ts (+2 -0)
➕ tests/boundary/cli/projectedErrorStatus.test.ts (+41 -0)

📄 Description

Problem

Several CLI workflows return projectAnalysisError(...) directly. The existing status classifier only recognized error strings and a few status fields, so actual failed commands exited successfully and logged an ok status.

Reproduced with the compiled CLI: invalid replay configuration returned configuration_invalid with exit 0; invalid managed reconstruction returned invalid_request with exit 0. A successful target-free capabilities command remained exit 0.

Change

Recognize the existing complete discriminated analysis-error schema in the shared CLI classifier. Preserve error JSON and avoid treating ordinary objects containing a code, or nested evidence about an error, as command failures.

Verification

  • Before: two compiled CLI regressions failed; successful inventory control passed.
  • After: the three compiled CLI cases passed; classifier controls passed in the complete suite.
  • npm run check:pr: 353 files passed, 1,804 tests passed, 2 existing skips; static checks and generated documentation checks passed.
  • npm run verify:package: passed actual installed-tarball CLI/MCP checks (122 tools and 6 prompts), with and without optional dependencies.
  • npm pack --dry-run: passed.
  • Node 24.18.0, npm 11.16.0, exact lockfile installation.

This changes CLI status classification and does not claim real Hopper, Ghidra, browser, or Linux sandbox verification. Prepared with AI assistance; the reproductions and checks above were executed locally.


🔄 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/506 **Author:** [@rudycelekli](https://github.com/rudycelekli) **Created:** 10/5/2026 **Status:** ✅ Merged **Merged:** 10/5/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/rea-cli-projected-errors-20261004` --- ### 📝 Commits (1) - [`c29b2ac`](https://github.com/morluto/rea/commit/c29b2ac923a6306b27962bcc8f912886c0551ef6) fix(cli): fail commands returning projected analysis errors ### 📊 Changes **3 files changed** (+59 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/cliLogging.test.ts` (+16 -0) 📝 `src/cliLogging.ts` (+2 -0) ➕ `tests/boundary/cli/projectedErrorStatus.test.ts` (+41 -0) </details> ### 📄 Description ## Problem Several CLI workflows return `projectAnalysisError(...)` directly. The existing status classifier only recognized error strings and a few status fields, so actual failed commands exited successfully and logged an `ok` status. Reproduced with the compiled CLI: invalid replay configuration returned `configuration_invalid` with exit 0; invalid managed reconstruction returned `invalid_request` with exit 0. A successful target-free capabilities command remained exit 0. ## Change Recognize the existing complete discriminated analysis-error schema in the shared CLI classifier. Preserve error JSON and avoid treating ordinary objects containing a code, or nested evidence about an error, as command failures. ## Verification - Before: two compiled CLI regressions failed; successful inventory control passed. - After: the three compiled CLI cases passed; classifier controls passed in the complete suite. - `npm run check:pr`: 353 files passed, 1,804 tests passed, 2 existing skips; static checks and generated documentation checks passed. - `npm run verify:package`: passed actual installed-tarball CLI/MCP checks (122 tools and 6 prompts), with and without optional dependencies. - `npm pack --dry-run`: passed. - Node 24.18.0, npm 11.16.0, exact lockfile installation. This changes CLI status classification and does not claim real Hopper, Ghidra, browser, or Linux sandbox verification. Prepared with AI assistance; the reproductions and checks above were executed locally. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:13:33 +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#2032
No description provided.