Repository navigation
Sync provider categories and native importance - #65
Merged
Merged
Conversation
| expect(notifyNewMail).toHaveBeenCalledWith(expect.objectContaining({ emailId: 'sarv-native', categories: ['important'] })); | ||
| for (const [acct, id] of [['acct-a', 'gmail-native'], ['acct-b', 'sarv-native'], ['acct-b', 'user-empty']]) expect(row(acct, id).ai_categories).toBeNull(); | ||
| quit(); | ||
| s = await launch(); |
rcsarv
added a commit
that referenced
this pull request
Oct 5, 2026
"rebuilds a small queue synchronously, before returning" ran catchUp() on its default 8 ms budget, which is wall time. Two thread rebuilds on a loaded CI runner can outlast it, leaving one row queued: PR #65's CI failed with "expected 1 to be +0" though nothing about draining had changed. With every SQLite statement slowed by 2 ms the old test fails 3/3 with that assertion; with Date frozen it passes 3/3, since the budget can no longer run out. The test still guards what it is named for: a catchUp that defers to the pump instead of draining leaves 2 rows queued and fails it. Running out of budget stays covered by "stops at its budget, skips the hook, and re-arms the pump".
rcsarv
marked this pull request as ready for review
October 6, 2026 06:07
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.
Existing provider categories were ignored by automatic categorization, and marking Important in Inbox did not reliably update the provider. This change imports recognized server classifications before AI and makes manual classification edits durable and account-specific.
Importantkeyword and Gmail's native Important label independently of stars and other categories. Stop stale writes when mailbox UIDVALIDITY changes.UID SEARCH X-GM-RAWqueries, including Primary. Unknown or failed discovery defers AI and retries after sync; provider/manual choices also protect against an AI response already in flight.Sarv Inboxmirror labels; clean up old native mirrors while preserving ordinary user labels and colored custom AI categories.Validation: 11,739 tests passed (12 existing opt-in local scanner tests skipped), complete workspace type checks and repository lint passed, renderer dependency guard passed, and at least 90% branch coverage on touched classification paths. Tests cover offline replacement, partial retries, UID reset/missing targets, account isolation, server removals, late AI results, unknown Gmail discovery, popup errors, rapid toggles and stale jobs across retries. The two existing reply-transcript tests now clear their controlled timeout retries before DOM teardown; no reply behavior changed.
Sarv's Important mapping is based on the supplied
FETCH ... FLAGS (\Seen Important)transcript. No live mailbox write was used for validation. Gmail protocol/API behavior follows Google's IMAP extensions and message label modification API.