A failed season pack disables pack search forever #181

Closed
opened 2026-08-24 19:36:59 +01:00 by naps62-yolo · 0 comments
Owner

One failed season-pack grab disables pack search for that season forever.

pack_hard_failed asks whether a failed grab exists, with no time bound:

SELECT EXISTS (
    SELECT 1 FROM grabs
    WHERE target_kind = 'season' AND target_id = ? AND state = 'failed'
)

season_grab_mode then takes PerEpisode for good:

if fully_released && !facts.any_episode_on_disk && !facts.pack_hard_failed {
    SeasonGrabMode::SeasonPack
} else {
    SeasonGrabMode::PerEpisode
}

Nothing ever clears that row, so a season that once failed a pack never
searches for a pack again — not on the RSS lane, not on targeted search, and
not when the operator asks for it by hand.

This contradicts §6.2, which is explicit that search never gives up:

Targeted search backs off 1h → 6h → 1d → 3d, capped at 7d, reset when the
title's metadata changes. It never gives up entirely, it goes quiet.

A single bad torrent, a tracker being down for an hour, or one release that
failed ffprobe is enough to poison the season permanently. The failure it is
guarding against is real — retrying a pack that hard-failed on the next tick
would thrash — but the guard has no expiry, and "quiet" is not "off".

Observed on Rick and Morty S09. All ten episodes aired between 2026-05-24
and 2026-07-26, none are on disk, and all ten are wanted — so fully_released
and !any_episode_on_disk both hold and the season should be in SeasonPack
mode. It is not: episode search_attempts keep climbing on the per-episode
lane while /api/series/1/seasons/9/releases stays empty, and no pack is ever
indexed.

Give the guard the same shape §6.2 gives everything else: back off, then retry.
Reuse the existing curve rather than inventing a second one — backoff_elapsed
already implements 1h → 6h → 1d → 3d → 7d against an attempt count, and a
season's failed pack grabs are countable the same way. A season that has failed
five packs should be trying again weekly, not never.

Also make it recoverable by hand: a manual season search is the operator saying
"try again now", and search_season_now already calls reset_season_backoff
for the episode lane. It should clear the pack guard too, so the documented
escape hatch actually works.

Tests: a season with one failed pack retries after the first backoff window; a
season with several retries on the capped curve; a manual season search retries
immediately regardless of the count; a season currently inside its window still
takes the per-episode lane.

One failed season-pack grab disables pack search for that season forever. `pack_hard_failed` asks whether a failed grab exists, with no time bound: ```sql SELECT EXISTS ( SELECT 1 FROM grabs WHERE target_kind = 'season' AND target_id = ? AND state = 'failed' ) ``` `season_grab_mode` then takes `PerEpisode` for good: ```rust if fully_released && !facts.any_episode_on_disk && !facts.pack_hard_failed { SeasonGrabMode::SeasonPack } else { SeasonGrabMode::PerEpisode } ``` Nothing ever clears that row, so a season that once failed a pack never searches for a pack again — not on the RSS lane, not on targeted search, and not when the operator asks for it by hand. This contradicts §6.2, which is explicit that search never gives up: > Targeted search backs off `1h → 6h → 1d → 3d`, capped at 7d, reset when the > title's metadata changes. It never gives up entirely, it goes quiet. A single bad torrent, a tracker being down for an hour, or one release that failed `ffprobe` is enough to poison the season permanently. The failure it is guarding against is real — retrying a pack that hard-failed on the next tick would thrash — but the guard has no expiry, and "quiet" is not "off". **Observed on Rick and Morty S09.** All ten episodes aired between 2026-05-24 and 2026-07-26, none are on disk, and all ten are wanted — so `fully_released` and `!any_episode_on_disk` both hold and the season should be in `SeasonPack` mode. It is not: episode `search_attempts` keep climbing on the per-episode lane while `/api/series/1/seasons/9/releases` stays empty, and no pack is ever indexed. Give the guard the same shape §6.2 gives everything else: back off, then retry. Reuse the existing curve rather than inventing a second one — `backoff_elapsed` already implements `1h → 6h → 1d → 3d → 7d` against an attempt count, and a season's failed pack grabs are countable the same way. A season that has failed five packs should be trying again weekly, not never. Also make it recoverable by hand: a manual season search is the operator saying "try again now", and `search_season_now` already calls `reset_season_backoff` for the episode lane. It should clear the pack guard too, so the documented escape hatch actually works. Tests: a season with one failed pack retries after the first backoff window; a season with several retries on the capped curve; a manual season search retries immediately regardless of the count; a season currently inside its window still takes the per-episode lane.
naps62-yolo added this to the Season packs milestone 2026-08-24 19:36:59 +01:00
naps62-yolo added the area/daemondifficulty/hardtype/bug labels 2026-08-24 19:36:59 +01:00
naps62-yolo added a new dependency 2026-08-24 19:36:59 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: yolo/arr#181