Skip to content

fix(calendar): Clear timed fields in all-day updates [AI-964] - #1349

Open
finn-atlas wants to merge 2 commits into
openclaw:mainfrom
finn-atlas:fix/calendar-all-day-patch
Open

finn-atlas wants to merge 2 commits into
openclaw:mainfrom
finn-atlas:fix/calendar-all-day-patch

Conversation

@finn-atlas

@finn-atlas finn-atlas commented Nov 21, 2026 •

Copy link
Copy Markdown

Closes #1348

What Problem This Solves

A timed Google Calendar event can fail with 400 Invalid start time when calendar update --all-day changes it to an all-day event. The patch sets the all-day date but leaves the existing timed fields in Google's nested event data.

User Impact

Users can convert events between timed and all-day forms with calendar update without leaving incompatible start or end fields.

Why This Change Was Made

Update requests now send JSON null values for the previous time representation. All-day updates clear dateTime and timeZone. Timed updates clear date.

Evidence

Calendar tests pass for both conversions, recurring updates, and restoring reminder defaults.

Dry runs of timed-to-all-day updates now send dateTime: null and timeZone: null with each all-day date, including recurring events.

make ci completed formatting and lint checks. Its full test run found two Gmail failures that also reproduce on origin/main:

  • TestGmailDraftsRawDirectTokenRequiresAccount
  • TestGmailSendRawDirectTokenRequiresConcreteAccount

@clawsweeper

clawsweeper Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@finn-atlas finn-atlas changed the title fix(calendar): clear timed fields in all-day updates fix(calendar): Clear timed fields in all-day updates [AI-964] Nov 21, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 22, 2026
@clawsweeper

clawsweeper Bot commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

Calendar updates explicitly clear incompatible timed or all-day fields and preserve those clears through recurrence normalization.

Example: Convert a timed event using --from 2030-01-01 --to 2030-01-02 --all-day.

  • Before: The patch omits existing timed fields, and the reporter observed Google returning 400 Invalid start time.
  • After: Each boundary sends its date alongside dateTime:null and timeZone:null.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The patch is focused and source review found no introduced defect, but required real-behavior proof is absent.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Converting a timed event to all-day can fail with an invalid-start-time error.
Reason: The change restores an existing update operation without introducing flags, defaults, or a competing implementation.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep open: this PR provides a focused fix for a current Calendar conversion bug, with no concrete correctness defect found.

Priority: P2
Reviewed head: 9c7d6d01d219a95bc13ec4cc6ee7da8e30503e5c

Before merge

  • Add real behavior proof - The complete body and discussion contain test and dry-run claims, but no observable after-fix CLI/API result establishing successful Google Calendar conversion; the contributor should supply terminal screenshots, logs, or live output with IPs, API keys, phone numbers, and non-public endpoints redacted. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.

Findings

None.

Tests

  • Missing end-to-end proof: Provide redacted terminal output showing the patched CLI successfully converts a real timed event to all-day and back, including a recurrence-normalized conversion.
Agent review details

How this fits together

The Calendar CLI turns update flags into a Google Calendar Event patch, normalizes recurrence boundaries when needed, and sends it through the Google API client.

flowchart LR
 A[Calendar update flags] --> B[Update plan]
 B --> C[Boundary construction]
 C --> D[Recurrence normalization]
 D --> E[Google client serialization]
 E --> F[Calendar Events Patch]
Loading

Technical review

Best possible solution:

Keep the update-specific null clears and metadata-preserving clone within the existing Calendar patch owner.

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

Main source and the pinned serializer establish omitted incompatible fields; the linked report supplies the resulting live 400, and no target code was run during this review.

Is this the best way to solve the issue?

Explicit nulls repair nested PATCH semantics without replacing whole events or changing create behavior, and preserving their metadata closes the recurrence path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 31c4e14186e8.

Provenance checked

  • Update boundary construction keeps the original intent (77c904e: The planning-module refactor carried boundary construction into its current file; it does not establish the defect's original introduction.)
  • Recurring boundary cloning keeps the original intent (fix(calendar): preserve RRULE and set timezone for recurring updates #392: Ensure recurring update requests contain timezone information from supplied or existing boundaries.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 77c904e adds internal/cmd/calendar_update_patch_plan.go:219 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 77c904ee3b9c; files: internal/cmd/calendar_update_patch_plan.go)

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P2: The repair addresses a bounded event-conversion failure while other Calendar operations remain available.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Label justifications:

  • P2: The repair addresses a bounded event-conversion failure while other Calendar operations remain available.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 21, 2026, 7:06 PM ET / November 22, 2026, 00:06 UTC.

@finn-atlas

Copy link
Copy Markdown
Author

The proof hold is acknowledged. I will not create or mutate a live calendar event for this PR: the originating operator explicitly prohibited calendar changes, and this repair has no authorized disposable calendar target.

Available evidence is the reported real pre-fix 400 Invalid start time, focused conversion and recurrence tests, and redacted --dry-run output showing dateTime: null and timeZone: null after the patch. A maintainer with an authorized scratch calendar must perform the requested live round trip. I am not requesting re-review until that proof exists.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. 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.

calendar update --all-day keeps incompatible timed fields

1 participant