fix: require Android contact and calendar write permissions#99204
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 2, 2026, 4:17 PM ET / 20:17 UTC. Summary PR surface: Source +91, Tests +265, Docs +23, Other +769. Total +1148 across 40 files. Reproducibility: yes. Current main reports Contacts and Calendar from read permissions only while add handlers require write permissions, and the PR discussion includes real Gateway output showing the shipped read-only baseline and corrected candidate states. Review metrics: 2 noteworthy metrics.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land or squash the exact merge result that only changes Android Do we have a high-confidence way to reproduce the issue? Yes. Current main reports Contacts and Calendar from read permissions only while add handlers require write permissions, and the PR discussion includes real Gateway output showing the shipped read-only baseline and corrected candidate states. Is this the best way to solve the issue? Yes. Tightening the combined AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4df175baafcf. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +91, Tests +265, Docs +23, Other +769. Total +1148 across 40 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Land-ready validation on exact candidate behavior:
Real Android/Gateway proof (API 36.1 emulator, actual
This exercises the shipped failure and the corrected partial/full-grant states through the real node transport, not a mocked payload. Screenshots would only show the permission setup summary; the Gateway response is the authoritative changed output, so no visual artifact was added. |
|
Merged via squash.
|
…#99204) * fix: require Android contact and calendar write permissions * test(android): cover partial permission grants --------- Co-authored-by: NianJiuZst <180004567+users.noreply.github.com> Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
device.permissionscould report Contacts or Calendar as granted when Android had only granted the read half of the permission pair. The actual contact and calendar add flows require write access, and the onboarding/settings permission rows request both read and write, so the device status payload could overstate what the app can do.Why This Change Was Made
This updates the Android device permission payload to require both read and write grants before reporting the combined Contacts or Calendar capability as granted. It also adds Robolectric regression coverage for the read-only and read+write cases for both permission rows.
User Impact
Third-party onboarding and permission diagnostics now match the write-backed commands. Users should no longer see Contacts or Calendar as authorized while add-style actions still fail because the write permission is missing.
Evidence
git diff --checkcd apps/android && ./gradlew :app:testThirdPartyDebugUnitTest --tests ai.openclaw.app.node.DeviceHandlerTestcd apps/android && ./gradlew :app:testPlayDebugUnitTest --tests ai.openclaw.app.node.DeviceHandlerTest.agents/skills/autoreview/scripts/autoreview --mode local-> clean, no accepted/actionable findingsAI-assisted: yes