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
Resume integrity checks and passive-source replay have no tests #255
help wantedExtra attention is neededseverity: mediumEdge-case bugs, degraded behavior, meaningful maintenance costtestingTest coverage and test infrastructure
The checks that keep -resume correct, and the replay of saved passive-source names, have no test coverage, even with -coverpkg=./....
Where (zero-hit blocks)
main_resume.go:254-262: checkInputs refuses when the input has changed
main_resume.go:202-211: resumeArgs read, unmarshal and version-mismatch errors
main_resume.go:348-356: saving t.Sources
main_ct.go:36-38, main_ct.go:58-69: sourceNames replay and the legacy CTFetched fallback (28.6% covered)
Impact
A regression here would let a resume continue from a saved position against a different wordlist, or fetch passive sources again. Either one shifts the candidate list and silently skips names.
Test cases to add (in main_resume_test.go)
Wordlist edited between the interrupted run and -resume: exit 2, and an error matching "changed since the interrupted run".
Corrupt JSON state file: an error that starts with -resume <path>:.
"version": 999: "unsupported state version".
Missing state file: "reading -resume state".
Interrupt a run with -sources ct,wayback (httptest servers), then resume with the servers changed or failing: the saved names are reused, no HTTP requests are made, and the candidates are identical.
Legacy state with ct/ct_fetched and no sources: the CT names are replayed.
Fixed in 9822704: TestE2EResumeRefusesBadState (changed input digest, corrupt JSON, version 999, missing file) and TestE2EResumeReplaysSourceNames (saved -sources names and legacy ct/ct_fetched replayed with zero HTTP requests). The failed-source case is covered by #237's TestSaveResumeStateKeepsFailedSources. Verified with go test ./... and golangci-lint.
help wantedExtra attention is neededseverity: mediumEdge-case bugs, degraded behavior, meaningful maintenance costtestingTest coverage and test infrastructure
Activity
TMHSDigital commentedon Nov 14, 2026
Fixed in 9822704: TestE2EResumeRefusesBadState (changed input digest, corrupt JSON, version 999, missing file) and TestE2EResumeReplaysSourceNames (saved -sources names and legacy ct/ct_fetched replayed with zero HTTP requests). The failed-source case is covered by #237's TestSaveResumeStateKeepsFailedSources. Verified with go test ./... and golangci-lint.