Persist state after initial scan and meaningful progress #13
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#13
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
State is updated in memory after initial scan and during processing, but
runsaves it only when a mailbox goroutine exits.References:
cmd/xr-invoiced/main.go:140andcmd/xr-invoiced/main.go:242.A crash or hard kill after a long initial scan loses the updated position and causes a full rescan on the next start.
Expected
State should be persisted after expensive initial scans and after meaningful progress, not only at shutdown.
Suggested fix
Save after initial scan completes, and consider periodic or per-batch saves while processing IDLE/reconnect results.
Branch renamed per convention:
Old: regression/issue-13-state-progress-save
New: fix/13-state-progress-save
The old remote branch has been deleted.
Fix branch pushed: fix/13-state-progress-save-claude
Adds saveStates func() parameter to runMailbox and calls it after updating state in the UIDValidity-changed branch, ensuring progress is persisted before entering IDLE. Regression test passes.
Implementation branch: fix/13-state-progress-save-codex
heiko referenced this issue2026-05-11 21:53:28 +02:00
Fixed in
b4b048c, merged by8b59369. State is saved after initial scan and after progress in startup/idle paths; regression coverage is present in state_progress_regression_test.go.