Skip to content

Fix cache after deletion#53

Merged
wesm merged 2 commits intowesm:mainfrom
robelkin:fix-cache-after-deletion
Feb 4, 2026
Merged

Fix cache after deletion#53
wesm merged 2 commits intowesm:mainfrom
robelkin:fix-cache-after-deletion

Conversation

@robelkin
Copy link
Copy Markdown
Contributor

@robelkin robelkin commented Feb 4, 2026

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.

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>
@wesm wesm force-pushed the fix-cache-after-deletion branch from c17c7e6 to c582565 Compare February 4, 2026 14:26
Copy link
Copy Markdown
Owner

@wesm wesm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I just rebased and will merge this once the CI runs

@wesm wesm merged commit 4f175ff into wesm:main Feb 4, 2026
1 check passed
@wesm wesm mentioned this pull request Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants