fix(gmail): harden OAuth watch ownership lifecycle - #82
Open
bsbds wants to merge 7 commits into
Open
Conversation
This was referenced Aug 21, 2026
bsbds
force-pushed
the
feat/gmail-oauth-watch-lifecycle
branch
from
August 23, 2026 07:35
9f8bc74 to
4987415
Compare
Require ordinary Gmail accounts across lifecycle paths, route legacy callbacks by mailbox, and prevent invalid rows from blocking retries. Move the rollout integrity gate before worker restart and add regression coverage.
Refresh matching Gmail OAuth rows in place and retain sibling mailbox connections so watch and trigger bindings keep valid primary keys.
Synchronize stale mailbox resource IDs from the verified watch state before generic callback authorization so valid events fire without weakening cross-provider resource checks.
Persist cleanup failures, retry unreferenced teardown in the bounded sweep, converge on already-absent resources, and release supported legacy mailbox bindings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Scope
This PR contains the complete Gmail ownership boundary and lifecycle hardening, including the Gmail-specific ordinary-consumer tests and rollout checks. The owner-aware schema, query helpers, non-Gmail scoping, and SQLite migration recovery remain in PR xorbitsai#1588.
Verification
033c47432b920aeac86b5c7d3a8140361ed062d2mainupdatesRollout
Land this PR before enabling any downstream writer that creates actor-owned OAuth credentials. PR #78 remains based on this branch so actor-owned rows cannot coexist with owner-blind Gmail behavior.