Skip to content

fix: normalize Android all-day calendar events#100032

Closed
NianJiuZst wants to merge 1 commit into
openclaw:mainfrom
NianJiuZst:codex/fix-android-all-day-calendar
Closed

fix: normalize Android all-day calendar events#100032
NianJiuZst wants to merge 1 commit into
openclaw:mainfrom
NianJiuZst:codex/fix-android-all-day-calendar

Conversation

@NianJiuZst

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes Android calendar.add all-day events being written with the device timezone and caller-provided instants instead of Android provider-compatible UTC all-day rows.

Why This Change Was Made

Android CalendarContract all-day events need UTC timezone metadata and UTC-midnight DTSTART/DTEND values. This change normalizes only the all-day path to UTC day boundaries and keeps timed events on the existing device-timezone path.

User Impact

calendar.add requests with isAllDay: true now create stable all-day Android calendar events instead of depending on OEM provider tolerance for invalid all-day rows that may be rejected or stored on the wrong date.

Evidence

  • node scripts/run-android-gradle.mjs :app:testPlayDebugUnitTest --tests ai.openclaw.app.node.CalendarHandlerTest
  • git diff --check
  • node scripts/run-android-gradle.mjs :app:ktlintCheck was attempted and failed on pre-existing unrelated ktlint violations in apps/android/app/src/test/java/ai/openclaw/app/chat/ChatControllerCommandControlsTest.kt, apps/android/app/src/test/java/ai/openclaw/app/gateway/InvokeErrorParserTest.kt, and apps/android/app/src/test/java/ai/openclaw/app/ui/GatewayConfigResolverTest.kt.
  • Autoreview skipped at requester direction for this round.

@clawsweeper

clawsweeper Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 4, 2026, 1:41 PM ET / 17:41 UTC.

Summary
The branch adds a per-request timezone for Android calendar inserts, normalizes all-day add ranges to UTC midnight boundaries, and adds a unit test for that all-day path.

PR surface: Other +47. Total +47 across 2 files.

Reproducibility: yes. source inspection gives a high-confidence reproduction path: current main sends all-day calendar.add requests to CalendarContract with caller instants and the device timezone. I did not establish a live provider failure in this read-only review.

Review metrics: none identified.

Merge readiness
Overall: 🦪 silver shellfish
Proof: 🦪 silver shellfish
Patch quality: 🐚 platinum hermit
Result: blocked until real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Add redacted device or emulator proof, such as logs, terminal output, or a short recording, showing the all-day event insert succeeds and lands on the intended date; redact IPs, API keys, phone numbers, non-public endpoints, and other private details.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR body and comments provide unit/CI evidence but no redacted device or emulator output showing CalendarProvider accepted and stored the all-day event; after adding proof, update the PR body for automatic re-review or ask a maintainer to comment @clawsweeper re-review.

Risk before merge

  • [P1] Real Android CalendarProvider behavior is not proven yet; unit tests and CI do not show a device or emulator accepting and storing the all-day row on the intended date.

Maintainer options:

  1. Decide the mitigation before merge
    Merge this narrow Android fix after redacted device or emulator proof shows calendar.add creates an all-day event with UTC timezone metadata and UTC-midnight boundaries.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P1] Human or contributor follow-up is needed for real Android provider proof; there is no concrete ClawSweeper code repair to queue.

Security
Cleared: The diff only changes Android Kotlin calendar handling and a unit test; it does not touch dependencies, CI execution, permissions, secrets, or package supply-chain surfaces.

Review details

Best possible solution:

Merge this narrow Android fix after redacted device or emulator proof shows calendar.add creates an all-day event with UTC timezone metadata and UTC-midnight boundaries.

Do we have a high-confidence way to reproduce the issue?

Yes, source inspection gives a high-confidence reproduction path: current main sends all-day calendar.add requests to CalendarContract with caller instants and the device timezone. I did not establish a live provider failure in this read-only review.

Is this the best way to solve the issue?

Yes, this is the best narrow fix shape: normalize the Android calendar.add request before the CalendarContract insert and keep timed events on the existing device-timezone path. The remaining gap is real Android provider proof, not a different implementation layer.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 0869edc23b0d.

Label changes

Label justifications:

  • P2: This is a focused Android calendar correctness fix with limited blast radius and no evidence of an urgent broad regression.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body and comments provide unit/CI evidence but no redacted device or emulator output showing CalendarProvider accepted and stored the all-day event; after adding proof, update the PR body for automatic re-review or ask a maintainer to comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Other +47. Total +47 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 51 4 +47
Total 2 51 4 +47

What I checked:

