Repository navigation
fix: name host and tool requirements in optional adapter refusals - #1224
Merged
Merged
Conversation
Host and tool-configuration refusals from the pwntools, EVMole, firmware, mitmproxy, Wakaru, LLDB and xcrun adapters carried no userMessage, so CLI and MCP callers saw the generic "This analysis is unavailable for the current target. Choose another analysis or target." as both message and remediation. Choosing another target cannot satisfy a Linux-only profile or an unset REA_*_COMMAND. The actual requirement appeared only in details.reason. Pass each refusal's reason as its userMessage, as the adapters' other configuration refusals (EVMole limits, JADX, pwndbg) already do. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
The version-mismatch reason ends with the tool's complete stderr, which is too long for a caller-facing message. The message now names the expected and reported version and exit code; details.reason keeps the stderr. Co-Authored-By: Claude Opus 5.5 <[email protected]>
darsrc
pushed a commit
to darsrc/rea
that referenced
this pull request
Oct 10, 2026
…-messages fix: name host and tool requirements in optional adapter refusals
This was referenced Oct 11, 2026
morluto
pushed a commit
that referenced
this pull request
Oct 11, 2026
A missing apktool launcher projected the generic "unavailable for the current target" message and remediation, leaving the actual reason only in details.reason. A relative REA_APKTOOL_COMMAND escaped as UNKNOWN because command selection ran before the try that maps configuration failures. Resolve the selection inside that try for both execution and availability, and pass the refusal reason as userMessage, as JADX and the adapters fixed in #1224 do. Co-authored-by: Claude Opus 5.5 <[email protected]>
9 tasks done
Closed
2 tasks done
Iyanuoluwa007
pushed a commit
to Iyanuoluwa007/rea
that referenced
this pull request
Oct 21, 2026
A missing apktool launcher projected the generic "unavailable for the current target" message and remediation, leaving the actual reason only in details.reason. A relative REA_APKTOOL_COMMAND escaped as UNKNOWN because command selection ran before the try that maps configuration failures. Resolve the selection inside that try for both execution and availability, and pass the refusal reason as userMessage, as JADX and the adapters fixed in morluto#1224 do.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When an optional external-tool adapter refuses because of the host or its tool configuration, CLI and MCP callers are told to pick a different target:
Choosing another target cannot satisfy a Linux-only profile or an unset
REA_*_COMMAND. The actual requirement appears only indetails.reason. Reproduced on macOS withinspect-binary-layout,inspect-evm-interface,recover-javascript-sources,inspect-firmware-regionsandextract-firmware.The cause is that these
AnalysisCapabilityUnavailableErrors carry nouserMessage, so the projection falls back to the generic text for the whole tag. Other configuration refusals in the same adapters already pass their reason asuserMessage: EVMole's prlimit and limit checks, JADX, pwndbg, and the Ghidra NativeAOT host refusal. This PR makes the remaining host and tool refusals consistent with them. It follows the same approach as 6c13fc8 for Android.Change
Each refusal below now passes its reason as
userMessage, somessageandremediation.actionname the requirement.code,category,retryableanddetailsare unchanged.REA_BINWALK_COMMAND/REA_UNBLOB_COMMAND; unusable command;REA_FIRMWARE_PRLIMIT_COMMAND; resource limiter; tool version banner/admissionREA_MITMDUMP_COMMAND; configuredmitmdumpunavailableREA_WAKARU_COMMAND; configured Wakaru/prlimit unavailable; version mismatch (the message names the expected/reported version and exit code;details.reasonalso keeps the tool's stderr)<tool>unavailable through xcrunAfter the change, on macOS:
Refusals that really are about the target (for example "Active artifact is not Mach-O", "requires a PE target") keep the generic target-oriented message.
Verification
src/firmware/FirmwareCommand.test.ts,src/javascript/recovery/WakaruCommand.test.ts: unconfigured refusal (runs on every host)tests/boundary/browser/historicalWebCapture.test.ts: CLI mitmproxy refusal namesREA_MITMDUMP_COMMAND(every host)tests/boundary/providers/native/nativeProvider.test.ts,tests/boundary/providers/native/lldbCallTracerFailures.test.ts: xcrun and LLDB unavailabletests/boundary/binaryDiagnostics/pwntoolsLayoutProvider.test.ts,tests/boundary/evm/evmoleInterfaceProvider.test.ts: host refusal (non-Linux-x64 hosts, e.g. the macOS job)npm run check:fastandnpm run check:changedpassed.No Hopper or Ghidra verification was needed; neither provider is involved. The Linux-only adapters were not exercised with real tools here. Their refusal paths are covered by the tests above.
🤖 Generated with Claude Code