Repository navigation
fix(calendar): truncate the series when updating future instances by ID - #1317
saariuslystoned wants to merge 2 commits into
Conversation
calendar update --scope future resolves an instance ID to its series, but then truncated the recurrence of plan.EventID, the ID the user passed. With an instance ID from calendar events or calendar search, both PATCHes went to the instance and the original series kept every later occurrence. Return the whole scope resolution from applyUpdateScope and truncate ParentEventID, as calendar delete --scope future does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesFuture-occurrence updates now truncate the resolved parent series when the user supplies an instance ID. Example: Update ser1_20250102T100000Z with --scope future --original-start 2025-01-02T10:00:00Z.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current-main Calendar targeting bug with a focused change; the earlier changelog finding is resolved and no actionable defects remain. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Calendar update command resolves an event and recurrence scope, patches the selected instance, and truncates the parent series through the Google Calendar client. flowchart TD
A[Calendar update command] --> B[Update plan]
B --> C[Shared scope resolver]
C --> D[Instance update]
C --> E[Parent truncation]
D --> F[Google Calendar client]
E --> F
Technical reviewBest possible solution: Preserve the shared scope result through the update command and truncate its parent series, as this PR does. Do we have a high-confidence way to reproduce the issue? Current-main source deterministically sends truncation to the supplied instance ID; the contributor also supplies failing-main and passing-branch CLI traces against a local HTTP stand-in. Is this the best way to solve the issue? The patch repairs the lost parent ID using the existing shared resolver and preserves the established series-ID path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e8428c36dd31. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 8, 2026, 2:19 PM ET / 19:19 UTC (Revision 2). |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Thank you for the fix. I reproduced the claim and consolidated truncating the parent event series for future-instance updates into #1336, with regression coverage and your coauthor credit retained. The full |
What problem this solves
calendar eventsandcalendar searchlist expanded instances (singleEvents=true), so the event ID a user or script has for a recurring meeting is usually an instance ID such asser1_20250102T100000Z.resolveRecurringScopeResolutionaccepts that and resolves the series asParentEventID;TestApplyUpdateScopeFuture_RecurringInstanceIDpins that behavior.calendar delete --scope futurethen truncatesresolution.ParentEventID.calendar update --scope futuredrops it.applyUpdateScopereturns only the target and the recurrence, andRuntruncatesplan.EventID, the ID the user typed. With an instance ID, both PATCHes go to the instance and the command exits 0:The second PATCH ends the instance's own recurrence a second before it starts, and
ser1is never truncated, so the original series keeps all its later occurrences. Passing the series IDser1works correctly, because there the typed ID is the series.Change
applyUpdateScopereturns the wholerecurringScopeResolution.calendar updatepatchesTargetEventIDand truncatesParentEventIDwithParentRecurrence, the same patterncalendar delete --scope futurefollows. The three existingapplyUpdateScopetests are updated for the new return value, and the instance-ID test now also assertsParentEventID.Evidence
internal/cmd/calendar_update_future_instance_test.gorunsCalendarUpdateCmd --scope futureagainst anhttptestdaily series and records each PATCH target, once with the series ID (control) and once with the instance ID. Onmain(e8428c3) the instance-ID case sends the truncation toser1_20250102T100000Z; with this change it goes toser1withUNTIL=20250102T095959Z, matching the series-ID case. The existing update, scope, delete and recurrence tests pass.A built
bin/gogfrommainand from this branch was run against a local Calendar stand-in throughGOG_GOOGLE_API_BASE_URL, with an emptyGOG_HOMEand the file keyring. The stand-in is not Google:make cipassed locally (macOS arm64, go1.27.3).Boundary: no live Google Calendar was used. This change only makes the instance-ID path send the same requests the series-ID path already sends; it does not change how
--scope futuresplits a series.🤖 Generated with Claude Code