528aadf59c
Closes the gap #239 describes: §5.7's 30-day window was filtered on grabbed_at, so a torrent stalling past the window before hard-failing at import never surfaced in the needs-a-decision queue. grabs gains failed_at (migration 0030, backfilled from grabbed_at for existing failed rows), the import tick stamps it on hard fail, and every window query in the daemon notifier and the attention endpoint reads it. §5.7 now states the anchor explicitly. §6.2's pack backoff stays on grabbed_at deliberately; noted on the issue. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
9 lines
438 B
SQL
9 lines
438 B
SQL
-- #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';
|