[PR #1258] [MERGED] fix(native): name the plist selection that works when Info.plist is missing #2745

Closed
opened 2026-10-17 21:09:46 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1258
Author: @kaoru0822-kitauji
Created: 10/9/2026
Status: ✅ Merged
Merged: 10/9/2026
Merged by: @kaoru0822-kitauji

Base: main ← Head: fix/inspect-plist-default-remediation


📝 Commits (2)

  • a6fdf42 fix(native): name the plist selection that works when Info.plist is missing
  • 9b69503 fix(native): name the CLI flag that selects another plist

📊 Changes

2 files changed (+10 additions, -1 deletions)

View changed files

📝 src/native/NativeMacOSProvider.ts (+4 -1)
📝 tests/boundary/cli/nativePlistSelectionFailureCli.test.ts (+6 -0)

📄 Description

Same class as #1224, for a target-oriented refusal whose reason names an available workflow.

Problem

inspect_plist / rea inspect-plist on a target without a readable default Contents/Info.plist (for example a bare Mach-O) returns:

{ "code": "capability_unavailable",
  "message": "This analysis is unavailable for the current target. Choose another analysis or target.",
  "remediation": { "action": "This analysis is unavailable for the current target. Choose another analysis or target." },
  "details": { "reason": "The target has no readable Contents/Info.plist at …/Contents/Info.plist: no file exists there. Pass path to inspect another plist." } }

The refusal itself is deliberate (unreadablePlist reports the target's missing default rather than a failed tool run). But the caller is told to change analysis or target, while the workflow that works is to select another plist in the same target with path. The CLI flag is --relative-path. That fix appears only in details.reason.

Change

The missing-default refusal passes its reason as userMessage, as the adapters in #1224 do, so message and remediation.action carry it. Following review, the reason now names both selection spellings, because the CLI's positional path is the target: "Select another plist in the target with the path input (CLI: --relative-path)." code, category, details and the caller-selected-path branch (invalid_request on path) are unchanged.

Verification

  • tests/boundary/cli/nativePlistSelectionFailureCli.test.ts (real CLI on macOS): the missing-default case now also asserts that the message and remediation name the path input and --relative-path. It fails on main and passes here.
  • All inspect_plist test files (9 files, 69 tests) passed after npm run build:cached. npm run check:changed also passed (typecheck, lint).

No Hopper or Ghidra verification was needed; neither provider is involved.

🤖 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/1258 **Author:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Created:** 10/9/2026 **Status:** ✅ Merged **Merged:** 10/9/2026 **Merged by:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Base:** `main` ← **Head:** `fix/inspect-plist-default-remediation` --- ### 📝 Commits (2) - [`a6fdf42`](https://github.com/morluto/rea/commit/a6fdf426bd98c8cf7b7a7f589208d3193784062f) fix(native): name the plist selection that works when Info.plist is missing - [`9b69503`](https://github.com/morluto/rea/commit/9b6950373cfaa1a2c0d28287bfadd4a421afb9e9) fix(native): name the CLI flag that selects another plist ### 📊 Changes **2 files changed** (+10 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/native/NativeMacOSProvider.ts` (+4 -1) 📝 `tests/boundary/cli/nativePlistSelectionFailureCli.test.ts` (+6 -0) </details> ### 📄 Description Same class as #1224, for a target-oriented refusal whose reason names an available workflow. ## Problem `inspect_plist` / `rea inspect-plist` on a target without a readable default `Contents/Info.plist` (for example a bare Mach-O) returns: ``` { "code": "capability_unavailable", "message": "This analysis is unavailable for the current target. Choose another analysis or target.", "remediation": { "action": "This analysis is unavailable for the current target. Choose another analysis or target." }, "details": { "reason": "The target has no readable Contents/Info.plist at …/Contents/Info.plist: no file exists there. Pass path to inspect another plist." } } ``` The refusal itself is deliberate (`unreadablePlist` reports the target's missing default rather than a failed tool run). But the caller is told to change analysis or target, while the workflow that works is to select another plist in the same target with `path`. The CLI flag is `--relative-path`. That fix appears only in `details.reason`. ## Change The missing-default refusal passes its reason as `userMessage`, as the adapters in #1224 do, so `message` and `remediation.action` carry it. Following review, the reason now names both selection spellings, because the CLI's positional `path` is the target: "Select another plist in the target with the path input (CLI: --relative-path)." `code`, `category`, `details` and the caller-selected-path branch (`invalid_request` on `path`) are unchanged. ## Verification - `tests/boundary/cli/nativePlistSelectionFailureCli.test.ts` (real CLI on macOS): the missing-default case now also asserts that the message and remediation name the `path` input and `--relative-path`. It fails on `main` and passes here. - All `inspect_plist` test files (9 files, 69 tests) passed after `npm run build:cached`. `npm run check:changed` also passed (typecheck, lint). No Hopper or Ghidra verification was needed; neither provider is involved. 🤖 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-10-17 21:09:46 +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#2745
No description provided.