Likely related people:

  • obviyus: Authored and merged the Android capabilities PR that added calendar.add and the CalendarHandler behavior this PR changes. (role: feature introducer; confidence: high; commits: 079bc2461315, f75385981aa1, 44f99c90adb2; files: apps/android/app/src/main/java/ai/openclaw/app/node/CalendarHandler.kt, apps/android/app/src/main/java/ai/openclaw/app/node/InvokeDispatcher.kt)
  • Vincent Koc: Current checkout blame and release-history commits carry the Android calendar handler in the present main tree, so this is a useful routing signal despite the original feature coming from earlier Android work. (role: recent area committer; confidence: medium; commits: 2be9e32a597f, e085fa1a3ffd; files: apps/android/app/src/main/java/ai/openclaw/app/node/CalendarHandler.kt, apps/android/app/src/test/java/ai/openclaw/app/node/CalendarHandlerTest.kt)
  • NianJiuZst: Beyond authoring this PR, this contributor recently landed adjacent iOS node calendar permission work, though not the Android CalendarHandler implementation history. (role: adjacent node-calendar contributor; confidence: low; commits: 26855644f572; files: apps/ios/Sources/Calendar/CalendarService.swift)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (1 earlier review cycle)
  • reviewed 2026-07-04T17:34:52.876Z sha 4363ff3 :: needs real behavior proof before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Jul 4, 2026
@steipete steipete self-assigned this Jul 5, 2026
steipete added a commit that referenced this pull request Jul 5, 2026
steipete added a commit that referenced this pull request Jul 5, 2026
* fix(agents): harden LSP process failures

Source: #100450

Co-authored-by: morluto <[email protected]>

* fix(sandbox): report effective workspace layout

Sources: #100435, #100439

Co-authored-by: Aniruddha Adak <[email protected]>

Co-authored-by: ZengWen-DT <[email protected]>

* fix(security): fail install checks on stream errors

Source: #100413

Co-authored-by: 陈宪彪0668000387 <[email protected]>

* fix(android): normalize all-day calendar events

Source: #100032

Co-authored-by: NianJiuZst <[email protected]>

* fix(ios): serialize push-to-talk lifecycle

Source: #99942

Co-authored-by: NianJiuZst <[email protected]>

* fix(talk): reject inherited provider names

Source: #99849

Co-authored-by: zenglingbiao <[email protected]>

* fix(android): stop voice capture in background

Source: #99840

Co-authored-by: xialonglee <[email protected]>

* fix(cron): preserve fallback result classification

Source: #99913

Co-authored-by: jincheng-xydt <[email protected]>

* fix(google): bound Vertex response decompression

Source: #99812

Co-authored-by: 黄剑雄0668001315 <[email protected]>

* fix(plugins): report malformed discovery JSON

Source: #99892

Co-authored-by: 陈宪彪0668000387 <[email protected]>

* test(sandbox): configure non-default workspace fixture

* test: fix small-fix batch validation

---------

Co-authored-by: morluto <[email protected]>
Co-authored-by: ZengWen-DT <[email protected]>
Co-authored-by: 陈宪彪0668000387 <[email protected]>
Co-authored-by: NianJiuZst <[email protected]>
Co-authored-by: zenglingbiao <[email protected]>
Co-authored-by: xialonglee <[email protected]>
Co-authored-by: jincheng-xydt <[email protected]>
Co-authored-by: 黄剑雄0668001315 <[email protected]>
@steipete

steipete commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Thanks @NianJiuZst — your Android all-day calendar fix was incorporated into #100483, landed as aaf5ab9. The landed version covers same-day expansion, multi-day UTC-midnight bounds, and unchanged timed-event instants/timezones. Contributor credit is preserved. Closing this superseded PR.

@steipete steipete closed this Jul 5, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 6, 2026
* fix(agents): harden LSP process failures

Source: openclaw#100450

Co-authored-by: morluto <[email protected]>

* fix(sandbox): report effective workspace layout

Sources: openclaw#100435, openclaw#100439

Co-authored-by: Aniruddha Adak <[email protected]>

Co-authored-by: ZengWen-DT <[email protected]>

* fix(security): fail install checks on stream errors

Source: openclaw#100413

Co-authored-by: 陈宪彪0668000387 <[email protected]>

* fix(android): normalize all-day calendar events

Source: openclaw#100032

Co-authored-by: NianJiuZst <[email protected]>

* fix(ios): serialize push-to-talk lifecycle

Source: openclaw#99942

Co-authored-by: NianJiuZst <[email protected]>

* fix(talk): reject inherited provider names

Source: openclaw#99849

Co-authored-by: zenglingbiao <[email protected]>

* fix(android): stop voice capture in background

Source: openclaw#99840

Co-authored-by: xialonglee <[email protected]>

* fix(cron): preserve fallback result classification

Source: openclaw#99913

Co-authored-by: jincheng-xydt <[email protected]>

* fix(google): bound Vertex response decompression

Source: openclaw#99812

Co-authored-by: 黄剑雄0668001315 <[email protected]>

* fix(plugins): report malformed discovery JSON

Source: openclaw#99892

Co-authored-by: 陈宪彪0668000387 <[email protected]>

* test(sandbox): configure non-default workspace fixture

* test: fix small-fix batch validation

---------

Co-authored-by: morluto <[email protected]>
Co-authored-by: ZengWen-DT <[email protected]>
Co-authored-by: 陈宪彪0668000387 <[email protected]>
Co-authored-by: NianJiuZst <[email protected]>
Co-authored-by: zenglingbiao <[email protected]>
Co-authored-by: xialonglee <[email protected]>
Co-authored-by: jincheng-xydt <[email protected]>
Co-authored-by: 黄剑雄0668001315 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants