-- #239: ยง5.7's 30-day attention window runs from the failure, but only -- grabbed_at existed, so a torrent that stalled past the window and then -- hard-failed at import was born outside it. failed_at records the moment -- the grab entered 'failed'. Existing failed rows get grabbed_at as the -- best available approximation. ALTER TABLE grabs ADD COLUMN failed_at TEXT; UPDATE grabs SET failed_at = grabbed_at WHERE state = 'failed';