[PR #4663] [MERGED] fix(adb): mark unknown permission coverage partial #6348

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4663
Author: @gongfpp
Created: 10/17/2026
Status: ✅ Merged
Merged: 10/17/2026
Merged by: @morluto

Base: main ← Head: fix/unknown-package-permission-count


📝 Commits (1)

  • 0c06f1c fix(adb): mark unknown package coverage partial

📊 Changes

4 files changed (+66 additions, -12 deletions)

View changed files

📝 src/adb/AdbProvider.test.ts (+26 -2)
📝 src/adb/AdbProvider.ts (+4 -2)
📝 src/adb/AdbShellOutput.test.ts (+17 -1)
📝 src/adb/AdbShellOutput.ts (+19 -7)

📄 Description

Summary

Follow-up to #4665 for Issue #4654. The merged change handles explicit pkg=null; this PR covers unestablished package state and keeps permission coverage visibly partial instead of reporting a complete zero.

Expected behavior

  • pkg=null with no requested-permissions section: requested_permissions_count: null, coverage: "partial".
  • No recognized pkg value and no requested-permissions section: also unknown (null / partial).
  • A confirmed loaded pkg=Package{...} with no requested-permissions section: known empty (0 / complete).
  • When the requested-permissions section is present, count its listed entries.

Change and scope

  • Track whether the permission section was present and whether dumpsys established a loaded package.
  • Mark package analysis partial whenever the requested-permissions count is unknown.
  • Keep the existing nullable output contract; no schema, CLI/MCP contract, generated metadata, or device-operation changes.
  • ADB package analysis only. The PR is a follow-up to the explicit pkg=null fix merged in #4665, not a second implementation of that same fix.

Evidence and regression coverage

  • Fake-ADB/provider tests cover explicit pkg=null, missing pkg, a confirmed loaded package with no permission section, and a populated permission list.
  • Parser/provider focused tests: npm run test:local -- src/adb/AdbProvider.test.ts src/adb/AdbShellOutput.test.ts — 90 passed.
  • npm run check:fast — passed.
  • npm run build:cached — passed; emitted two existing INEFFECTIVE_DYNAMIC_IMPORT warnings.
  • No physical Android device was used.
  • Fresh current-head CI run 39017514115 passed all selected required checks: source tests, static checks, build package, all five test shards, Portable tests, CI required, and native package lanes. PR title check run 39017519480 passed; optional lanes were skipped by change selection.
  • Baseline main CI run 39016861665 passed for base a04053347034fb2a5061a927eebd0b5a6ef772c3.

Contract and boundary impact

  • Semantic owner: dumpsys package parser, then ADB package provider projection.
  • Unsupported or incomplete permission data remains explicit as null with partial coverage.
  • No target process interaction, mutation, or new dependency.

Author readiness

Human owner: @gongfpp

  • 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

  • Required CI is green for the current PR head.
  • I checked the final diff for secrets, unrelated changes, and unsupported claims.
  • Maintainer review and merge decision are complete.

🔄 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/4663 **Author:** [@gongfpp](https://github.com/gongfpp) **Created:** 10/17/2026 **Status:** ✅ Merged **Merged:** 10/17/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/unknown-package-permission-count` --- ### 📝 Commits (1) - [`0c06f1c`](https://github.com/morluto/rea/commit/0c06f1c511c16453f9a58341fb624bb5dcac3255) fix(adb): mark unknown package coverage partial ### 📊 Changes **4 files changed** (+66 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `src/adb/AdbProvider.test.ts` (+26 -2) 📝 `src/adb/AdbProvider.ts` (+4 -2) 📝 `src/adb/AdbShellOutput.test.ts` (+17 -1) 📝 `src/adb/AdbShellOutput.ts` (+19 -7) </details> ### 📄 Description ## Summary Follow-up to [#4665](https://github.com/morluto/rea/pull/4665) for Issue #4654. The merged change handles explicit `pkg=null`; this PR covers unestablished package state and keeps permission coverage visibly partial instead of reporting a complete zero. ## Expected behavior - `pkg=null` with no requested-permissions section: `requested_permissions_count: null`, `coverage: "partial"`. - No recognized `pkg` value and no requested-permissions section: also unknown (`null` / `partial`). - A confirmed loaded `pkg=Package{...}` with no requested-permissions section: known empty (`0` / `complete`). - When the requested-permissions section is present, count its listed entries. ## Change and scope - Track whether the permission section was present and whether `dumpsys` established a loaded package. - Mark package analysis partial whenever the requested-permissions count is unknown. - Keep the existing nullable output contract; no schema, CLI/MCP contract, generated metadata, or device-operation changes. - ADB package analysis only. The PR is a follow-up to the explicit `pkg=null` fix merged in #4665, not a second implementation of that same fix. ## Evidence and regression coverage - Fake-ADB/provider tests cover explicit `pkg=null`, missing `pkg`, a confirmed loaded package with no permission section, and a populated permission list. - Parser/provider focused tests: `npm run test:local -- src/adb/AdbProvider.test.ts src/adb/AdbShellOutput.test.ts` — 90 passed. - `npm run check:fast` — passed. - `npm run build:cached` — passed; emitted two existing `INEFFECTIVE_DYNAMIC_IMPORT` warnings. - No physical Android device was used. - Fresh current-head CI run `39017514115` passed all selected required checks: source tests, static checks, build package, all five test shards, Portable tests, CI required, and native package lanes. PR title check run `39017519480` passed; optional lanes were skipped by change selection. - Baseline main CI run `39016861665` passed for base `a04053347034fb2a5061a927eebd0b5a6ef772c3`. ## Contract and boundary impact - Semantic owner: `dumpsys package` parser, then ADB package provider projection. - Unsupported or incomplete permission data remains explicit as `null` with `partial` coverage. - No target process interaction, mutation, or new dependency. ## Author readiness Human owner: @gongfpp - [x] 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. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. ## Before merge - [x] Required CI is green for the current PR head. - [ ] I checked the final diff for secrets, unrelated changes, and unsupported claims. - [ ] Maintainer review and merge decision are complete. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:13:46 +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#6348
No description provided.