Commit Graph
150 Commits
Author SHA1 Message Date
Matthew Meszaros 3cf3c772ba feat: stop reporting RESOURCE_NOT_FOUND from the worker to error tracking, since a folder or message gone from the server is absorbed by the folder walk re-listing and still relayed to the consumer 2026-11-08 10:20:15 +01:00
Matthew Meszaros 24b978d2bb feat: ask whole-domain grant Gmail mailboxes to watch the push topic only when the delegation key belongs to the topic's project, and report each mailbox's first failed watch or Graph subscription to error tracking 2026-11-08 07:38:35 +01:00
Matthew Meszaros 3cb29c7909 Merge remote-tracking branch 'origin/main' into fix/1157-log-silent-sync-drops 2026-11-07 11:58:32 +01:00
Matthew Meszaros 4ede5e0914 feat: look up Gmail warmup messages with FindUIDInFolder, which reports a failed SELECT as an error so the rescue hands the action to the Gmail API instead of recording it as already out of spam 2026-11-07 08:27:47 +01:00
Matthew Meszaros 568df446b6 Merge remote-tracking branch 'origin/main' into feat/google-trusted-app-signin 2026-11-07 07:30:50 +01:00
Matthew Meszaros ba07007fc0 feat: hand Gmail warmup engagement that fails over IMAP to the Gmail API (resolving the Gmail id when needed) and retry IMAP six hours after a refusal the worker saw, keep a vendor consent pending or settled across cache errors and racing callbacks, refuse a personal Gmail address at the end of Google sign-in, let a domain whose Google mailboxes arrived in a workspace import make its grant again, offer Google reconnects only where the instance has a Google client, batch bulk vendor reconnects by 1000, and confirm before discarding a typed app password 2026-11-07 07:25:24 +01:00
Matthew Meszaros dea6692dde feat: record the scopes Google granted each mailbox token (email_accounts_oauth.granted_scopes, migration 000357) at connect, reauth and vendor convert, list only Google sign-ins without full mail access as retiring with the vendor that can reconnect them, tell workers through ADD_EMAIL full_mail_access to skip Gmail IMAP for a token known to lack it, let an app password take over a delegated Google mailbox after the worker check, add GET /emails/:id/signin with only the switches that can succeed, record vendor reconnect progress per mailbox on the audit spine, and reconnect vendor-linked Google mailboxes automatically behind mailbox_signin.auto_vendor_reconnect with one attempt in flight and a week between attempts 2026-11-07 05:20:33 +01:00
Matthew Meszaros 1db1ea0835 feat: request https://mail.google.com/ for new Google sign-in mailboxes (reauth still accepts gmail.modify) and run Gmail warmup engagement (spam rescue, mark read, star, mark important) over imap.gmail.com with the mailbox's own token, including delegated mailboxes through an optional mail.google.com delegation scope minted via ?purpose=imap on the internal token route, falling back per mailbox to the Gmail API when the scope or IMAP access is missing, with docs for scopes, warmup and existing delegation entries 2026-11-07 05:20:23 +01:00
Matthew Meszaros a22d15efd6 Merge remote-tracking branch 'origin/main' into devin/template-warmup 2026-11-07 05:18:49 +01:00
Matthew Meszaros 6c73120bc6 feat: classify Gmail's [ALERT] Invalid credentials as the credentials refusal for the mailbox's auth kind and an IMAP TRYCREATE on a sync command as a missing folder, and stop reporting GOOGLE_AUTHENTICATION_FAILED and INVALID_CREDENTIALS from the worker to PostHog since the relay already deactivates the mailbox and tells its owner 2026-11-06 18:40:25 +01:00
Matthew Meszaros 73f1e5dbb7 feat: accept invitations whose inviter was deleted, hand another workspace's subscription to its owner on account deletion, refuse it over shared assistant conversations, recheck refused account deletions daily, and show only the public sentence of a sensitive migration connection error 2026-11-06 17:09:55 +01:00
Matthew Meszaros 4ed928e79b feat: name an undecodable Graph success body as msgraph.ErrUnreadableResponse and keep it out of worker error reports, so the pass retries without fabricating a server-unreachable event 2026-11-06 16:24:28 +01:00
Matthew Meszaros 9bbf149548 feat: warm up running campaign copy: each mailbox's warmup draws the opening steps and active A/B arms of the campaigns it sends for, rendered per pool recipient through the campaign renderer (merge fields, spintax, HTML, signature, opt-out, UTM) and refused when a step needs lead-only data, with per-step placement at GET /warmup/templates/campaign-copy, a campaign_copy setting, a 7-day mailbox maturity gate, big-three headline placement, a sender-only template resend check, lock_timeout and a concurrent org index 2026-11-05 18:24:43 +01:00
Matthew Meszaros fd11313a04 feat: clear the Graph relay cache entry before relaying a known message and cache a reconcile only when its resolved folder matches the walked folder 2026-11-05 14:21:35 +01:00
Matthew Meszaros 465493d1dc feat: record in the Graph relay cache the read state a message reconcile actually relayed and clear it when the reconcile reports a removal, so a later delta walk compares against what the platform last received 2026-11-05 14:07:02 +01:00
Matthew Meszaros 6a5f5ecb56 feat: relay an Outlook known message's read state and folder from the Graph delta walk only when it differs from what the worker relayed within the last six hours, forgetting the entry when the message is removed 2026-11-05 13:53:06 +01:00
Jaseem ThayalandClaude Opus 5.5 f04d2a1bad fix: log silent IMAP publish failures and dropped sync state reports (#1157)
Two paths left last_synced_at stale with nothing in the logs, which is
what shows as "No recent successful sync check":

- The IMAP pass ended with nil when a MAILBOX_UPDATE, MAILBOX_DELETE or
  MAILBOX_RENAME publish failed. Those five sites now go through
  controlPlaneError, the helper the rest of the pass already uses for
  publish failures: it logs a warning with email_id and the error and
  emits ControlPlaneHeld evidence. It still returns nil and holds cursors.
- HandleSyncState returned nil without a word when PutFromWorker rejected
  a report because the worker or transport generation no longer matched.
  It now logs a warning with email_id, worker_id, report_generation and
  transport_generation, and still returns nil.

Logging only, no behaviour change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 14:08:17 +05:30
Matthew Meszaros 56c3195f4b feat: never adopt a stored push channel this worker already closed, matching the Graph subscription id or a Gmail watch no newer than the closed one, and test the pending push report resend during the retry backoff 2026-11-04 17:18:20 +01:00
Matthew Meszaros 710d857a4b feat: keep an unsent mailbox push report ahead of the control plane's stored row and resend it during the retry backoff, and plan-test the largest accepted fleet worker capacity 2026-11-04 16:58:54 +01:00
Matthew Meszaros a7721887a8 feat: wake a Gmail mailbox once its push channel is stored, resend a PUSH_STATE the bus refused and report a Graph subscription that was deleted or gone even when its replacement fails, follow Graph subscription list continuations, drain a wake the timed pass covers, bound SYNC_WAKE publishes by the caller's deadline, keep the Google service account out of the compose worker, and correct the mailbox push docs on the Gmail publisher principal, what GMAIL_PUSH_TOPIC alone does, poll intervals and who calls the push routes 2026-11-04 16:32:27 +01:00
Matthew Meszaros 095d842aa9 feat: merge main into the mailbox push branch and renumber its migration to 000341_mailbox_push_channels after main took 000339 and 000340 2026-11-04 11:40:14 +01:00
Matthew Meszaros 074018cf00 Merge remote-tracking branch 'origin/main' into fix/mailbox-warmup-errors 2026-11-03 16:01:12 +01:00
Matthew Meszaros d241a836f8 feat: sync mailboxes in realtime through Graph change notifications, Gmail Pub/Sub watches and IMAP IDLE that wake the owning worker with SYNC_WAKE, drain stored arrivals continuously, and add an opt-in autoscaling AWS worker fleet without public IPv4 scaled on a published fleet utilization metric 2026-11-03 15:11:24 +01:00
Matthew Meszaros d1b717cc06 feat: fence worker sync reports by the transport generation each worker incarnation was loaded with, carried as report_generation on SYNC_STATE 2026-11-03 09:15:40 +01:00
Matthew Meszaros d1ae1e2e32 feat: decide bounce suppression from the DSN status code and server reply through a shared dsn.Blame rule so mailbox-full, policy, reputation and system bounces keep the address and lead while address-invalid ones suppress, carry the per-recipient status and diagnostic in inbound bounce reasons, reuse the rule in emailverify, and add an optional TYPESAFE_ENDPOINT 2026-11-03 08:31:36 +01:00
Matthew Meszaros a2f0f99a3d feat: order mailbox folder coverage independently of completed syncs and retain password confirmation for used authenticator steps 2026-11-03 07:02:39 +01:00
Matthew MeszarosandDevin AI 79baf46462 feat: keep SMTP mailboxes executable through retryable IMAP startup failures and enforce provider login cooldowns
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-25 07:44:19 +00:00
Matthew Meszaros 4624cc4a74 feat: negotiate mailbox SMTP AUTH by link (LOGIN then PLAIN only over TLS or loopback, CRAM-MD5 last, never a password mechanism in cleartext) for the send path, the connection test and the platform relay, honour MAIL_TLS_INSECURE only under APP_ENV=dev, and trust a mailbox server whose owner opted out of CA verification only on its pinned SPKI SHA-256 via VerifyConnection, reporting TLS_CERTIFICATE_CHANGED or TLS_CERTIFICATE_UNCONFIRMED as retryable connection errors 2026-10-23 16:15:55 +02:00
Matthew Meszaros 3f13636a5b feat: decide uploaded image formats from their decoded bytes through internal/pkg/imagetype for avatars, OAuth logos, form assets, email images and archive-restored public objects, store public objects with inline headers only for PNG/JPEG/GIF/WebP, sign every presigned attachment and node GET URL with forced download disposition and a safe response content type, and rasterize SVG previews to PNG in the dashboard image client 2026-10-23 15:43:42 +02:00
Matthew Meszaros 03170c5482 feat: share one cancellation-proof bounded DEK lookup per organization, bound worker token sealing, reseal empty mailbox credential values, refuse an invalid MAILBOX_CREDENTIALS_SEALING in warmblyctl, keep credential exports gated on the instance key and log workspace-key failures in mailbox erasure 2026-10-22 19:11:23 +02:00
Matthew Meszaros 537a622409 feat: seal mailbox SMTP/IMAP logins and OAuth tokens under KMS-protected workspace DEKs behind MAILBOX_CREDENTIALS_SEALING, carry them sealed in ADD_EMAIL and token refreshes, reseal stored credentials in a resumable consumer job, and cache DEKs in process with singleflight in front of Redis and KMS 2026-10-22 19:11:23 +02:00
Devin AI 5ee2049ab4 feat: resolve Graph complaint MIME before writing an arrival body so temporary provider failures cannot accumulate orphaned blobs 2026-10-19 06:20:52 +00:00
Devin AI a2e81c2ef5 feat: keep Graph complaint reports retryable across temporary raw message failures and bound MIME depth, parts and decoded content before admitting an arrival 2026-10-19 06:19:42 +00:00
555aaditya 3386052ce8 feat: detect spam-complaint feedback reports on Microsoft Graph mailboxes by reading the report parts from the message's raw MIME when the synced rendered body cannot name the send, and drop the deliverability docs callout saying Graph complaints are not detected 2026-10-19 01:52:36 +05:30
Matthew Meszaros e240d8a0f0 feat: cover the IMAP MODSEQ bump end to end with tests that history spends no sync budget, records no throttled day and is searched once, and that a deferred arrival holds UIDNEXT so the retry keeps history out, and document the behavior in the mailboxes guide 2026-10-16 06:54:15 +02:00
Matthew Meszaros 94f5ca195a Merge pull request #972 from warmbly/fix/recent-github-bug-reports
feat: keep unibox sends out of the campaign caps and report refusals, skip IMAP history on a MODSEQ bump, ignore mail from before a contact in reply processing
2026-10-15 14:09:48 +00:00
Matthew Meszaros dbfc5b06f8 feat: keep unibox sends out of campaign, warmup and shared send caps with their own 500-recipient daily ceiling and report refused sends to the mailbox owner, skip IMAP history below the held UIDNEXT on a folder-wide MODSEQ bump, and stop treating mail received before its sender became a contact as a reply in reply processing, the repair sweep and the opt-out recheck 2026-10-14 06:38:34 +02:00
Devin AI ab193988c1 feat: reuse known Graph message mappings for legacy delta flag events without a second broker lookup 2026-10-14 03:35:28 +00:00
Devin AI 0559ddee09 feat: bound IMAP preview normalization while preserving whitespace quotes signatures and UTF-8 behavior 2026-10-14 03:35:28 +00:00
Matthew MeszarosandDevin AI c59512d160 feat: batch IMAP message-map lookups and index normalized send identifiers and mailbox folder generations
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-13 13:27:39 +00:00
Matthew Meszaros 457cefa345 feat: scope mailbox transport reports and automatic recovery to current-generation sync and send evidence while preserving archive history and send safety holds 2026-10-11 07:04:46 +00:00
Matthew MeszarosandDevin AI 2f842cf96c feat: keep retired and cancelled sync attempts out of provider-failure evidence while preserving native recovery retries
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-11 05:25:49 +00:00
devin-ai-integration[bot] ae54f970e9 Merge pull request #931 from warmbly/devin/1791640209-provider-sync-recovery
feat: preserve IMAP folders on incomplete status and honor Graph sync retry windows
2026-10-10 14:53:43 +00:00
Devin AI 44cd8f8254 feat: preserve complete IMAP folder presence across bounded sync and stop Graph passes on authoritative provider retry deadlines 2026-10-10 14:42:21 +00:00
Matthew Meszaros 93f0d1cec8 feat: reconcile same-batch IMAP duplicate message keys through canonical maps without readmitting completed arrivals or charging duplicate sync budget 2026-10-10 13:59:04 +00:00
Matthew Meszaros 89e456dfb5 feat: preserve IMAP folder sync state on incomplete provider status and honor Graph service retry windows 2026-10-10 13:58:24 +00:00
Matthew Meszaros 21b56fce08 Merge pull request #921 from warmbly/devin/1791619490-retire-stale-mailbox-sync
feat: retire stale mailbox generations on authoritative ownership loss without acknowledging arrivals
2026-10-10 08:30:04 +00:00
Matthew MeszarosandDevin AI f2876f1fc9 feat: retire stale worker mailbox generations only on authenticated ownership-loss admission evidence while retaining failed arrival bodies and provider cursors
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-10 08:17:59 +00:00
Matthew Meszaros a9d1865a69 feat: integrate current main sync and IMAP dialect fixes and bounded NATS diagnostics while preserving released recovery and administrator operations 2026-10-10 07:55:46 +00:00
Matthew Meszaros 582c1aaaa4 feat: preserve fail-closed fleet enrollment fixtures and independent broker deadlines while honoring bounded evidence upload rate limits 2026-10-10 06:57:13 +00:00