Repository navigation
fix(android): preserve notification forwarding consent - #129715
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 9:31 PM ET / August 26, 2026, 01:31 UTC. ClawSweeper reviewWhat this changesThe PR changes Android onboarding so notification forwarding remains enabled only when the user had already opted in and Android notification-listener access is currently granted. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open for maintainer handling. Current main still overwrites the forwarding preference from listener access alone; this focused repair preserves the documented separate consent choice and gates it on current listener access. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherAndroid onboarding collects device permissions and persists selected capabilities through the app view model. The stored notification-forwarding preference controls whether the Android notification listener sends notification data to the Gateway. flowchart LR
A[Onboarding permissions screen] --> B[Listener access check]
C[Stored forwarding preference] --> D[Onboarding apply decision]
B --> D
D --> E[Persisted forwarding setting]
E --> F[Notification listener]
F --> G[Gateway events]
Before merge
Agent review detailsSecurityNone. PR surfaceOther 0. Total 0 across 1 file. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain separate forwarding consent and listener access, with onboarding persisting their conjunction as this PR does. Do we have a high-confidence way to reproduce the issue? Yes—current main’s assignment at the onboarding apply boundary directly reproduces the overwrite whenever listener access is true and the stored forwarding preference is false. Is this the best way to solve the issue? Yes—the repair acts at the sole onboarding persistence decision, reuses the stored preference and existing Android listener-access fact, and matches the documented prerequisite relationship. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9c30c920feec. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
Problem
Android onboarding treated Notification Listener access as consent to forward notifications. If someone had explicitly disabled Forward Notifications, completing onboarding with listener access still granted silently re-enabled forwarding and could send notification titles and message content to the Gateway.
The Android documentation defines these as separate choices: forwarding is off by default, and listener access is a prerequisite rather than an opt-in.
Fix
Preserve the existing forwarding preference when onboarding applies permissions, and additionally require actual notification-listener access. This keeps an explicit opt-out disabled, preserves an existing opt-in while access is granted, and disables forwarding when listener access is revoked.
The change modifies one existing production line: +1/-1, net zero. It adds no permissions, configuration, helper, fallback, or testing seam.
Evidence
An Android 36 Google Play debug build exercised the real NotificationManager listener grant, the production onboarding Permissions screen, Continue action, and the persisted app preference:
Each fixed on-device scenario passed through the real application UI and actual Android notification-listener authorization. No user notifications were read and only the task app's own listener authorization was changed.
Validation
OnboardingFlowLogicTest63/63,SecurePrefsNotificationForwardingTest7/7, andDeviceNotificationListenerServiceTest8/8.