Skip to content

calendar update --all-day keeps incompatible timed fields #1348

Open

Description

@finn-atlas

Problem

gog calendar update --all-day can fail with Google API error (400 invalid): Invalid start time when it converts an existing timed event to an all-day event.

The update patch sends start.date and end.date, but it does not clear the existing dateTime and timeZone fields. Google applies the nested patch to the existing event, so each boundary can contain both timed and all-day fields.

Reproduction

Start with a normal, non-recurring timed event. Then run:

gog calendar update primary EVENT_ID \
  --from 2030-01-01 \
  --to 2030-01-02 \
  --all-day

The current dry-run request contains:

{
  "start": {"date": "2030-01-01"},
  "end": {"date": "2030-01-02"}
}

A live update of a normal timed event returned 400 Invalid start time. No recurring-event scope was involved.

Expected behavior

The patch clears dateTime and timeZone when it sets date. A timed update should clear a prior date field for the inverse conversion.

Activity

  1. added
    clawsweeper:intake:bugPreliminary submission classification; full source review pending.
    P2Normal priority bug or improvement with limited blast radius.
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    no-staleExempts this issue from stale automation.
    and removed
    clawsweeper:intake:bugPreliminary submission classification; full source review pending.
    on Nov 21, 2026
  2. clawsweeper commented on Nov 21, 2026

    @clawsweeper
    Contributor

    Codex review: this still needs some work.

    Summary
    This issue identifies a current serialization defect: calendar updates omit incompatible date fields instead of clearing them, and no fixing PR was found.

    Reproducibility: Current-main construction and the pinned serializer establish that incompatible fields are omitted from PATCH requests; the reporter supplies the resulting live 400, but no command or test was run here.

    Next step
    Fix update boundary serialization after establishing failing regressions for timed-to-all-day and inverse conversions, including preservation through recurrence normalization.

    Review details

    Best possible solution:

    Emit explicit incompatible-field nulls in update patches and preserve them through recurrence normalization.

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

    Current-main construction and the pinned serializer establish that incompatible fields are omitted from PATCH requests; the reporter supplies the resulting live 400, but no command or test was run here.

    Is this the best way to solve the issue?

    Update-specific NullFields handling is a narrow repair that preserves partial-update semantics without replacing whole events or changing shared create behavior.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The reported live Google API failure was not independently reproduced during this read-only review.

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

    Label changes

    Label changes:

    • add P2: A bounded calendar conversion operation fails while unrelated event operations remain available.
    • add impact:ux-friction: An accepted update command returns an opaque invalid-start-time error instead of converting the event.
    • add issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.
    • add clawsweeper:source-repro: Current issue advisory state selects this label.
    • add clawsweeper:queueable-fix: Current issue advisory state selects this label.
    • add clawsweeper:fix-shape-clear: Current issue advisory state selects this label.

    Label justifications:

    • P2: A bounded calendar conversion operation fails while unrelated event operations remain available.
    • impact:ux-friction: An accepted update command returns an opaque invalid-start-time error instead of converting the event.
    Evidence reviewed

    Acceptance criteria:

    • Establish failing serialized-request regressions for both conversion directions before applying the repair.
    • Verify recurrence normalization preserves null-clearing metadata and omitted boundaries stay absent.
    • go test ./internal/cmd -run 'TestCalendarUpdate' -count=1
    • make ci

    What I checked:

    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; those execution lanes are retired.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

    Reviewed November 21, 2026, 6:40 PM ET / 23:40 UTC.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal priority bug or improvement with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.no-staleExempts this issue from stale automation.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions