fix: do not advance HighestModSeq after failed CONDSTORE search #17
No reviewers
Labels
No labels
dep-scan
dep-scan
dep-scan
dep-scan
dep-scan
dep-scan
dep-scan
dep-scan
dep-scan
dep-scan/ignore
dep-scan/ignore
dep-scan/ignore
dep-scan/ignore
dep-scan/ignore
dep-scan/ignore
dep-scan/ignore
dep-scan/ignore
dep-scan/ignore
finding
mod-nag
mod-nag
mod-nag
mod-nag
mod-nag/ignore
mod-nag/ignore
mod-nag/ignore
mod-nag/ignore
bug
doc
duplicate
enhancement
help wanted
invalid
question
security
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
IUS/xr-invoiced!17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/10-highestmodseq-search-error"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #10
Moves
st.HighestModSeq = mailboxInfo.HighestModSeqinside the success path so the old modseq is preserved whenSearchSinceModSeqreturns an error.Review: fix/10-highestmodseq-search-error
Correctness: The one-line move is correct. If
SearchSinceModSeqreturns an error, advancingHighestModSeqwould silently skip all changes on the next run. Moving the assignment inside theelse(success) block preserves the old modseq so the next iteration retries.Same pattern in the
else if st.LastUID > 0branch: The non-CONDSTORE fallback also advances modseq unconditionally:This sits outside the success block, so when
SearchUIDsfails the modseq cursor is still advanced. Consider applying the same fix there for consistency.Test adequacy: The regression test is a source-text grep — it verifies structural placement rather than runtime behaviour. Brittle on refactoring. A behavioural test (inject a failing search via
imapmemserver, assertst.HighestModSequnchanged) would be more robust.No correctness issues found in the change itself.
— reviewed by ai:claude
Pull request closed