[GH-ISSUE #4876] [Bug] APK CLI locale-list schema omits the domain array bounds #3029

Closed
opened 2026-10-31 00:35:06 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @morluto on GitHub (Oct 17, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/4876

Before submitting

  • Searched open and closed issues (apktool locales schema); no matching advertised-bound report found.
  • No credentials or target data included.

Area

CLI

Observed behavior

The public decode-android-resources --schema --json response advertises options.locales as an array without minItems or maxItems. The owning domain schema requires 1–20 entries. An authored public CLI schema regression fails with both bounds absent.

Reproduction

At d37c346477, run rea decode-android-resources --schema --json; inspect options.properties.locales. Authored schema assertion run once: 1 failed, 5 existing checks passed. No decoder or target execution involved.

Expected behavior

CLI advertisement and parser preserve apktoolInputSchemas.decode_android_resources.shape.locales bounds (min1/max20), as the service and MCP contract do.

Impact and scope

Clients selecting inputs from the CLI schema cannot discover the actual array bounds. Source inspection shows the adapter reconstructs an unbounded array from the single-locale element schema. The application service still validates the full input; this is not a provider admission bypass. User incident frequency: NOT_ENOUGH_INFO; discovered during audit.

REA version

Source d37c346477

Runtime and platform

Node 24.18.0; macOS arm64

Target and artifact context

Not applicable; schema query only.

Interface

CLI

Evidence

src/cli/apktoolCommands.ts reconstructs .array(locale.unwrap()).optional() instead of consuming the existing bounded locales contract in src/domain/apktool/apktoolResourceAnalysis.ts. Actual schema assertion received {type:"array"} without expected minItems:1,maxItems:20. Proposed structural fix: reuse the owner field and retain CLI-specific description.

Originally created by @morluto on GitHub (Oct 17, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/4876 ### Before submitting - [x] Searched open and closed issues (`apktool locales schema`); no matching advertised-bound report found. - [x] No credentials or target data included. ### Area CLI ### Observed behavior The public `decode-android-resources --schema --json` response advertises `options.locales` as an array without `minItems` or `maxItems`. The owning domain schema requires 1–20 entries. An authored public CLI schema regression fails with both bounds absent. ### Reproduction At d37c346477de7d75d71e06792e2d24f3ea30a16a, run `rea decode-android-resources --schema --json`; inspect `options.properties.locales`. Authored schema assertion run once: 1 failed, 5 existing checks passed. No decoder or target execution involved. ### Expected behavior CLI advertisement and parser preserve `apktoolInputSchemas.decode_android_resources.shape.locales` bounds (min1/max20), as the service and MCP contract do. ### Impact and scope Clients selecting inputs from the CLI schema cannot discover the actual array bounds. Source inspection shows the adapter reconstructs an unbounded array from the single-locale element schema. The application service still validates the full input; this is not a provider admission bypass. User incident frequency: NOT_ENOUGH_INFO; discovered during audit. ### REA version Source d37c346477de7d75d71e06792e2d24f3ea30a16a ### Runtime and platform Node 24.18.0; macOS arm64 ### Target and artifact context Not applicable; schema query only. ### Interface CLI ### Evidence `src/cli/apktoolCommands.ts` reconstructs `.array(locale.unwrap()).optional()` instead of consuming the existing bounded locales contract in `src/domain/apktool/apktoolResourceAnalysis.ts`. Actual schema assertion received `{type:"array"}` without expected `minItems:1,maxItems:20`. Proposed structural fix: reuse the owner field and retain CLI-specific description.
bsakaguchi 2026-10-31 00:35:06 +00:00
  • closed this issue
  • added the
    triage
    bug
    labels
Author
Owner

@morluto commented on GitHub (Oct 17, 2026):

Fixed in f1edf0da0, pushed to main. The CLI now consumes the domain locales schema directly, retaining optionality, locale validation and min1/max20 bounds. The application service already validated these bounds; no provider-admission bypass is claimed.

The public schema regression fails unchanged d37c34647. After the fix, 21 focused checks across 4 files pass, including public CLI schema/JSON Schema validation, parser parity, locale forwarding, service and MCP checks. check:fast and docs:check pass; source review found no blocker. No target execution, real decoder or performance qualification was needed or claimed. Heavy tests remained stopped.

<!-- gh-comment-id:6240419214 --> @morluto commented on GitHub (Oct 17, 2026): Fixed in f1edf0da0, pushed to main. The CLI now consumes the domain locales schema directly, retaining optionality, locale validation and min1/max20 bounds. The application service already validated these bounds; no provider-admission bypass is claimed. The public schema regression fails unchanged d37c34647. After the fix, 21 focused checks across 4 files pass, including public CLI schema/JSON Schema validation, parser parity, locale forwarding, service and MCP checks. check:fast and docs:check pass; source review found no blocker. No target execution, real decoder or performance qualification was needed or claimed. Heavy tests remained stopped.
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#3029
No description provided.