Score release decks at read time, not at search time #114

Closed
opened 2026-08-23 12:16:48 +01:00 by naps62-yolo · 1 comment
Owner

Observed after #113 deployed: The Batman's release deck still ranks an at-target 1080p (1105) above the 23 GiB 4K (1027). The scores were computed and stored when the deck was last searched, under the old weights; policy tuning never re-ranks an existing deck.

DESIGN.md §5.5 says the numbers are policy rows tuned by hand — that only works if tuning takes effect on what the user sees. The deck endpoints (GET /api/movies/:id/releases, and the series equivalent) should recompute the score with arr_core::score from the stored parsed, size and seeders against the current policy, instead of returning the stored score column.

Keep writing the stored score at search time — the daemon's winner selection at grab time can keep using it. Only the read path changes. The stored seeders count is as stale as the deck itself; that is fine, note it and move on.

Mind the ordering: the API pre-sorts by bucket then score, and the web deck relies on that order — re-sort after rescoring.

Observed after #113 deployed: The Batman's release deck still ranks an at-target 1080p (1105) above the 23 GiB 4K (1027). The scores were computed and stored when the deck was last searched, under the old weights; policy tuning never re-ranks an existing deck. DESIGN.md §5.5 says the numbers are policy rows tuned by hand — that only works if tuning takes effect on what the user sees. The deck endpoints (`GET /api/movies/:id/releases`, and the series equivalent) should recompute the score with `arr_core::score` from the stored `parsed`, `size` and `seeders` against the current policy, instead of returning the stored `score` column. Keep writing the stored score at search time — the daemon's winner selection at grab time can keep using it. Only the read path changes. The stored `seeders` count is as stale as the deck itself; that is fine, note it and move on. Mind the ordering: the API pre-sorts by bucket then score, and the web deck relies on that order — re-sort after rescoring.
naps62-yolo added the area/apidifficulty/easyphase/5-uitype/bug labels 2026-08-23 12:16:59 +01:00
Author
Owner

Fixed in 9516697 (merged to main): GET /api/movies/:id/releases and GET /api/episodes/:id/releases now recompute the score with arr_core::score::score from the stored parsed, size and seeders against the current policy, and re-sort by bucket then score. The stored score column is untouched at write time, still used by the daemon at grab time.

Fixed in 9516697 (merged to main): `GET /api/movies/:id/releases` and `GET /api/episodes/:id/releases` now recompute the score with `arr_core::score::score` from the stored `parsed`, `size` and `seeders` against the current policy, and re-sort by bucket then score. The stored `score` column is untouched at write time, still used by the daemon at grab time.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yolo/arr#114