Skip to content

fix(google-calendar): emit usable event ids from list_events and create_event - #13861

Merged
kodjima33 merged 3 commits into
BasedHardware:mainfrom
lukiod:fix/gcal-list-events-full-id
Sep 16, 2026
Merged

kodjima33 merged 3 commits into
BasedHardware:mainfrom
lukiod:fix/gcal-list-events-full-id

Conversation

@lukiod

@lukiod lukiod commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

list_events in plugins/omi-google-calendar-app/main.py printed each event id as event_id[:20] + "...". Google generated event ids are 26 base32hex characters and recurring instance ids append _YYYYMMDDTHHMMSSZ (Events resource, id field), so every id the tool handed back was truncated. get_event, update_event and delete_event send the id verbatim to the Calendar API and tell the user to "use 'list events' to find event IDs", so the read, reschedule and delete flows from chat all ended in Event not found.

create_event had the adjacent gap: its confirmation never included the id, so an event created in chat could not be updated or deleted in the same conversation without a separate list_events call.

Two commits, one per surface:

  1. list_events prints the complete id, matching what get_event and list_calendars already do.
  2. create_event appends ID: \`` to its confirmation.

Regression suite

plugins/omi-google-calendar-app/test_event_ids.py imports the production module with framework only stubs and drives the real handlers against a recorded Calendar API seam that only resolves exact ids. It asserts that every id printed by list_events (single and recurring instance shapes) round trips through get_event, update_event and delete_event, that the 20 character prefix the old output produced is rejected by that seam, and that the id printed by create_event is accepted by get_event. No network, credentials or third party packages.

Registered as gcal-event-id-round-trip-tests in .github/checks-manifest.yaml (local and ci lanes) and documented in the plugin README.

Verification

python3 plugins/omi-google-calendar-app/test_event_ids.py
  6 tests OK on the branch head
  4 tests failing (7 subcases) against unchanged main.py for the list_events commit
  1 additional failure against the first commit for the create_event commit
make preflight
scripts/pr-preflight --pr-body-file <this body>

I could not exercise this against a live Google Calendar account; the real user facing path is covered by the hermetic round trip above, which drives the actual handlers rather than a copy of their logic.

Product invariants affected

none

Fixes #13860

Failure-Class: none

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 4 files

You’re at about 92% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact [email protected].

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread plugins/omi-google-calendar-app/main.py Resolved
@Git-on-my-level

Copy link
Copy Markdown
Member

Verified the bug and the fix end to end — nice, tight PR.

  • plugins/omi-google-calendar-app/main.py — the production diff is exactly two lines: tool_list_events now prints the full `{event_id}` instead of event_id[:20] + "..." (L534), and tool_create_event appends ID: `{event_id}` to its confirmation (L643). Both match what tool_get_event (L712) and list_calendars already print. Since Google event ids are 26 base32hex chars (longer for recurring instances), the old 20-char prefix was never resolvable by get_event/update_event/delete_event, which pass the id verbatim to /calendars/{calendar_id}/events/{event_id} — so the truncation broke every follow-up flow from chat.
  • plugins/omi-google-calendar-app/test_event_ids.py — hermetic (no network, credentials, or third-party deps; the stub modules cover exactly what main.py imports). It round-trips both id shapes (single + recurring instance) through get/update/delete and asserts the API seam rejects the old 20-char prefix. I ran it in a network-isolated container: 6/6 pass on this branch, and 8 subcase failures against the pre-fix main.py — the regression story holds. The importlib + sys.modules stubbing is a sensible pattern given the plugin has no test harness today.
  • .github/checks-manifest.yaml — the new gcal-event-id-round-trip-tests entry follows the same schema as the existing entries (id/command/triggers/lanes/reason; cf. the adjacent clickup-app-settings-page-tests) and is additive only.
  • plugins/omi-google-calendar-app/README.md — the added step is accurate: the suite is hermetic and does run via the manifest.

One non-blocking note: list_events uses singleEvents=True (main.py L511), so recurring events come back as per-occurrence instance ids. Editing such an id creates an exception for that occurrence rather than editing the series, and the hermetic suite stubs the API seam so it cannot speak to Google's real instance-id semantics. That is pre-existing behavior this PR does not change — the full instance id is strictly more usable than the truncated one — just worth knowing if users later report surprises around recurring-event edits.

