You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Resumed scans over-count found and processed for re-found names #156
A resumed scan re-resolves names that were already found before the interrupt, suppresses them from output, but still counts them, so the final report's found and processed exceed the real totals.
Where
main.go:757-760 (restored names are skipped in emitResult)
internal/scan/runner.go:819,826 (engine still increments processed/found)
main_resume.go:78-84 (resumePass.merge adds the saved pass's counts on top)
Details
The resume offset re-expands up to a worker pool's worth of candidates (the RootDone comment acknowledges repeats). Those repeated lookups count in the engine's stats, and merge adds the previous pass's Found, so re-found names are counted twice.
Impact
found/processed in the run report and summary are inflated by up to roughly the concurrency value per interrupt/resume cycle. Monitoring consumers comparing counts between runs see phantom growth.
Steps to reproduce
Start a -simulate -hit-rate 100 scan with -resume state.json, interrupt midway.
Resume and compare found to the number of unique names emitted.
Suggested fix
Count the early returns in emitResult for restored names and subtract them from the engine's Found/Processed before merge, or have the engine skip restored names entirely via the resume cursor.
Acceptance criteria
After interrupt and resume, found equals the number of unique names written
Fixed in d9dde29 on main: Re-found restored names are dropped from the resumed pass's found/processed before merging. Verified with: new TestE2EResumeCountsRefoundNamesOnce (25 vs 20 before the fix).
Activity
TMHSDigital commentedon Nov 9, 2026
Fixed in d9dde29 on main: Re-found restored names are dropped from the resumed pass's found/processed before merging. Verified with: new TestE2EResumeCountsRefoundNamesOnce (25 vs 20 before the fix).
chore(release): v0.10.0