Repository navigation
fix(context_chat): Reschedule indexing upon triggerInitialImport call - #13945
Open
marcelklehr wants to merge 1 commit into
Open
marcelklehr wants to merge 1 commit into
marcelklehr wants to merge 1 commit into
Conversation
triggerInitialImport() was a no-op, so wiping the context chat vector store left all previously indexed mails out of the index for good. ScheduleJob also only reset mailboxes that still had a pending task, which skipped exactly the fully imported ones. triggerInitialImport() now re-queues ScheduleJob for every account. ScheduleJob backfills each synchronized mailbox from the start and then removes itself; it waits for the initial sync because that sync does not emit NewMessagesSynchronized. The FixBackgroundJobs repair step re-adds ScheduleJob on every app upgrade, causing one re-scan per upgrade. Context chat skips re-embedding unchanged items, so this was accepted over adding a "done" column to mail_cc_tasks. Assisted-by: ClaudeCode:claude-opus-5.5 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
marcelklehr
requested review from
ChristophWurst,
GretaD and
kesselb
as code owners
October 26, 2026 08:46
kyteinsky
approved these changes
Oct 26, 2026
|
|
||
| foreach ($cachedMailboxes as $mailbox) { | ||
| try { | ||
| $this->taskService->findByMailboxId($mailbox->getId()); |
There was a problem hiding this comment.
is this removal related to the above cachedMailboxes change?
Member
Author
There was a problem hiding this comment.
No, it makes sure that we do not require the task to exist when scheduling a task
Contributor
|
I think we should address/finish #13443 first. Due to the changes on main vs stable5.13/stable5.12 that might require a different way to solve it. |
This branch has not been deployed
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.
triggerInitialImport() was a no-op, so wiping the context chat vector store left all previously indexed mails out of the index for good. ScheduleJob also only reset mailboxes that still had a pending task, which skipped exactly the fully imported ones.
triggerInitialImport() now re-queues ScheduleJob for every account. ScheduleJob backfills each synchronized mailbox from the start and then removes itself; it waits for the initial sync because that sync does not emit NewMessagesSynchronized.
The FixBackgroundJobs repair step re-adds ScheduleJob on every app upgrade, causing one re-scan per upgrade. Context chat skips re-embedding unchanged items, so this was accepted over adding a "done" column to mail_cc_tasks.
This is important to get in soon, because we're planning to do a full context_chat wipe with the next context_chat release.
馃 AI (if applicable)