Interrupted or failed scan advances state, messages are skipped ai:claude-sonnet-5-5 #47
Labels
No labels
nagonag
nagonag/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#47
Loading…
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?
Found by a 100 Go Mistakes review (#53/#54: errors not handled). Verified by reading the code.
Where:
internal/app/app.goscanDelta: modseq path (~l.346-358) and UID path (~l.380-400); idle path ~l.594.Problem:
breaks whenctxis cancelled, butst.HighestModSeq = mailboxInfo.HighestModSeqis set after the loop anyway. A SIGTERM during the startup scan advances the modseq; on the next start the search (UIDAfter: LastUID,ModSeq: HighestModSeq) no longer returns the unprocessed UIDs, so they are never scanned/tagged.st.LastUID = uidis set even whenProcessUIDWithOptionsreturned an error (e.g. a transient FETCH failure), so such a message is never retried.Fix: advance
LastUID/HighestModSeqonly for UIDs that were processed successfully, and skip the modseq advance if the loop was interrupted or any UID failed.(co)authored by ai:claude-sonnet-5-5