[GH-ISSUE #4880] [Bug] Later APK locale read failure discards completed decode facts #3032

Closed
opened 2026-10-31 00:35:09 +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/4880

Before submitting

  • Searched open/closed apktool partial failure; adjacent #3935 covers cleanup of completed results, not interrupted table reads.
  • No credentials or sensitive target data included.

Area

Evidence, artifacts, or reconstruction

Observed behavior

A valid default string table followed by an invalid UTF-8 locale table fails as expected, but the error retains only file-snapshot-hash. Completed manifest, parsed metadata, inventory and default string facts disappear. This also occurs when workspace deletion fails and is later retried.

Reproduction

Authored filesystem/provider control on f1edf0da0: a shell substitute for Apktool writes real-shaped YAML/manifest/default strings and a one-byte invalid UTF-8 res/values-de/strings.xml. Execute decode_android_resources with {path: ownedFixture, include_strings:true, locales:["de"]}. Two selected controls (cleanup allowed/denied) both fail the retained-facts assertion; 60 unrelated tests skipped. No real decoder or APK target execution claimed.

Expected behavior

Preserve already completed facts as explicitly partial Evidence, plus the original physical failure and exact cleanup ownership. Do not fabricate counts/status for the failed or unattempted tables. Repository lifecycle rules require partial observations to survive failure and cleanup.

Impact and scope

Observed twice in the authored variants; completed local evidence becomes unavailable after owned workspace cleanup. No user incident frequency or real Apktool qualification: NOT_ENOUGH_INFO. Source-derived cause: projectApktoolStringTables throws away its local completed rows; provider catch only retains the input snapshot.

REA version

f1edf0da0 (source)

Runtime and platform

Node24.18.0; macOS arm64

Target and artifact context

Owned synthetic input; authored decoder substitute and real XML/YAML files.

Interface

Shared provider workflow used by CLI/MCP

Evidence

src/apktool/ApktoolStringTables.ts table-loop read failure and src/apktool/ApktoolProvider.ts catch snapshot fallback. Both authored controls receive {kind:"file-snapshot-hash", ...} instead of completed partial Evidence. Original UTF-8 failure and cleanup ownership remain present; the missing completed facts are the reported defect.

Originally created by @morluto on GitHub (Oct 17, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/4880 ### Before submitting - [x] Searched open/closed `apktool partial failure`; adjacent #3935 covers cleanup of completed results, not interrupted table reads. - [x] No credentials or sensitive target data included. ### Area Evidence, artifacts, or reconstruction ### Observed behavior A valid default string table followed by an invalid UTF-8 locale table fails as expected, but the error retains only `file-snapshot-hash`. Completed manifest, parsed metadata, inventory and default string facts disappear. This also occurs when workspace deletion fails and is later retried. ### Reproduction Authored filesystem/provider control on f1edf0da0: a shell substitute for Apktool writes real-shaped YAML/manifest/default strings and a one-byte invalid UTF-8 `res/values-de/strings.xml`. Execute `decode_android_resources` with `{path: ownedFixture, include_strings:true, locales:["de"]}`. Two selected controls (cleanup allowed/denied) both fail the retained-facts assertion; 60 unrelated tests skipped. No real decoder or APK target execution claimed. ### Expected behavior Preserve already completed facts as explicitly partial Evidence, plus the original physical failure and exact cleanup ownership. Do not fabricate counts/status for the failed or unattempted tables. Repository lifecycle rules require partial observations to survive failure and cleanup. ### Impact and scope Observed twice in the authored variants; completed local evidence becomes unavailable after owned workspace cleanup. No user incident frequency or real Apktool qualification: NOT_ENOUGH_INFO. Source-derived cause: `projectApktoolStringTables` throws away its local completed rows; provider catch only retains the input snapshot. ### REA version f1edf0da0 (source) ### Runtime and platform Node24.18.0; macOS arm64 ### Target and artifact context Owned synthetic input; authored decoder substitute and real XML/YAML files. ### Interface Shared provider workflow used by CLI/MCP ### Evidence `src/apktool/ApktoolStringTables.ts` table-loop read failure and `src/apktool/ApktoolProvider.ts` catch snapshot fallback. Both authored controls receive `{kind:"file-snapshot-hash", ...}` instead of completed partial Evidence. Original UTF-8 failure and cleanup ownership remain present; the missing completed facts are the reported defect.
bsakaguchi 2026-10-31 00:35:09 +00:00
  • closed this issue
  • added the
    triage
    bug
    labels
Author
Owner

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

Fixed in 34a88d6c1, pushed to main. String-table projection now returns completed facts alongside the exact original cause. Shared provider assembly retains partial Evidence before the existing cleanup path; failed/unattempted rows and counts are not fabricated, and the interrupted selection is disclosed. Existing producer observations retain precedence.

Validation: four authored filesystem controls fail unchanged f1edf0da0; 99 focused checks across six files pass. Covers late cancellation during cleanup, denied cleanup and retry, between-table cancellation, exact failure identity, and CLI/MCP contracts. Public CLI failure now retains metadata/manifest/default strings with unchanged original failure framing. check:fast, docs:check, discovery1556 and both source reviews pass.

Twelve small normal-path CLI tasks retain exact complete replies; no speedup claim. The failure reply grows from an estimated189 to696 cl100k tokens to carry completed Evidence. These controls use a shell substitute and owned files, not real Apktool qualification. Large-case memory and whole-agent costs remain unmeasured. Heavy tests/profiling stayed stopped. Earlier metadata/manifest/inventory-stage failures remain outside this table-interruption fix and need continued audit.

<!-- gh-comment-id:6240545337 --> @morluto commented on GitHub (Oct 17, 2026): Fixed in 34a88d6c1, pushed to main. String-table projection now returns completed facts alongside the exact original cause. Shared provider assembly retains partial Evidence before the existing cleanup path; failed/unattempted rows and counts are not fabricated, and the interrupted selection is disclosed. Existing producer observations retain precedence. Validation: four authored filesystem controls fail unchanged f1edf0da0; 99 focused checks across six files pass. Covers late cancellation during cleanup, denied cleanup and retry, between-table cancellation, exact failure identity, and CLI/MCP contracts. Public CLI failure now retains metadata/manifest/default strings with unchanged original failure framing. check:fast, docs:check, discovery1556 and both source reviews pass. Twelve small normal-path CLI tasks retain exact complete replies; no speedup claim. The failure reply grows from an estimated189 to696 cl100k tokens to carry completed Evidence. These controls use a shell substitute and owned files, not real Apktool qualification. Large-case memory and whole-agent costs remain unmeasured. Heavy tests/profiling stayed stopped. Earlier metadata/manifest/inventory-stage failures remain outside this table-interruption fix and need continued audit.
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#3032
No description provided.