No blocking concerns from this review; leaving for routine maintainer merge.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@Git-on-my-level Git-on-my-level added python positive-signal Automation verified a genuine fix/quality contribution labels Sep 14, 2026
huiyuansun28-cmyk added a commit to huiyuansun28-cmyk/omi that referenced this pull request Sep 15, 2026
@huiyuansun28-cmyk

Copy link
Copy Markdown
Contributor

PR: #14101

AUTO (AI Agent).

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes truncated Google Calendar event ids breaking get/update/delete round-trip, and missing id on create_event. Confidence 5/5.

@lukiod
lukiod force-pushed the fix/gcal-list-events-full-id branch from cfd008a to 5138fc0 Compare September 15, 2026 15:23

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5/5 confidence bug fix, verified not-yet-fixed on main, test coverage added, CI green.

lukiod and others added 3 commits September 16, 2026 10:47
list_events printed each event id as the first 20 characters followed by
"...". Google generated event ids are 26 base32hex characters and
recurring instance ids append "_YYYYMMDDTHHMMSSZ", so every id the tool
handed back was truncated. get_event, update_event and delete_event send
the id verbatim to the Calendar API and told the user to find ids with
list_events, which made the whole read, update and delete flow fail with
"Event not found".

Emit the full id, the same way get_event and list_calendars already do,
and add a hermetic regression suite that round trips every id printed by
list_events through get_event, update_event and delete_event against a
recorded Calendar API seam. Registered in .github/checks-manifest.yaml so
it runs locally and in CI, and documented in the plugin README.

Verification:
  python3 plugins/omi-google-calendar-app/test_event_ids.py
    5 tests OK on this commit
    4 failing (7 subcases) against the unchanged main.py

Failure-Class: none

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NTjKj3PbjJ6d315JjoTjUE
create_event answered with the title, time, location, attendees and link
but never the event id, so an event created in chat could not be
updated or deleted in the same conversation without a separate
list_events call. Append the id to the confirmation, formatted the same
way list_events prints it, and extend the round trip suite so the id
printed by create_event is accepted by get_event.

Verification:
  python3 plugins/omi-google-calendar-app/test_event_ids.py
    6 tests OK on this commit
    the new case fails against the previous commit

Failure-Class: none

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NTjKj3PbjJ6d315JjoTjUE
… and delete

The create_event case only proved the printed id was accepted by
get_event. Extend it through update_event and delete_event so the id
line is guarded on every path the PR claims.

Verification:
  python3 plugins/omi-google-calendar-app/test_event_ids.py
    6 tests OK

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NTjKj3PbjJ6d315JjoTjUE
@kodjima33
kodjima33 force-pushed the fix/gcal-list-events-full-id branch from 5138fc0 to fee948b Compare September 16, 2026 14:47
@kodjima33
kodjima33 merged commit 6d0edde into BasedHardware:main Sep 16, 2026
11 checks passed
@lukiod

lukiod commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

Checked this against the plugin's own code and the Calendar API's recurring events guide, and the finding does not hold.

tool_update_event (plugins/omi-google-calendar-app/main.py:755) already does the documented instance flow: it GETs /calendars/{calendar_id}/events/{event_id} first, then PATCHes the same URL with only the changed fields. tool_delete_event retrieves the event and DELETEs the same instance URL.

The guide's own sample for changing one occurrence is exactly that: retrieve the instance, then send an update to the instance edit URL .../calendars/calendarId/events/instanceId with the updated data in the body. It does not put recurringEventId or originalStartTime in the request body, and neither reference page for events.patch or events.delete lists either field as required for an instance.

So the instance id emitted by list_events is what the mutation path already uses, and it is the id the docs prescribe for it. I could not construct a case where the current code targets the wrong resource or is rejected, so I am not changing the handler. If you have a concrete request and response pair from a real recurring instance where the path returns an error or hits the wrong occurrence, post it and I will fix it.

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

Labels

positive-signal Automation verified a genuine fix/quality contribution python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bounty proposal] fix(google-calendar): list_events prints truncated event ids that get/update/delete_event cannot use

4 participants