Skip to content

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

Merged
steipete merged 2 commits intoopenclaw:mainfrom
salmonumbrella:fix/issue-379
Mar 7, 2026
Merged

fix(gmail-watch): delay history fetch in watch serve#397
steipete merged 2 commits intoopenclaw:mainfrom
salmonumbrella:fix/issue-379

Conversation

@salmonumbrella
Copy link
Copy Markdown
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'

@steipete steipete merged commit caf38a3 into openclaw:main Mar 7, 2026
2 of 6 checks passed
@steipete
Copy link
Copy Markdown
Collaborator

steipete commented Mar 7, 2026

Landed via temp rebase onto main.

Thanks @salmonumbrella!

klodr pushed a commit to klodr/gogcli that referenced this pull request Apr 22, 2026
* fix(gmail-watch): delay history fetch in watch serve

* fix: land gmail watch fetch delay and changelog (openclaw#397) (thanks @salmonumbrella)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
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

2 participants