The attention window measures from the grab, not the failure #239

Closed
opened 2026-08-25 10:30:19 +01:00 by naps62-yolo · 1 comment
Owner

§5.7 says a target queues when two failures "happened within the last 30 days".
Every query filters on g.grabbed_at, which is when the torrent was grabbed,
not when it failed. The grabs table (0012_vanished_grabs.sql) has
grabbed_at and imported_at and no failed_at.

A torrent grabbed, left stalling on a slow swarm for five weeks, and then
hard-failing at ffprobe import is stamped with the grab date — already
outside the window the moment the failure is written. Two such failures on a
genuinely broken target never surface in the queue at all, which is the exact
opposite of what §5.7 promises.

The design text and the implementation describe different things. Either the
window measures from the failure and grabs needs the column to measure from,
or §5.7 should say the window runs from the grab and accept what that means.
Decide and make both sides agree.

Note the migration numbers 0024, 0025 and 0027-0029 are reserved by the
subtitles branch; use 0030 upward.

§5.7 says a target queues when two failures "happened within the last 30 days". Every query filters on `g.grabbed_at`, which is when the torrent was *grabbed*, not when it failed. The `grabs` table (`0012_vanished_grabs.sql`) has `grabbed_at` and `imported_at` and no `failed_at`. A torrent grabbed, left stalling on a slow swarm for five weeks, and then hard-failing at `ffprobe` import is stamped with the grab date — already outside the window the moment the failure is written. Two such failures on a genuinely broken target never surface in the queue at all, which is the exact opposite of what §5.7 promises. The design text and the implementation describe different things. Either the window measures from the failure and `grabs` needs the column to measure from, or §5.7 should say the window runs from the grab and accept what that means. Decide and make both sides agree. Note the migration numbers 0024, 0025 and 0027-0029 are reserved by the subtitles branch; use 0030 upward.
naps62-yolo added this to the Feedback pass 2 milestone 2026-08-25 10:30:19 +01:00
naps62-yolo added the area/apidifficulty/hardtype/bug labels 2026-08-25 10:30:19 +01:00
Author
Owner

Settled as: the window measures from the failure. grabs gains failed_at (migration 0030), the import tick stamps it on hard fail, and every §5.7 window query reads it. §5.7 now states the anchor explicitly.

Adjacent finding, left out of scope: §6.2's pack backoff (pack_backoff_active in tv_grab.rs, pack_allowed in rss.rs, and the season deck in series.rs) also anchors on max(grabbed_at) of failed grabs while calling it last_failed_at. A pack that stalls two weeks and then hard-fails gets its retry backoff computed from the grab, so the quiet period may already be elapsed the moment the failure lands. failed_at now exists to anchor on, but moving §6.2's retry cadence is its own decision, not this issue's.

Settled as: the window measures from the failure. `grabs` gains `failed_at` (migration 0030), the import tick stamps it on hard fail, and every §5.7 window query reads it. §5.7 now states the anchor explicitly. Adjacent finding, left out of scope: §6.2's pack backoff (`pack_backoff_active` in `tv_grab.rs`, `pack_allowed` in `rss.rs`, and the season deck in `series.rs`) also anchors on `max(grabbed_at)` of failed grabs while calling it `last_failed_at`. A pack that stalls two weeks and then hard-fails gets its retry backoff computed from the grab, so the quiet period may already be elapsed the moment the failure lands. `failed_at` now exists to anchor on, but moving §6.2's retry cadence is its own decision, not this issue's.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yolo/arr#239