Repository navigation
fix(gmail): clear the history cursor only from a poll that held one - #9364
Merged
Merged
Conversation
A search-mode poll (no stored cursor) sent historyId: undefined, which updateWebhookProviderConfig treats as a key removal. If it overlapped a newer poll that had just stored a cursor, it deleted that cursor. The poll state is now built once and carries historyId only when this poll started with a cursor or found one, so only a poll whose cursor Gmail rejected can clear it.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
There was a problem hiding this comment.
No issues found across 2 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
Turn on auto-fix | Re-trigger cubic
Contributor
[Medium impact] This PR appears safe to merge. SummaryGmail polls now share one
No actionable issues found. Tests were inspected, not run. Reviews (1) · Last reviewed commit: "fix(gmail): clear the history cursor onl..." · Reviewed by Greptile |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
historyId: undefined, whichupdateWebhookProviderConfigtreats as a key removal. If it overlapped a newer poll that had just stored a cursor, it deleted that cursor.historyIdonly when this poll started with a cursor or found one, so only a poll whose cursor Gmail rejected can clear it. Search-mode polls leave the key alone, as before fix(gmail): drop an expired history cursor instead of re-saving it every poll #9343.webhookId:messageIdidempotency key dedupes, and the search window covers the gap. A compare-and-set would changeupdateWebhookProviderConfigfor every provider.Type of Change
Testing
lib/webhooks/polling/gmail.test.ts: new case "leaves the stored cursor untouched when a search-mode poll finds no mail" fails on staging (sends ahistoryIdkey) and passes with the fixlib/webhooks/polling/suite: 57 passedcheck:test-patterns,check:comment-hygieneChecklist
test-auditauthoring gate)