Repository navigation
fix(apktool): name host requirements in configuration refusals - #1946
Merged
Merged
Conversation
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]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
3 tasks done
| return err( | ||
| new AnalysisCapabilityUnavailableError( | ||
| APKTOOL_PROVIDER_IDENTITY.id, | ||
| operation, |
| { cause }, | ||
| reason, | ||
| { cause, userMessage: reason }, | ||
| ), |
2 tasks done
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.
Fixes #1945
Behavior
REA_APKTOOL_COMMAND=/nonexistent/apktool),inspect-apktool-clientanddecode-android-resourcesused to return the generic "This analysis is unavailable for the current target. Choose another analysis or target." message and remediation. The real reason appeared only indetails.reason. The refusal now passes that reason asuserMessage, as JADX and the adapters fixed in fix: name host and tool requirements in optional adapter refusals #1224 already do: "The selected apktool launcher was not found: apktool. Set REA_APKTOOL_COMMAND to an absolute apktool launcher (…)."REA_APKTOOL_COMMANDused to escape as{"code":"UNKNOWN"}, becausethis.selection()ran before thetrythat mapsApktoolConfigurationFailure. Selection now runs inside thattryin both#executeand#inspectAvailability, so it returnscapability_unavailablewith "REA_APKTOOL_COMMAND must be an absolute path to the apktool launcher."userMessage.The error code, category and
detailsfields are unchanged.details.reasonnow has sentence punctuation between the failure and its remediation.Validation
tests/boundary/cli/apktoolCli.test.ts: the old case only checked thatREA_APKTOOL_COMMANDappeared somewhere in stdout, whichdetails.reasonalready satisfied. It now checks the message and remediation for both commands, plus the relative-path case. 3 of the 6 cases fail on main and all pass here. All 41 apktool tests (module, CLI, MCP) pass.npm run lint,npm run typecheck,npm run format:check: pass.npm test: 8,271 passed, 12 failed. These are the same 12 that fail on a clean origin/main worktree on this Mac: ibtool NIB tests, the hdiutil verify refusal, and JS runtime discovery paths under/private/var.🤖 Generated with Claude Code