A redeploy or restart closes the scans it cut off as `interrupted`
(#65), and nothing started them again: on prod the reconciler's redeploy
interrupted two customer scans that then waited for the nightly run.
After recover_orphaned_runs, resume_interrupted_scans starts those scans
again in the background, for every tenant the scheduler runs for (so a
suspended tenant is not), through the normal scan path (scan gate,
concurrency), as a scheduled scan. It finds them by the completed_at
this startup gave them. A target that is archived or gone is skipped, and
so is one whose scan was already interrupted within the last day: the
scan itself may be what stops the agent, and restarting it would loop.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p