fix(search): bound personal Gmail sources and sync them from Gmail history - #7717
Merged
Merged
Conversation
…story A personal Gmail connection indexed the whole mailbox from all time, and members mode removes the thread cap by design (a capped listing cannot tell a thread that fell out of the window from one the person lost access to). Search sources now start from the connector's declared defaults, so Gmail indexes the last six months unless the source says otherwise. Explicit settings still win and knowledge-base connectors are unchanged. Every hourly Gmail sync relisted the entire mailbox because the connector had no change feed. It now opens a cursor at the mailbox history id and reads users.history.list, re-reading only threads that gained a message, were relabelled, or were deleted, and evaluates the configured labels, date range and category exclusions locally. A free-form search filter cannot be evaluated locally, so such a source keeps relisting. An expired history id reopens the feed from a full listing through the engine's existing cursor-invalid path. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
|
The lookup narrows an arbitrary config string through a type guard instead of indexing a widened record. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Collaborator
Author
Collaborator
Author
|
@cubic-dev-ai review this PR |
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
users.history.list: the members engine opens a cursor at the mailbox history id and later syncs re-read only threads that gained a message, were relabelled, or were deleted, instead of relisting the whole mailbox every hourType of Change
Testing
viteston gmail, sim-search, connectors application, member-sync engine and sync primitives: 393 passingbun run type-check,bun run lint,bun run check:audits,docs-manifest:checkpassChecklist