feat(calendar): add --timezone flag to event create#844
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 19, 2026, 3:10 AM ET / 07:10 UTC. Summary Reproducibility: not applicable. as a bug reproduction: this PR adds a convenience flag rather than fixing broken documented behavior. Source inspection confirms current main lacks the flag, and the PR body/tests demonstrate the new behavior. Review metrics: 3 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review detailsBest possible solution: Land the focused additive flag if maintainers want this calendar-create convenience, while keeping granular start/end timezone flags for asymmetric zones. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction: this PR adds a convenience flag rather than fixing broken documented behavior. Source inspection confirms current main lacks the flag, and the PR body/tests demonstrate the new behavior. Is this the best way to solve the issue? Yes technically: the patch reuses the existing event DateTime timezone validation path, leaves granular flags intact, and adds focused coverage. The remaining decision is product acceptance of the new flag surface, with a maintainer-authored changelog entry already providing positive signal. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c172741709aa. Label changesLabel justifications:
Evidence reviewedWhat 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
|
706dab4 to
f7bee90
Compare
Apply one IANA timezone to both --from and --to via --timezone/--tz, mutually exclusive with the granular --start-timezone/--end-timezone flags. Mirrors the existing --timezone/--tz on `calendar create-calendar`. Adds resolveUnifiedTimezone (mutex + set-both), which returns the flag name so invalid-zone/all-day errors attribute to the flag the user set. Includes unit + command tests, regenerated command docs, and a changelog entry. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
f7bee90 to
b24680b
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Landed after maintainer review and exact-head validation.
|
Summary
calendar createrequires--start-timezoneand--end-timezoneto be setseparately to label an event's start/end with a named IANA zone. This adds a
single
--timezone/--tzflag that applies one zone to both endpoints.--timezone <IANA>/--tz <IANA>sets the timezone on both--fromand--to.--start-timezone/--end-timezone— passing italongside either is a usage error (the granular flags remain for the
asymmetric case).
--timezone/--tzflag oncalendar create-calendar.This flag is specific to
calendar create.calendar updatecould gain the sameconvenience later, but its timezone handling is more involved — it depends on
which of
--from/--tois being changed — so it's intentionally left out ofscope here.
Why
For most events the start and end are in the same timezone — wanting different
zones for each is the unusual case. Setting that single zone today means
repeating it across both
--start-timezoneand--end-timezone, which is fiddlyand easy to get half-right (one set, the other forgotten).
--timezonecollapsesthe common case to one flag and removes that easy mistake, while the
mutual-exclusivity check keeps the rarer split-zone case explicit.
Behavior proof
Live round-trip against a real account (account/event id redacted; throwaway
event deleted afterward). Both endpoints persist the named zone, and the event
is gone after delete:
Testing
make fmt-check,make lint,make docs-checkclean; regenerated the commandreference with
make docs-commands.go test ./internal/cmd -run 'UnifiedTimezone|ResolveUnifiedTimezone'— coversset-both, the conflict error (exit 2), and invalid-zone/all-day error attribution.
Compatibility
Additive and non-breaking —
--timezoneis new and existing--start-timezone/--end-timezoneusage is unchanged. Kong scopes the--tzalias per command, so there's no collision with
create-calendar.No
CHANGELOG.mdentry — left to the release/landing process per repo convention.