Skip to content

fix(cli): return nonzero status for operation failures - #121

Merged
morluto merged 1 commit into
mainfrom
fix/cli-failure-exit-status
Jul 13, 2026
Merged

morluto merged 1 commit into
mainfrom
fix/cli-failure-exit-status

Conversation

@morluto

@morluto morluto commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Description

REA could serialize an expected operation failure as valid JSON, TOON, YAML, Markdown, or JSONL and still exit with status 0. Shells and CI therefore treated failed integrity checks, disabled policies, unhealthy diagnostics, and incomplete setup as successful commands.

This change classifies the existing caller-visible CLI outcomes at the shared command boundary and sets exit status 1 without replacing their structured bodies. It also keeps CLI logs on stderr, so enabling error logs cannot corrupt machine-readable stdout. Successful bounded or truncated evidence remains status 0.

The package verifier now asserts status alongside structured output for doctor and setup outcomes. README documents the stable status contract and a pipefail-safe example.

Type of Change

  • Bug fix
  • Documentation update
  • New feature
  • Performance improvement
  • Refactoring (no functional change)
  • Tool contract change (MCP schema modification)

Testing Performed

  • Unit tests added or updated
  • TypeScript typecheck passes (npm run typecheck)
  • Linting passes (npm run lint)
  • Full test suite passes (npm test)
  • Real Hopper verification performed (npm run verify:hopper) — not run; the change is confined to terminal status/output handling.
  • Linux real Hopper verification performed (npm run verify:hopper:linux) — not run for the same reason.
  • Package verification performed (npm run verify:package)

Focused packaged-dispatcher coverage checks ordinary and full output plus JSON, JSONL, TOON, YAML, Markdown, filtering, token limits, token counts, and enabled error logging. Final Autoreview reported no accepted or actionable findings.

Tool Contract Impact

None. MCP registration, schemas, and the 68-tool inventory are unchanged.

Related Issues

Closes #113

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@morluto
morluto force-pushed the fix/cli-failure-exit-status branch from 869a892 to d617bf1 Compare July 13, 2026 22:31
@morluto
morluto merged commit 00c187e into main Jul 13, 2026
11 checks passed
@morluto
morluto deleted the fix/cli-failure-exit-status branch July 13, 2026 22:33
darsrc pushed a commit to darsrc/rea that referenced this pull request Oct 10, 2026
@morluto morluto added bug Something isn't working area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Oct 14, 2026
DrAbdulmalek pushed a commit to DrAbdulmalek/rea that referenced this pull request Oct 26, 2026
Add an optional Codex adapter, Binary Ninja route and skill, Git-blob security boundaries, payload provenance documentation, and Gradle Wrapper verification.

Closes morluto#47
Closes morluto#121
Closes morluto#125
@morluto morluto added the area: cli CLI adapter and one-shot commands label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli CLI adapter and one-shot commands area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Return reliable nonzero CLI exit status for structured operation failures

1 participant