[PR #7264] feat(android): project declared component process and access flags #7758

Open
opened 2026-11-03 13:40:12 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/7264
Author: @harshjohiya
Created: 10/26/2026
Status: 🔄 Open

Base: main ← Head: fix/android-manifest-component-attributes-4448


📝 Commits (5)

  • 51f914e feat(android): project declared component process and access flags
  • 2d77dd3 feat(android): accept component declaration fields in result schema
  • b18a692 docs(android): explain component declaration semantics and limits
  • 356bae9 test(android): cover component attributes and bounded declarations
  • 987b5ac test(android): enforce cumulative process declaration budget

📊 Changes

4 files changed (+173 additions, -1 deletions)

View changed files

📝 docs/android-analysis.md (+10 -0)
📝 src/android/AndroidManifestComponents.ts (+64 -1)
📝 src/domain/android/androidAnalysis.ts (+4 -0)
📝 tests/boundary/android/androidManifestComponents.test.ts (+95 -0)

📄 Description

Summary

Adds a bounded, declaration-only projection of three remaining Android manifest component attributes: android:enabled, android:process, and provider android:grantUriPermissions.

Related: #4448 (partial contribution; this does not close the full issue).

Problem and expected behavior

The component inventory currently exposes exported state, permissions, intent actions, and provider authorities, but omits these three declared attributes. Analysts otherwise need to inspect raw manifest XML. The new fields preserve exact process spellings and represent missing or nonliteral boolean declarations as null rather than inferring runtime state.

Change and scope

  • Extend the existing bounded manifest parser with enabled, process, and grant_uri_permissions fields.
  • Keep projection literal and namespace-aware; do not infer application defaults, merged manifests, resource values, or effective runtime state.
  • Limit copied process declarations to a shared 1 MiB budget, recording partial coverage when exhausted.
  • Add nullable schema defaults for historical Evidence without these fields.
  • Document the new declarations, uncertainty, and limits.
  • Add regression cases for literals, nonliteral declarations, namespace isolation, budget exhaustion, and older result shapes.

No provider, runtime target action, CLI parameter, or authority expansion. The remaining #4448 requests (intent-filter structure, metadata locations, class-name alias handling) are outside this PR.

Contract and boundary impact

  • Semantic owner: decoded Android manifest component parser; result schema is the consumer.
  • Contribution scope: existing static Android inspection, no new capability requiring advance maintainer approval.
  • CLI/MCP output: additive nullable component fields.
  • Compatibility: previously serialized component objects parse with null defaults for the new fields.
  • Evidence/provenance: exact declarations; missing or unsupported values remain unknown, with limitations.
  • Provider/target effects: none beyond existing read-only APK inspection.
  • Generated package/catalog: no authored tool contract or generated artifact change.
  • Expected effects: documentation/usability and reading existing APK metadata only.

Evidence and validation

  • Source-derived: the existing parser omitted these attributes and the output schema was strict.
  • Added focused regression tests under tests/boundary/android/androidManifestComponents.test.ts, including a follow-up cumulative-budget regression prompted by Greptile review (commit 987b5ac).
  • Verified source diff and the newly pushed cumulative-budget test against the intended four-file scope. The test's 512 declarations are individually 2,050 UTF-8 bytes; the 512th crosses the 1 MiB shared cap.
  • Not executed: npm ci, Vitest, typecheck, npm run check:fast, and real JADX/APK verification. The execution environment could not resolve github.com for a local checkout; upstream CI workflows currently report action_required (no test-job results). The tests have been added but are not claimed to pass.
  • Before review/merge, run npm ci && npm run test:focused -- tests/boundary/android/androidManifestComponents.test.ts, npm run check:fast, and a representative real inspect-android-package workflow.

Compatibility, safety, and release

No new process execution, network access, code injection, or target mutation. Static declared attributes are not treated as runtime facts. No breaking schema changes are intended.

Author readiness

Human owner: @harshjohiya

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and no new provider is introduced.
  • The PR has one focused outcome and follows the conventional title style.
  • Related issue is linked as a partial contribution.
  • Focused and real-provider checks pass.
  • Owning documentation and output schema have been updated.
  • The human owner has reviewed the final diff, test evidence, and all validation gaps.

🔄 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/7264 **Author:** [@harshjohiya](https://github.com/harshjohiya) **Created:** 10/26/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/android-manifest-component-attributes-4448` --- ### 📝 Commits (5) - [`51f914e`](https://github.com/morluto/rea/commit/51f914ef37fad072e2d9965e224ffafee19fe65a) feat(android): project declared component process and access flags - [`2d77dd3`](https://github.com/morluto/rea/commit/2d77dd3f70fed480bd1ce69a7b3e1e6064473159) feat(android): accept component declaration fields in result schema - [`b18a692`](https://github.com/morluto/rea/commit/b18a692758523c1f844c25e973642256eb674144) docs(android): explain component declaration semantics and limits - [`356bae9`](https://github.com/morluto/rea/commit/356bae9b03fba33459bf68613a7fe91780687510) test(android): cover component attributes and bounded declarations - [`987b5ac`](https://github.com/morluto/rea/commit/987b5aceb66c7526e47cf6d064c22029c2f48c04) test(android): enforce cumulative process declaration budget ### 📊 Changes **4 files changed** (+173 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docs/android-analysis.md` (+10 -0) 📝 `src/android/AndroidManifestComponents.ts` (+64 -1) 📝 `src/domain/android/androidAnalysis.ts` (+4 -0) 📝 `tests/boundary/android/androidManifestComponents.test.ts` (+95 -0) </details> ### 📄 Description ## Summary Adds a bounded, declaration-only projection of three remaining Android manifest component attributes: `android:enabled`, `android:process`, and provider `android:grantUriPermissions`. Related: #4448 (partial contribution; this does **not** close the full issue). ## Problem and expected behavior The component inventory currently exposes exported state, permissions, intent actions, and provider authorities, but omits these three declared attributes. Analysts otherwise need to inspect raw manifest XML. The new fields preserve exact process spellings and represent missing or nonliteral boolean declarations as null rather than inferring runtime state. ## Change and scope - Extend the existing bounded manifest parser with `enabled`, `process`, and `grant_uri_permissions` fields. - Keep projection literal and namespace-aware; do not infer application defaults, merged manifests, resource values, or effective runtime state. - Limit copied process declarations to a shared 1 MiB budget, recording partial coverage when exhausted. - Add nullable schema defaults for historical Evidence without these fields. - Document the new declarations, uncertainty, and limits. - Add regression cases for literals, nonliteral declarations, namespace isolation, budget exhaustion, and older result shapes. No provider, runtime target action, CLI parameter, or authority expansion. The remaining #4448 requests (intent-filter structure, metadata locations, class-name alias handling) are outside this PR. ## Contract and boundary impact - Semantic owner: decoded Android manifest component parser; result schema is the consumer. - Contribution scope: existing static Android inspection, no new capability requiring advance maintainer approval. - CLI/MCP output: additive nullable component fields. - Compatibility: previously serialized component objects parse with null defaults for the new fields. - Evidence/provenance: exact declarations; missing or unsupported values remain unknown, with limitations. - Provider/target effects: none beyond existing read-only APK inspection. - Generated package/catalog: no authored tool contract or generated artifact change. - Expected effects: documentation/usability and reading existing APK metadata only. ## Evidence and validation - Source-derived: the existing parser omitted these attributes and the output schema was strict. - Added focused regression tests under `tests/boundary/android/androidManifestComponents.test.ts`, including a follow-up cumulative-budget regression prompted by Greptile review (commit `987b5ac`). - Verified source diff and the newly pushed cumulative-budget test against the intended four-file scope. The test's 512 declarations are individually 2,050 UTF-8 bytes; the 512th crosses the 1 MiB shared cap. - **Not executed:** `npm ci`, Vitest, typecheck, `npm run check:fast`, and real JADX/APK verification. The execution environment could not resolve github.com for a local checkout; upstream CI workflows currently report `action_required` (no test-job results). The tests have been added but are **not claimed to pass**. - Before review/merge, run `npm ci && npm run test:focused -- tests/boundary/android/androidManifestComponents.test.ts`, `npm run check:fast`, and a representative real `inspect-android-package` workflow. ## Compatibility, safety, and release No new process execution, network access, code injection, or target mutation. Static declared attributes are not treated as runtime facts. No breaking schema changes are intended. ## Author readiness Human owner: @harshjohiya - [ ] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [ ] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [ ] I declare this PR ready for initial maintainer review. ## Before merge - [x] This PR addresses a concrete problem or an agreed enhancement. - [x] Material scope and authority questions are resolved, and no new provider is introduced. - [x] The PR has one focused outcome and follows the conventional title style. - [x] Related issue is linked as a partial contribution. - [ ] Focused and real-provider checks pass. - [x] Owning documentation and output schema have been updated. - [ ] The human owner has reviewed the final diff, test evidence, and all validation gaps. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#7758
No description provided.