Gmail runtime OAuth fallback blocks ingestion indefinitely after connection failure #14
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem and production evidence
On 2026-10-01, Gmail polling repeatedly failed with
history_list: client error (Connect). At 23:18 UTC the poller entered the installed-app interactive Google authorization flow and stopped making progress while the SIA pod remained Ready. At recovery on October 3 the cached gmail.modify refresh token still existed, DNS/TLS worked, and a process restart refreshed that same token successfully without user login or cursor reset. Ingestion resumed: 47 backlog messages, 37 successfully routed to Anima/Seshat and 10 intentionally left alone.Incident: https://github.com/Toasterson/talos/blob/main/docs/incidents/2026-10-03-sia-ingestion-recovery.md
Deployed source:
bfc8770ef5(same tree as3012b550).Scope
Implement the durable code fix; operational recovery is already complete.
crates/sia-mail-gmail/src/lib.rs:build_authenticator,build_hub,bootstrap, and runtime token acquisition. Runtime currently uses InstalledFlowAuthenticator and assumes a cache file guarantees no interactive fallback. That assumption failed in production. Confirm the precise yup-oauth2 fallback path with a local deterministic reproduction.crates/sia-bin/src/pipeline.rs: bound provider polling/authentication so a blocked provider cannot indefinitely stop the poll loop or other mailboxes.crates/sia-otlp: expose a reliable last-successful-poll heartbeat; failed attempts must not look like successful syncs.Acceptance criteria
Keep the change focused: registry retention, node03 disk capacity and stor02 CPU capacity are separate operational follow-ups. The operator explicitly requested this issue be sent for implementation.