[PR #2438] [MERGED] feat(android): add opt-in package summaries and retained manifest views #5230

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

📋 Pull Request Information

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

Base: main ← Head: perf/android-metadata-workflow-20261013


📝 Commits (3)

  • 28c84e7 feat(android): add opt-in package summaries and retained manifest views
  • b4bde8b test(android): type the advertised schema at the validator boundary
  • 3538447 docs(perf): record real Android delivery and model outcomes

📊 Changes

14 files changed (+777 additions, -11 deletions)

View changed files

📝 docs/android-analysis.md (+21 -0)
📝 experiments/analysis-efficiency/README.md (+5 -0)
➕ experiments/analysis-efficiency/android-package-summary.md (+166 -0)
📝 experiments/analysis-efficiency/measure.mjs (+40 -4)
➕ src/application/android/AndroidPackageInspection.ts (+43 -0)
📝 src/contracts/analysisViewToolContracts.ts (+1 -1)
📝 src/contracts/android/androidToolContracts.ts (+13 -3)
📝 src/domain/analysisView/analysisView.ts (+29 -1)
➕ src/domain/analysisView/androidPackageView.ts (+136 -0)
📝 src/domain/analysisView/javascriptApplicationView.ts (+1 -1)
📝 src/domain/android/androidAnalysis.ts (+6 -0)
📝 src/server/createServer.ts (+1 -0)
📝 src/server/registerAndroidTools.ts (+20 -1)
➕ tests/boundary/mcp/androidPackageSummaryMcp.test.ts (+295 -0)

📄 Description

The real NewPipe metadata question previously received a 119,527-byte package reply containing decoded manifest and duplicate upstream output. Add explicit MCP detail: "summary" for all package/SDK/permission declarations, engine identity and counts while retaining complete original Evidence. Omitted/full requests and one-shot CLI remain complete; target/provider choices, analysis and cleanup are unchanged.

Return a distinct linked inspect_analysis_view summary. Read exact retained manifest text through kind: "android", facet: "manifest" and explicit UTF-16 pages without reopening the APK. Preserve nullable facts, original limitations, partial source status and APK versus engine identity. Reject unavailable retention before provider work. Existing servers keep the original complete request after schema discovery; no automatic fallback or general plugin/cache system is introduced.

Validation and measurements:

  • 27 relevant SDK/domain/Android boundary checks, a focused three-test rerun after a test-only schema typing correction, full supported compiler/lint pre-push and generated documentation/onboarding checks pass. The large protocol fixture reconstructs its exact 1 MiB manifest after source removal with one engine launch; it verifies production boundaries rather than real JADX behavior.
  • Actual NewPipe 0.29.1/JADX 0.7.1/Java SDK runs in complete/summary/summary/complete order preserve all selected facts/settings and three successful calls. Package replies fall to 8,659 bytes (about 92.8%); SDK workflows take 23.694–24.509 seconds. CPU/memory and these small timing differences establish no improvement. All three reply bytes fall 149,577 to 38,709.
  • Fresh old-runtime complete calls preserve the same original package output; authentic old Evidence imports, supports retained/portable summary and exact manifest pages, then exports unchanged under its original ID with an explicitly unavailable JADX JAR. Eleven real SDK calls preserve all 25,222 manifest units.
  • Four actual Codex CLI0.161.0 trials, requested gpt-5.6-terra high, retain APK bytes and remove profiles. Complete1:39,267 input /16,227 uncached /94.053s, facts pass. Summary1:128,417 /34,977 /150.401s, facts pass with three rejected client inputs and repeated reads. Summary2:54,437 /17,317 /123.677s, facts pass with three successful calls. Complete2 receives empty client tool metadata, makes zero MCP calls and fails facts; its20.774s is not comparable completed work. Root cause remains unknown. No model-token/time gain is claimed or promoted to defaults.
  • Owned phase-specific kernel witnesses verify payload completion/cleanup under unchanged oneCPU /3GiB early-stop /4GiB hard /noSwap /192task controls. Limit events are zero at that phase; final whole-scope counters and the complete physical grader remain unknown/false. Full catalog grows about0.34% versus8bc160 including intervening main changes.

Curated evidence: experiments/analysis-efficiency/android-package-summary.md. Raw receipts/models/profiles stay private outside Git. Frozen runtime28c84e78cf2fbfde4aceed345b773c59eb889f68 and file-table5332dda13981f043e146b3601ebec1f380d9f698280ca53d75786b638a912e11 are unchanged by later test/docs commits. Original failed attempts remain retained.

Own manual review completed with no blocking findings. All39 verification checks passed on exact finalhead35384474aa5425f5a4f257bb3976f8abbd4e9ec0; five release/publication checks were skipped. Normal exact-head squash merged f254f5ac2b on2026-10-13UTC. The merged main tree is identical to the verified branch. Starts from merged mainca2d15b3ee965bd7ab27204cdf4b96b117d148c1 in an isolated worktree. Continues#2016. No release/deployment.


🔄 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/2438 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/13/2026 **Status:** ✅ Merged **Merged:** 10/13/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `perf/android-metadata-workflow-20261013` --- ### 📝 Commits (3) - [`28c84e7`](https://github.com/morluto/rea/commit/28c84e78cf2fbfde4aceed345b773c59eb889f68) feat(android): add opt-in package summaries and retained manifest views - [`b4bde8b`](https://github.com/morluto/rea/commit/b4bde8bbaaa6956bfc558d8d5479f7b0bdcd5d5d) test(android): type the advertised schema at the validator boundary - [`3538447`](https://github.com/morluto/rea/commit/35384474aa5425f5a4f257bb3976f8abbd4e9ec0) docs(perf): record real Android delivery and model outcomes ### 📊 Changes **14 files changed** (+777 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `docs/android-analysis.md` (+21 -0) 📝 `experiments/analysis-efficiency/README.md` (+5 -0) ➕ `experiments/analysis-efficiency/android-package-summary.md` (+166 -0) 📝 `experiments/analysis-efficiency/measure.mjs` (+40 -4) ➕ `src/application/android/AndroidPackageInspection.ts` (+43 -0) 📝 `src/contracts/analysisViewToolContracts.ts` (+1 -1) 📝 `src/contracts/android/androidToolContracts.ts` (+13 -3) 📝 `src/domain/analysisView/analysisView.ts` (+29 -1) ➕ `src/domain/analysisView/androidPackageView.ts` (+136 -0) 📝 `src/domain/analysisView/javascriptApplicationView.ts` (+1 -1) 📝 `src/domain/android/androidAnalysis.ts` (+6 -0) 📝 `src/server/createServer.ts` (+1 -0) 📝 `src/server/registerAndroidTools.ts` (+20 -1) ➕ `tests/boundary/mcp/androidPackageSummaryMcp.test.ts` (+295 -0) </details> ### 📄 Description The real NewPipe metadata question previously received a 119,527-byte package reply containing decoded manifest and duplicate upstream output. Add explicit MCP `detail: "summary"` for all package/SDK/permission declarations, engine identity and counts while retaining complete original Evidence. Omitted/full requests and one-shot CLI remain complete; target/provider choices, analysis and cleanup are unchanged. Return a distinct linked `inspect_analysis_view` summary. Read exact retained manifest text through `kind: "android", facet: "manifest"` and explicit UTF-16 pages without reopening the APK. Preserve nullable facts, original limitations, partial source status and APK versus engine identity. Reject unavailable retention before provider work. Existing servers keep the original complete request after schema discovery; no automatic fallback or general plugin/cache system is introduced. Validation and measurements: - 27 relevant SDK/domain/Android boundary checks, a focused three-test rerun after a test-only schema typing correction, full supported compiler/lint pre-push and generated documentation/onboarding checks pass. The large protocol fixture reconstructs its exact 1 MiB manifest after source removal with one engine launch; it verifies production boundaries rather than real JADX behavior. - Actual NewPipe 0.29.1/JADX 0.7.1/Java SDK runs in complete/summary/summary/complete order preserve all selected facts/settings and three successful calls. Package replies fall to 8,659 bytes (about 92.8%); SDK workflows take 23.694–24.509 seconds. CPU/memory and these small timing differences establish no improvement. All three reply bytes fall 149,577 to 38,709. - Fresh old-runtime complete calls preserve the same original package output; authentic old Evidence imports, supports retained/portable summary and exact manifest pages, then exports unchanged under its original ID with an explicitly unavailable JADX JAR. Eleven real SDK calls preserve all 25,222 manifest units. - Four actual Codex CLI0.161.0 trials, requested gpt-5.6-terra high, retain APK bytes and remove profiles. Complete1:39,267 input /16,227 uncached /94.053s, facts pass. Summary1:128,417 /34,977 /150.401s, facts pass with three rejected client inputs and repeated reads. Summary2:54,437 /17,317 /123.677s, facts pass with three successful calls. Complete2 receives empty client tool metadata, makes zero MCP calls and fails facts; its20.774s is not comparable completed work. Root cause remains unknown. No model-token/time gain is claimed or promoted to defaults. - Owned phase-specific kernel witnesses verify payload completion/cleanup under unchanged oneCPU /3GiB early-stop /4GiB hard /noSwap /192task controls. Limit events are zero at that phase; final whole-scope counters and the complete physical grader remain unknown/false. Full catalog grows about0.34% versus8bc160 including intervening main changes. Curated evidence: `experiments/analysis-efficiency/android-package-summary.md`. Raw receipts/models/profiles stay private outside Git. Frozen runtime28c84e78cf2fbfde4aceed345b773c59eb889f68 and file-table5332dda13981f043e146b3601ebec1f380d9f698280ca53d75786b638a912e11 are unchanged by later test/docs commits. Original failed attempts remain retained. Own manual review completed with no blocking findings. All39 verification checks passed on exact finalhead35384474aa5425f5a4f257bb3976f8abbd4e9ec0; five release/publication checks were skipped. Normal exact-head squash merged f254f5ac2b804b353a711264bb178f43fdf07867 on2026-10-13UTC. The merged main tree is identical to the verified branch. Starts from merged mainca2d15b3ee965bd7ab27204cdf4b96b117d148c1 in an isolated worktree. Continues#2016. No release/deployment. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:04:59 +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#5230
No description provided.