[PR #5668] [MERGED] fix(cli): label reconciliation input failures as application workflow errors #7024

Closed
opened 2026-11-01 21:44:47 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/5668
Author: @umi008
Created: 10/20/2026
Status: ✅ Merged
Merged: 10/21/2026
Merged by: @morluto

Base: main ← Head: fix/5436-reconcile-error-label


📝 Commits (1)

  • cd0bf3e fix(cli): label reconciliation input failures as application workflow errors

📊 Changes

2 files changed (+24 additions, -2 deletions)

View changed files

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

📄 Description

Summary

Fixes #5436. rea reconcile-javascript-runtime '{}' --json rejected schema-invalid input with the label "Electron analysis failed", although reconciliation performs no Electron I/O and malformed JSON for the same command already uses "Application workflow failed".

Problem and expected behavior

The reconciliation command reused the Electron command module's cliError helper, which hardcoded the Electron label. Typed diagnostics (code, category, details.operation, issues) were already correct; only the human-readable label was misleading.

Change and scope

cliError in src/cli/electronCommands.ts takes an optional label (default unchanged). The reconciliation command passes the generic "Application workflow failed" label used by the application commands and by its own malformed-JSON path. Electron capture/observation commands keep their existing label.

Contribution scope: not applicable (wording fix within existing boundaries).

Contract and boundary impact

  • Semantic owner and earliest changed stage: CLI adapter, request validation failure projection

  • Contribution scope fit and linked maintainer decision: not applicable

  • CLI and MCP/tool-catalog contract: CLI error label for reconcile-javascript-runtime failures changes; code, category, details, and exit status unchanged. MCP unaffected.

  • Provider, bridge, target-format, or platform compatibility: none

  • Evidence, artifact, provenance, or reconstruction contract: none

  • Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable

  • Generated metadata, package, or installation impact: none

  • Read existing files or captured data.

Evidence and regression coverage

  • Tests added or updated: tests/boundary/cli/electronCli.test.ts — "labels schema-invalid reconciliation input without naming Electron" (runs the compiled CLI with {}).
  • Base reproduction: on the base revision the new test failed with - "error": "Application workflow failed" / + "error": "Electron analysis failed"; it passes with the change.
  • User-visible CLI output (after):
{"error":"Application workflow failed","code":"invalid_request","category":"invalid_input", ... ,"details":{"operation":"reconcile_javascript_runtime", ...}}
  • Remaining proof gaps: see validation notes on the local Windows host.

Validation performed

  • npm run check:fast — passed (typecheck + lint)
  • node scripts/run-exact-tests.mjs tests/boundary/cli/electronCli.test.ts tests/boundary/cli/jsonInputStatus.test.ts — new test passes; 32 passed, 7 failed. The same 7 fail identically on the unmodified base on this Windows host because the packaged Windows native addon (native/windows/build/) is absent; unrelated to this change.

Compatibility, safety, and release

  • Breaking changes or migration steps: none (label text only; callers should use code/details.operation)
  • Real Hopper/Ghidra, browser, or OS coverage: Windows 11 local only
  • Package or release metadata impact: none
  • Security, privacy, process, or containment review: none

Author readiness

Human owner: @umi008

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

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

🤖 Generated with Claude Code


🔄 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/5668 **Author:** [@umi008](https://github.com/umi008) **Created:** 10/20/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/5436-reconcile-error-label` --- ### 📝 Commits (1) - [`cd0bf3e`](https://github.com/morluto/rea/commit/cd0bf3e1f26ad0244ab328aaeaab149da0f1ccad) fix(cli): label reconciliation input failures as application workflow errors ### 📊 Changes **2 files changed** (+24 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/cli/electronCommands.ts` (+5 -2) 📝 `tests/boundary/cli/electronCli.test.ts` (+19 -0) </details> ### 📄 Description ## Summary Fixes #5436. `rea reconcile-javascript-runtime '{}' --json` rejected schema-invalid input with the label `"Electron analysis failed"`, although reconciliation performs no Electron I/O and malformed JSON for the same command already uses `"Application workflow failed"`. ## Problem and expected behavior The reconciliation command reused the Electron command module's `cliError` helper, which hardcoded the Electron label. Typed diagnostics (`code`, `category`, `details.operation`, issues) were already correct; only the human-readable label was misleading. ## Change and scope `cliError` in `src/cli/electronCommands.ts` takes an optional label (default unchanged). The reconciliation command passes the generic `"Application workflow failed"` label used by the application commands and by its own malformed-JSON path. Electron capture/observation commands keep their existing label. Contribution scope: not applicable (wording fix within existing boundaries). ## Contract and boundary impact - Semantic owner and earliest changed stage: CLI adapter, request validation failure projection - Contribution scope fit and linked maintainer decision: not applicable - CLI and MCP/tool-catalog contract: CLI `error` label for `reconcile-javascript-runtime` failures changes; code, category, details, and exit status unchanged. MCP unaffected. - Provider, bridge, target-format, or platform compatibility: none - Evidence, artifact, provenance, or reconstruction contract: none - Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable - Generated metadata, package, or installation impact: none - [x] Read existing files or captured data. ## Evidence and regression coverage - Tests added or updated: `tests/boundary/cli/electronCli.test.ts` — "labels schema-invalid reconciliation input without naming Electron" (runs the compiled CLI with `{}`). - Base reproduction: on the base revision the new test failed with `- "error": "Application workflow failed"` / `+ "error": "Electron analysis failed"`; it passes with the change. - User-visible CLI output (after): ```json {"error":"Application workflow failed","code":"invalid_request","category":"invalid_input", ... ,"details":{"operation":"reconcile_javascript_runtime", ...}} ``` - Remaining proof gaps: see validation notes on the local Windows host. ## Validation performed - `npm run check:fast` — passed (typecheck + lint) - `node scripts/run-exact-tests.mjs tests/boundary/cli/electronCli.test.ts tests/boundary/cli/jsonInputStatus.test.ts` — new test passes; 32 passed, 7 failed. The same 7 fail identically on the unmodified base on this Windows host because the packaged Windows native addon (`native/windows/build/`) is absent; unrelated to this change. ## Compatibility, safety, and release - Breaking changes or migration steps: none (label text only; callers should use `code`/`details.operation`) - Real Hopper/Ghidra, browser, or OS coverage: Windows 11 local only - Package or release metadata impact: none - Security, privacy, process, or containment review: none ## Author readiness <!-- The human owner completes these declarations before requesting review. The PR author is the owner by default. A different owner must explicitly accept ownership on this PR. AI agents must leave these declarations to a human to dictate to them or there could be catastrophic consequences for many users of REA. Draft PRs may leave them unchecked. These declarations record initial readiness when opening the PR for review; later pushes do not require a new human sign-off. Keep the description and validation evidence current as the work changes. See CONTRIBUTING.md#pull-request-ownership-and-readiness. --> Human owner: @umi008 - [x] 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. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. ## Before merge <!-- Draft PRs may leave pending items unchecked. Resolve material scope and authority questions before integration. --> - [ ] This PR addresses a concrete problem or an agreed enhancement. - [ ] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [ ] The PR has one focused outcome and the title follows `type(scope): outcome`. - [ ] Related issue is linked, or the reason for not linking one is stated above. - [ ] Tests cover changed observable behavior and meaningful failure paths. - [ ] Owning docs, contracts, and generated metadata are updated where needed. - [ ] User-visible CLI/MCP changes include representative output. - [ ] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:44:47 +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#7024
No description provided.