Skip to content

fix(gmail-watch): delay history fetch in watch serve#397

Open
salmonumbrella wants to merge 1 commit intosteipete:mainfrom
salmonumbrella:fix/issue-379
Open

fix(gmail-watch): delay history fetch in watch serve#397
salmonumbrella wants to merge 1 commit intosteipete:mainfrom
salmonumbrella:fix/issue-379

Conversation

@salmonumbrella
Copy link
Contributor

@salmonumbrella salmonumbrella commented Mar 3, 2026

Summary

  • add --fetch-delay to gog gmail watch serve (default 3s, accepts seconds or Go durations)
  • delay history fetch after push delivery to avoid Gmail indexing race conditions
  • add validation and server coverage tests for fetch delay behavior and context cancellation
  • document the new flag in watch docs and README

Closes #379

Verification

  • make test
  • go test ./internal/cmd -run 'GmailWatchServeCmd|GmailWatchServer_HandlePush_AppliesFetchDelay|GmailWatchServer_HandlePush_FetchDelayCanceledContext'

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: gmail watch serve delivers empty messages due to Gmail API history race condition

1 participant