perf(crossseed): one fewer RED/OPS request per unmatched album #4903
All Vouch review confidence checks passed
Residual risk 0.28 = Change Risk (0.48) × (1 − Review Confidence (0.40)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 501 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 74% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.372
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #4903"
general
weight: 0.35
greptile-apps[bot]
Description
Problem: Every music album with no match on Orpheus or Redacted cost 3 requests, and one of them, the old-flag hash (APL on Orpheus, PTH on Redacted), almost never found anything, so a burst of completed albums hit the rate limit sooner.
Fix: A RED/OPS lookup now asks the current-flag hash, then the file-name search, and asks the old-flag hash only when the file-name search cannot decide. An album with no match costs 2 requests, and an old-flag upload is still found.
Part of #4883. Closes #4891
Breaking change
No breaking change.
Behaviour change
gazelle:size), not a hash match.How has this been tested?
Evidence: https://bin.getqui.com/e/V6LGAXOKMC34DIUO3OF2376COK
Live run of a built qui in a network namespace with only loopback, so nothing could reach a real tracker.
orpheus.networkpointed at a local fake Gazelle site over TLS, and a fake qBittorrent held made-up albums. A manual search with only Orpheus picked, for each album, from the fake site's request log:The requests went about 4.6 seconds apart, the Orpheus pace. The tests in
gazellemusic/match_test.goandratelimit_test.gocover each case of the ticket.Merge danger: two-way door, RED/OPS lookups only.
Performance
An album with no match on a RED/OPS site costs 2 requests instead of 3, about 4.6 seconds less of the Orpheus pace per album.
| Path | Requests to the site |
|---|---|
| Lookup, no match, a music-file search returns 20 results or fewer | 3 → 2 |
| Lookup, old-flag upload, a music-file search returns 20 results or fewer | 2 → 2 (found by the file-name search, not the old-flag hash) |
| Lookup, every file-name search returns more than 20 results, no match | up to 7 → up to 7 |
| Lookup, every file-name search returns more than 20 results, old-flag upload | 2 → up to 7 (the file-name searches now come first) |
Counted from the request log of an
httptestfake Gazelle site inTestFindMatchDecisiveMissSendsTwoRequests, run on base 62f54e2 (3 requests: current-flag hash, old-flag hash, browse) and on head; the head count matches the live run above. No CPU or memory risk: the change reorders the same calls and adds none.Checklist