Merged
Conversation
After deletion execution completes, automatically rebuild the Parquet analytics cache with a full refresh. This ensures the cache reflects updated deleted_from_source_at timestamps, so subsequent MCP queries and TUI views correctly exclude deleted messages. Fixes issue where stage_deletion would include already-deleted messages because the Parquet cache was stale. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
DuckDBEngine.GetGmailIDsByFilter now delegates to SQLiteEngine instead of querying the Parquet cache. This ensures deleted messages are properly excluded even when the Parquet cache is stale. The Parquet cache only captures deleted_from_source_at at build time. Messages deleted after the cache was built would still appear in staging queries. By using SQLite (the source of truth), we guarantee accurate results for deletion staging in both TUI and MCP. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
c17c7e6 to
c582565
Compare
wesm
approved these changes
Feb 4, 2026
Owner
wesm
left a comment
There was a problem hiding this comment.
Good catch. I just rebased and will merge this once the CI runs
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.
As part of the deletions that I was doing, I noticed that there was a cache invalidation issue where the Parquet cache wasn't updated, and so the deletions (if they'd only partially been done or been done on a different filter for some of the emails) were just getting deleted a second time, which is obviously not super necessary. This is a quick fix to take care of that.