Skip to content

Add periodic inbox reconcile cron for offline self-hosting.#2796

Open
hemraj-007 wants to merge 2 commits into
elie222:mainfrom
hemraj-007:feat/inbox-reconcile-cron-2504
Open

Add periodic inbox reconcile cron for offline self-hosting.#2796
hemraj-007 wants to merge 2 commits into
elie222:mainfrom
hemraj-007:feat/inbox-reconcile-cron-2504

Conversation

@hemraj-007

Copy link
Copy Markdown

Fixes #2504

Summary

Self-hosted deployments can miss push notifications when the server is offline. This adds a periodic inbox reconcile cron that catches up after downtime:

  • Gmail: compares profile historyId to lastSyncedHistoryId, then runs existing history processing
  • Outlook: reuses backfillRecentOutlookMessages (same path as lifecycle missed events)
  • Wired into Vercel, Docker Compose, and Helm cron schedules (every 15 minutes)

Test plan

  • Unit tests for reconcile logic and cron route auth
  • Manual: stop server, receive email, restart, verify reconcile cron processes it

Poll Gmail history and backfill recent Outlook messages on a schedule so email missed during downtime is still processed after the server comes back online.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jun 7, 2026

Copy link
Copy Markdown

@hemraj-007 is attempting to deploy a commit to the Inbox Zero OSS Program Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant

CLAassistant commented Jun 7, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

2 issues found across 11 files

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

Re-trigger cubic

Comment thread docker-compose.yml Outdated
Comment thread apps/web/app/api/cron/reconcile-inbox/route.test.ts
Use curl -fs in Docker cron so reconcile failures surface, and cover rejected POST requests in the cron route tests.

Co-authored-by: Cursor <cursoragent@cursor.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.

Don't assume server is always online

2 participants