55373d228c
#239 moved §5.7's attention window to `failed_at` and left §6.2's pack ladder on `grabbed_at`. A torrent that stalls for weeks before ffprobe condemns it at import has elapsed the whole ladder the moment it fails, so the pack lane retried a source that had just failed — the one thing the backoff exists to prevent. The ladder now measures from the failure, the same anchor and the same column §5.7 reads, with `grabbed_at` as the fallback for rows written before the column existed. All three sites read `max(coalesce(failed_at, grabbed_at))`, so the `last_failed_at` alias holds what its name says — including the one the season deck feeds into `reopens_at` and `pack_retry_at`, which was showing a grab time under a name §5.7 had redefined. DESIGN.md §6.2 states the anchor the way §5.7 states its own. Tests cover a pack grabbed 35 days ago and failed 10 minutes ago on the targeted lane, the RSS lane and the season deck. `just ci` through the gate: 519/519 tests pass, web checks clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
29 lines
792 B
JSON
29 lines
792 B
JSON
{
|
|
"db_name": "SQLite",
|
|
"query": "SELECT count(*) AS \"failures!: i64\",\n max(coalesce(failed_at, grabbed_at)) AS \"last_failed_at?: String\"\n FROM grabs\n WHERE target_kind = 'season' AND target_id = ? AND state = 'failed'",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "failures!: i64",
|
|
"ordinal": 0,
|
|
"type_info": "Integer",
|
|
"origin": "Expression"
|
|
},
|
|
{
|
|
"name": "last_failed_at?: String",
|
|
"ordinal": 1,
|
|
"type_info": "Text",
|
|
"origin": "Expression"
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Right": 1
|
|
},
|
|
"nullable": [
|
|
false,
|
|
true
|
|
]
|
|
},
|
|
"hash": "3e8fdbb8d28441b429d2ef011f206c4fad280f56905b6a85035a142dd592dbec"
|
|
}
|