Repository navigation
feat(android): apply caller-selected R8 mapping evidence - #7456
Conversation
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. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Medium impact] The reviewed changes appear safe to merge, with both numbered previous findings fixed and no new blocking issue found. SummaryAdds caller-selected R8/ProGuard mapping annotations to Android class and method inspection while keeping observed DEX identities separate.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
M[Caller-selected mapping] --> R[Read and hash bytes]
R --> I[Reuse or parse bounded index]
A[APK] --> J[JADX raw identities]
I --> P[Separate mapping claims]
J --> P
P --> E[Complete Evidence]
E --> S[Summary with parent identity]
Reviews (3) · Last reviewed commit: "perf(android): index mapping aliases and..." · Reviewed by Greptile |
Integrate the class, method and field mapping boundary from PR #7137 while preserving the shared manifest inventory and default-package regression. Co-authored-by: 555aaditya <[email protected]>
54282ee to
160573c
Compare
Summary
Fixes #6329. Apply a caller-selected local R8/ProGuard mapping to Android class/method inspection, including field and inner-class annotations. Observed raw DEX identities remain primary; mapped claims, exact descriptor/type checks, ambiguity, malformed records, coverage and mapping SHA-256 are separate structured facts.
Integrates 555aaditya's #7137 at
505b95eb6097e0d1fd8a12710e0f020936e166d1, preserving co-author credit and the shared manifest/default-package work from #7379. Adds explicit retained summaries so selected method replies do not repeat complete raw class metadata.Contract and boundary impact
mapping_path/--mapping-pathis accepted on class/method inspection; selectors remain observed names. Mapping/build association is caller-selected, never verified by a reported map ID. Search/reference selectors keep their existing contracts.detail: summarypreserves normalized symbols or the selected body, retaining complete parent Evidence and returning its identity/digest. CLI uses the existing non-overwriting--evidence_outputbundle flow. Omitted/complete detail remains compatible. Named SDK-converted output schemas include both forms.unknown, preserving raw identities. The separate 1 MiB whole-summary limit refuses oversized selections with a complete-source recovery path.Executed evidence
docs:check,format:checkanddocs:buildpass. Expanded 12-file Android run: 219/220 pass, including all 52 session/idle/cleanup cases. One existing package-summary SDK case hits 30 seconds under combined load; its unchanged four-case file passes with one worker (SDK case 11.479 s), without relaxing assertions or timeout. This limitation is recorded, not reported as an all-green combined run.Reproduction, pinned artifacts, all costs and failed attempts. Equivalent Conscrypt investigations include catalog discovery, six inspections and full proof export: text token estimates fall from ~178–180k to ~70k (about 61%); normalized fact digests match exactly. Four warm task samples per implementation have medians 0.905 → 0.783 s. Whole-task time/CPU/RSS samples and the small-case summary overhead are reported; no actual model billing, universal startup or memory improvement is claimed. Local expensive checks use two CPUs and a guarded process family.
Gaps: Linux x86-64/JDK21/JADX0.7.1/R8 mapping-format 2.1 only; no device/emulator, runtime linkage, source/line recovery, Windows/macOS, real mapping-format 2.2 producer or model-usage trial. Full inventories still cost more context than a known-method summary.
Review follow-up
All five Greptile findings are fixed at their producing boundaries: bounded incremental descriptor/type matching, shared request/idle retry of retained mapping descriptors (including mixed cleanup outcomes), deadline classification before cleanup composition, pre-resolved type aliases and direct residual-signature indexing. Related parser string ownership was measured through the real immutable Evidence ledger: four small facts retained ~40 MiB of source string backing; admission-owned UTF-16 strings eliminate that external retention in the same Node/V8 experiment while preserving code units. Post-review type/lint/build and 126 relevant parser/reader/cancellation/cleanup/session/MCP cases pass. The latest index follow-up additionally passes 60 parser, two report and seven MCP mapping cases. The admitted stress cases improve 20k-alias lookup from 5.17 s to 23 ms and 40k-signature parsing from 8.03 s to 322 ms, preserving answers.
Main archived the experiments tree during this PR. Fixtures/harness now use maintained tests paths and the report is under docs/verification; the branch is rebased onto main e99b6c2. Post-review real R8 qualification passes 43 calls; Conscrypt passes 21 calls with the same fact digest and ~61% lower estimated text tokens. All 90 observed CI failures at head 160573c reproduce on its pristine actual main parent 0676ad2, including the two newline-bearing ZCode cases. Cancelled cases without completed reports remain unverified by CI. Final head ff574b6: Greptile, static checks, build, docs, APK-signature and native-package baselines pass. All eight failed/cancelled shard logs plus source tests were audited: 86 observed failures (69 shard + 17 source), no new identity versus the earlier run, all reproduced at actual pristine main parent 9842299 (90-case control: 151.037 s, CPU 179.041 s, peak family 2481.4 MiB). Twenty-six cases expose diagnostics (24 identical, two differing only in generated temporary paths); the other 60 CI causes are hidden by cancellation, and unreported cancelled cases remain unknown. All five review threads are resolved. User-authorized admin merge bypasses these baseline failures and the unchecked human declarations; no human-review attestation is made.
Author readiness
Human owner: @gensokyo-dev
Before merge