Repository navigation
fix(deep-scan): recheck empty targets before a resumed scan's first dispatch - #2346
Merged
mldangelo-oai merged 11 commits intoNov 5, 2026
Merged
Conversation
A Deep Scan stopped after its discovery phase was persisted but before any worker was dispatched was never re-admitted on resume: isFreshRun required discoveryStarted to be false, and the workbench derives that flag from the persisted phase. Nothing has been dispatched for such a run, so there is no accepted discovery work to protect. Relax isFreshRun to key on the dispatch evidence alone (zero dispatches, no non-setup persisted workers, no persisted dedup inputs). The existing dispatchedCount = 1 bypass keeps its behavior. Refs openai#2014
…mpty Admission's physical probe admits a directory holding only an empty subdirectory or only files the source inventory ignores, so discovery and reduction still ran on a zero-file scope (openai#2014). The workbench already computes the registered scope's regular-file count at scan start (scan_progress.scope_file_count, counting an explicitly selected file itself); deep_scan_state() now surfaces it as scopeFileCount and the coordinator stops a fresh run with the existing empty-target outcome when that count is zero. Unknown counts (legacy records) are not gated, and the physical probe semantics are unchanged. Refs openai#2014
3 tasks done
mldangelo-oai
approved these changes
Nov 5, 2026
Collaborator
|
Thank you! |
Merged
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Deep Scan can record its discovery phase and stop before dispatching its first worker. If the target is empty when another coordinator takes over, the persisted phase used to let the scan start a worker. The replacement coordinator now checks the current target before dispatch. This addresses the resume case in #2014.
Changes
Testing
mainand passes on this branch.Risk and rollout
Runs with recorded dispatches or recoverable work keep their existing recovery path. Fresh scans continue using the physical target check. Git directories containing only ignored files remain a separate case under #2014. No database migration is required.
Public disclosure review