[PR #1954] [MERGED] fix(adb): share host configuration refusals with apktool #4931

Closed
opened 2026-10-31 00:57:05 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/issue-1952


📝 Commits (2)

  • dd4f18e fix(adb): share host configuration refusals with apktool
  • 8d64e5a fix(adb): reconcile configuration refusals with main

📊 Changes

3 files changed (+45 additions, -29 deletions)

View changed files

📝 tests/boundary/cli/adbCli.test.ts (+23 -19)
📝 tests/boundary/cli/apktoolCli.test.ts (+5 -10)
📝 tests/boundary/cli/cliServeHarness.ts (+17 -0)

📄 Description

Fixes #1952

Behavior

The ADB provider had the same two refusal defects that #1946 fixed for apktool:

  • REA_ADB_PATH=relative/adb used to escape as {"code":"UNKNOWN"}, because this.selection() ran before the try that maps AdbConfigurationFailure. Selection now runs inside that try in both #executeOperation and inspectAvailability, and returns capability_unavailable: "REA_ADB_PATH must be an absolute path to the adb binary."
  • A missing adb binary used to show the generic "unavailable for the current target" message and remediation. The refusal now names the binary and REA_ADB_PATH.

Following the AGENTS.md rule from 0d8b728d2, the failure-to-refusal mapping that ADB and apktool each built inline is now one providerConfigurationRefusal helper in src/application/AnalysisProvider.ts, used by both providers. The CLI refusal assertion is shared as expectConfigurationRefusal in tests/boundary/cli/cliServeHarness.ts.

Still separate: AdbConfigurationFailure and ApktoolConfigurationFailure, and their availability helpers, have the same shape but distinct failure codes. Merging them would be a broader configuration refactor, unrelated to these refusal defects.

Validation

  • tests/boundary/cli/adbCli.test.ts now checks message and remediation for inspect-adb-client and list-adb-devices, plus the relative-path case. 3 cases fail on the old source and all pass here. 140 ADB/apktool/CLI-harness tests pass.
  • npm run lint, npm run typecheck, npm run format:check, npm run knip: pass. jscpd is 2.590% (threshold 2.6%; main 2.598%).
  • npm test: 8,346 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.
  • Not verified with a real adb binary or device; these are refusal paths only.

🤖 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/1954 **Author:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Created:** 10/11/2026 **Status:** ✅ Merged **Merged:** 10/11/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/issue-1952` --- ### 📝 Commits (2) - [`dd4f18e`](https://github.com/morluto/rea/commit/dd4f18e5b240b9393a729eee1fbfa4de7dbcbdf8) fix(adb): share host configuration refusals with apktool - [`8d64e5a`](https://github.com/morluto/rea/commit/8d64e5a898eed32cc811700148130155b4a0a4ea) fix(adb): reconcile configuration refusals with main ### 📊 Changes **3 files changed** (+45 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `tests/boundary/cli/adbCli.test.ts` (+23 -19) 📝 `tests/boundary/cli/apktoolCli.test.ts` (+5 -10) 📝 `tests/boundary/cli/cliServeHarness.ts` (+17 -0) </details> ### 📄 Description Fixes #1952 ## Behavior The ADB provider had the same two refusal defects that #1946 fixed for apktool: - `REA_ADB_PATH=relative/adb` used to escape as `{"code":"UNKNOWN"}`, because `this.selection()` ran before the `try` that maps `AdbConfigurationFailure`. Selection now runs inside that `try` in both `#executeOperation` and `inspectAvailability`, and returns `capability_unavailable`: "REA_ADB_PATH must be an absolute path to the adb binary." - A missing adb binary used to show the generic "unavailable for the current target" message and remediation. The refusal now names the binary and `REA_ADB_PATH`. ## Related cleanup Following the AGENTS.md rule from 0d8b728d2, the failure-to-refusal mapping that ADB and apktool each built inline is now one `providerConfigurationRefusal` helper in `src/application/AnalysisProvider.ts`, used by both providers. The CLI refusal assertion is shared as `expectConfigurationRefusal` in `tests/boundary/cli/cliServeHarness.ts`. Still separate: `AdbConfigurationFailure` and `ApktoolConfigurationFailure`, and their availability helpers, have the same shape but distinct failure codes. Merging them would be a broader configuration refactor, unrelated to these refusal defects. ## Validation - `tests/boundary/cli/adbCli.test.ts` now checks message and remediation for `inspect-adb-client` and `list-adb-devices`, plus the relative-path case. 3 cases fail on the old source and all pass here. 140 ADB/apktool/CLI-harness tests pass. - `npm run lint`, `npm run typecheck`, `npm run format:check`, `npm run knip`: pass. jscpd is 2.590% (threshold 2.6%; main 2.598%). - `npm test`: 8,346 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`. - Not verified with a real adb binary or device; these are refusal paths only. 🤖 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-31 00:57:05 +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#4931
No description provided.