Do not advance HighestModSeq after failed CONDSTORE search #10
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#10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Problem
cmd/xr-invoiced/main.goadvancesst.HighestModSeqeven whenSearchSinceModSeqfails.Reference:
cmd/xr-invoiced/main.go:148andcmd/xr-invoiced/main.go:167.On CONDSTORE servers this can permanently skip changed messages: the search error is logged, but the state is still moved to the mailbox's newer
HighestModSeq.Expected
Keep the old
HighestModSequnless the modseq search succeeds and changed UIDs have been processed.Suggested fix
Only assign
st.HighestModSeq = mailboxInfo.HighestModSeqin the successful search path, ideally after processing the returned UIDs.Branch renamed per convention:
Old: regression/issue-10-highestmodseq
New: fix/10-highestmodseq-search-error
The old remote branch has been deleted.
Fix branch pushed: fix/10-highestmodseq-search-error-claude
Moves st.HighestModSeq = mailboxInfo.HighestModSeq inside the success path so the old modseq is preserved when SearchSinceModSeq fails. Regression test passes.
Implementation branch: fix/10-highestmodseq-search-error-codex
Fixed in
65ac9a7and5995f84, merged by1c4ba83. HighestModSeq advancement is now guarded by successful search paths; regression coverage is present in modseq_regression_test.go.