[PR #2707] [MERGED] fix(apktool): accept --no-strings CLI option #5332

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2707
Author: @HeadmasterEggy
Created: 10/13/2026
Status: ✅ Merged
Merged: 10/13/2026
Merged by: @morluto

Base: main ← Head: fix/apktool-no-strings-2672


📝 Commits (1)

  • cbaa460 fix(apktool): accept --no-strings CLI option

📊 Changes

2 files changed (+91 additions, -4 deletions)

View changed files

📝 src/cli/apktoolCommands.ts (+6 -4)
➕ tests/boundary/cli/apktoolBooleanOptions.test.ts (+85 -0)

📄 Description

Summary

Fixes #2672. rea decode-android-resources <apk> --no-strings now dispatches with include_strings: false; leaving the option out continues to include strings by default.

Problem and expected behavior

The CLI documented --no-strings, but declared the option schema under the name no-strings. Incur interprets --no-<name> as the negative form of a boolean option, so it looked for strings, rejected the documented flag as unknown, and never dispatched the request.

Expected: the documented flag is accepted and disables string projection, while the default remains enabled.

Change and scope

The CLI now declares the positive boolean option strings with a default of true. Its generated negative form is --no-strings; the handler passes that value directly to include_strings. A boundary test exercises the real CLI parser with an inert provider, checks the omitted default, and confirms the help text.

This is a fix within the existing CLI and analysis boundary. No new capability or maintainer scope decision is needed. No provider, analysis service, MCP contract, or target interaction changed.

Follow the contribution scope.

Contract and boundary impact

  • Semantic owner and earliest changed stage: the CLI option schema and its request mapping.
  • Contribution scope fit and linked maintainer decision: ordinary bug fix within existing limits; maintainer decision not applicable.
  • CLI and MCP/tool-catalog contract: fixes the documented CLI flag; MCP schemas and tool catalog are unchanged.
  • Provider, bridge, target-format, or platform compatibility: unchanged; provider behavior is not modified.
  • Evidence, artifact, provenance, or reconstruction contract: unchanged.
  • Target selection, authority, upstream behavior, and cleanup details: unchanged; no new target interaction or cleanup path.
  • Generated metadata, package, or installation impact: none.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated: tests/boundary/cli/apktoolBooleanOptions.test.ts covers --no-strings, the default include_strings: true, and command help.

  • Base reproduction: on ded199abc, the new boundary test failed because --no-strings exited with an unknown-option error; the omitted-default case passed.

  • After the fix: the boundary test dispatches include_strings: false for --no-strings and true when omitted.

  • User-visible CLI behavior: command help includes --no-strings; the CLI dispatches the matching boolean in the analysis request.

  • Remaining proof gaps: no real Apktool or APK integration run; the boundary test uses an inert provider.

  • Observed, derived, and inferred claims remain distinguishable.

  • Artifact identity, source provenance, and failed attempts remain preserved.

  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • npm run test:focused -- tests/boundary/cli/apktoolBooleanOptions.test.ts tests/boundary/cli/apktoolCli.test.ts — 7 passed.
  • npm run check:fast — passed.
  • git diff --check — passed.

Compatibility, safety, and release

  • Breaking changes or migration steps: none; the documented option now works and the default is unchanged.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: no change to target access or process behavior.

Before merge

  • This PR addresses a concrete problem: #2672.
  • Material scope and authority questions are resolved; no maintainer scope decision applies.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked.
  • Tests cover the changed option behavior and omitted-default path.
  • Owning CLI option/help contract is updated; generated metadata is unaffected.
  • User-visible CLI change includes representative behavior above.
  • Final diff checked for secrets, unrelated changes, and unsupported claims.

🔄 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/2707 **Author:** [@HeadmasterEggy](https://github.com/HeadmasterEggy) **Created:** 10/13/2026 **Status:** ✅ Merged **Merged:** 10/13/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/apktool-no-strings-2672` --- ### 📝 Commits (1) - [`cbaa460`](https://github.com/morluto/rea/commit/cbaa4601d27303b005a0350c100245c3a65d9008) fix(apktool): accept --no-strings CLI option ### 📊 Changes **2 files changed** (+91 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/cli/apktoolCommands.ts` (+6 -4) ➕ `tests/boundary/cli/apktoolBooleanOptions.test.ts` (+85 -0) </details> ### 📄 Description ## Summary Fixes #2672. `rea decode-android-resources <apk> --no-strings` now dispatches with `include_strings: false`; leaving the option out continues to include strings by default. ## Problem and expected behavior The CLI documented `--no-strings`, but declared the option schema under the name `no-strings`. Incur interprets `--no-<name>` as the negative form of a boolean option, so it looked for `strings`, rejected the documented flag as unknown, and never dispatched the request. Expected: the documented flag is accepted and disables string projection, while the default remains enabled. ## Change and scope The CLI now declares the positive boolean option `strings` with a default of `true`. Its generated negative form is `--no-strings`; the handler passes that value directly to `include_strings`. A boundary test exercises the real CLI parser with an inert provider, checks the omitted default, and confirms the help text. This is a fix within the existing CLI and analysis boundary. No new capability or maintainer scope decision is needed. No provider, analysis service, MCP contract, or target interaction changed. Follow the [contribution scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope). ## Contract and boundary impact - Semantic owner and earliest changed stage: the CLI option schema and its request mapping. - Contribution scope fit and linked maintainer decision: ordinary bug fix within existing limits; maintainer decision not applicable. - CLI and MCP/tool-catalog contract: fixes the documented CLI flag; MCP schemas and tool catalog are unchanged. - Provider, bridge, target-format, or platform compatibility: unchanged; provider behavior is not modified. - Evidence, artifact, provenance, or reconstruction contract: unchanged. - Target selection, authority, upstream behavior, and cleanup details: unchanged; no new target interaction or cleanup path. - Generated metadata, package, or installation impact: none. Expected effects: - [x] Read existing files or captured data. - [ ] Launch or attach to a process. - [ ] Inject instrumentation or run scripts/code. - [ ] Change process memory, files, or configuration. - [ ] Contact network services. - [ ] Recover protected code or work around protections. - [ ] Documentation or usability only; no target interaction. - [ ] Not sure yet; investigation or maintainer guidance needed. ## Evidence and regression coverage - Tests added or updated: `tests/boundary/cli/apktoolBooleanOptions.test.ts` covers `--no-strings`, the default `include_strings: true`, and command help. - Base reproduction: on `ded199abc`, the new boundary test failed because `--no-strings` exited with an unknown-option error; the omitted-default case passed. - After the fix: the boundary test dispatches `include_strings: false` for `--no-strings` and `true` when omitted. - User-visible CLI behavior: command help includes `--no-strings`; the CLI dispatches the matching boolean in the analysis request. - Remaining proof gaps: no real Apktool or APK integration run; the boundary test uses an inert provider. - [x] Observed, derived, and inferred claims remain distinguishable. - [x] Artifact identity, source provenance, and failed attempts remain preserved. - [x] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed - `npm run test:focused -- tests/boundary/cli/apktoolBooleanOptions.test.ts tests/boundary/cli/apktoolCli.test.ts` — 7 passed. - `npm run check:fast` — passed. - `git diff --check` — passed. ## Compatibility, safety, and release - Breaking changes or migration steps: none; the documented option now works and the default is unchanged. - Real Hopper/Ghidra, browser, or OS coverage: not applicable. - Package or release metadata impact: none. - Security, privacy, process, or containment review: no change to target access or process behavior. ## Before merge - [x] This PR addresses a concrete problem: #2672. - [x] Material scope and authority questions are resolved; no maintainer scope decision applies. - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked. - [x] Tests cover the changed option behavior and omitted-default path. - [x] Owning CLI option/help contract is updated; generated metadata is unaffected. - [x] User-visible CLI change includes representative behavior above. - [x] Final diff checked for secrets, unrelated changes, and unsupported claims. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:05:48 +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#5332
No description provided.