Repository navigation
Commit 5fdee9a
Split scan.Run into preflight, ticker and worker helpers (#277)
Run had grown back to 248 lines as preflight, wildcard, retry, pool and
deadline work landed inside it. It is now 109 lines:
- preflight() runs the scope, recursion-ceiling, resolver and wildcard
checks and reports whether the scan may go on, as a pure move.
- scanState.startTicker and scanState.runWorkers hold the progress
ticker and the worker pool.
- processed, found and total are atomic.Int64 fields on scanState
instead of raw *int64 with atomic.LoadInt64; the dispatcher takes
*atomic.Int64 for the total.
The exactly-one-EventDone contract (#99) is unchanged: early exits
still return through Run's deferred Stopped done, which
TestRunAlwaysEndsWithOneDone covers for every exit.
Fixes #277
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 160208c commit 5fdee9a
2 files changed
Lines changed: 125 additions & 114 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | | - | |
| 302 | + | |
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | | - | |
| 312 | + | |
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
| |||
0 commit comments