Use policy scoring weights in release search #74

Merged
naps62-yolo merged 3 commits from issue/68-core-scoring-wire into main 2026-08-22 22:12:18 +01:00
Owner

Replaces the search endpoint placeholder with arr-core scoring and hydrates score weights from the policy row.\n\nCloses #68.

Replaces the search endpoint placeholder with `arr-core` scoring and hydrates score weights from the policy row.\n\nCloses #68.
naps62-yolo added 2 commits 2026-08-22 21:46:21 +01:00
Merge remote-tracking branch 'origin/main' into issue/68-core-scoring-wire
ci / web (pull_request) Successful in 29s
e2e / e2e (pull_request) Successful in 52s
ci / rust (pull_request) Successful in 4m9s
cd9e22e410
naps62-yolo reviewed 2026-08-22 21:48:40 +01:00
naps62-yolo left a comment
Author
Owner

Reviewed cd9e22e. One finding, on the line below.

Reviewed `cd9e22e`. One finding, on the line below. <!-- agent-meta: {"model":"claude-opus-5","session":"298dcd6d"} -->
@@ -476,0 +488,4 @@
let score = score(
policy,
Candidate::PreGrab(&parsed),
release.size.unwrap_or_default(),
Author
Owner

release.size.unwrap_or_default() turns an unknown size into 0 bytes, and the size term then interpolates up from the band floor: with the seeded weights and the 2160p band that is 1000 * (0 - 8GiB) / 14GiB = -571, where the old local score() returned a neutral 0 for None.

The floor rule abstains when the size is unknown (crates/arr-core/src/policy.rs:226 needs Some(size)), so a sizeless release stays eligible but now sorts near the bottom of the eligible bucket.

Apply the size term only when the size is known — skip the size component for None rather than scoring it as a zero-byte file.

`release.size.unwrap_or_default()` turns an unknown size into 0 bytes, and the size term then interpolates up from the band floor: with the seeded weights and the 2160p band that is `1000 * (0 - 8GiB) / 14GiB = -571`, where the old local `score()` returned a neutral 0 for `None`. The floor rule abstains when the size is unknown (`crates/arr-core/src/policy.rs:226` needs `Some(size)`), so a sizeless release stays eligible but now sorts near the bottom of the eligible bucket. Apply the size term only when the size is known — skip the size component for `None` rather than scoring it as a zero-byte file. <!-- agent-meta: {"model":"claude-opus-5","session":"298dcd6d"} -->
naps62-yolo marked this conversation as resolved
naps62-yolo added 1 commit 2026-08-22 21:51:03 +01:00
fix(api): skip unknown release size score
ci / rust (pull_request) Successful in 1m31s
ci / web (pull_request) Successful in 39s
e2e / e2e (pull_request) Successful in 1m40s
68e404ed07
naps62-yolo reviewed 2026-08-22 21:51:30 +01:00
naps62-yolo left a comment
Author
Owner

Reviewed 68e404e. No findings — the sizeless case now drops the size term and the new test pins it.

Reviewed `68e404e`. No findings — the sizeless case now drops the size term and the new test pins it. <!-- agent-meta: {"model":"claude-opus-5","session":"298dcd6d"} -->
naps62-yolo merged commit b5413eef46 into main 2026-08-22 22:12:18 +01:00
naps62-yolo deleted branch issue/68-core-scoring-wire 2026-08-22 22:12:18 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yolo/arr#74