Repository navigation
fix(deezer): Retry a busy service instead of reading it as no match - #286
Conversation
Deezer's documented error table lists code 700 as SERVICE_BUSY. A 200 body carrying it was a terminal miss, so an outage was recorded as "no match" for the album. It is now retried like an HTTP 5xx and, once the retries are spent, raised as deezer_unavailable. The existing 5xx test is parametrized to cover the code 700 body. Closes F-B23-37. The patch was written by an outside agent (DeepSeek) and approved by an independent typed review.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Graphify reviewed this change.
No issues found by static checks — no coupling regressions or blocking issues in the code graph. That is not the same as safe to merge: see what was not checked.
Not checked: tests were not run; formal verification proved 0 of 2 changed function(s) (2 not verified).
Formal verification. PR-changed functions: 0/2 verified (0 proven, 0 may-equivalent, 0 distinguished) · 2 not verified (2 vacuous).
Not verified on this run: \_deezer\_request (vacuous: never exercised), search\_deezer\_album (vacuous: never exercised).
Graphify review — findings
Fixes Deezer treating a "service busy" reply as "no match": an HTTP 200 body carrying error code 700 (SERVICE_BUSY in Deezer's documented error table) is now retried like a 5xx, so after the retries run out the caller gets deezer_unavailable instead of a recorded miss. The existing exhausted-retries test is parametrized over the HTTP 500 and HTTP 200/code 700 cases and renamed to test_deezer_search_refused_on_every_attempt_raises_unavailable_not_no_match. Bookkeeping closes F-B23-37 and moves it to the findings archive. It also logs the side task in the PLAYBOOK, marks the archive pagination task as merged (PR #284), and bumps the pinned test count from 3119 to 3120.
No blocking issues surfaced.
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 164 functions depend on the 164 functions this change touches.
Health — grade B; 3 existing hotspot(s) in the area this change touches (pre-existing, not introduced here):
search_deezer_album()— 13 callers, 4 callees (high)fetch_deezer_album()— 12 callers, 4 callees (high)test_deezer_http_403_raises_unavailable_not_no_match()— 0 callers, 6 callees (medium)
Verification — 164 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 164 function(s) in the blast radius were not formally verified this run
Formal verification
Could not verify: Could not verify \_deezer\_request.
The verifier did not have enough to check \_deezer\_request, so it is saying so rather than guessing. No false assurance is the whole point.
Guarantee: No guarantee either way, this is an honest abstention, not a pass.
Note: Reason: not verifiable: all 95 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous
Could not verify: Could not verify search\_deezer\_album.
The verifier did not have enough to check search\_deezer\_album, so it is saying so rather than guessing. No false assurance is the whole point.
Guarantee: No guarantee either way, this is an honest abstention, not a pass.
Note: Reason: not verifiable: all 95 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous
Summary
Closes F-B23-37. Deezer reports errors with HTTP 200 and an error code in the body, and
_deezer_requestretried only code 4 (quota): every other code was read as a terminal miss, so a busy Deezer was recorded as "this album is not on Deezer". Deezer's documented error table (developers.deezer.com/api/errors, read by the owner on 2026-10-31) lists 700 asSERVICE_BUSY. Code 700 now takes the same path as an HTTP 5xx: retried, then raised asdeezer_unavailable, never None. Codes 4 and 800 and unknown codes behave as before.An outside agent (DeepSeek) wrote the patch in an isolated worktree from a spec-tight prompt; a before-and-after snapshot of the main checkout confirmed it wrote nothing outside its worktree. An independent review approved it (no Critical or Important findings) and reproduced the red proof on unpatched code. The existing test
test_deezer_search_5xx_on_every_attempt_raises_unavailable_not_no_matchbecame the parametrizedtest_deezer_search_refused_on_every_attempt_raises_unavailable_not_no_match(HTTP 500, and HTTP 200 with code 700); no test was added.Validation at this head
Head
47bf996a. Gates scoped to the change (owner ruling 2026-10-31):suite-subdirs1512 andsuite-core905 passed,pre-commit(every hook) anddocsync-checkpass. Fullpytest -q: 3120 passed (pinned). Fresh check before this PR: the edited test fails on the unpatched module ("DID NOT RAISE ProviderError" for the 700 case; the 500 case passes) and passes at the head.Codex: waived by the owner until the usage limits reset. CI: green at this head (run 41224850777: 2960 + 156 passed, 4 skipped; frontend gate 58 checks). Codacy 0 new issues, qlty pass, no open review threads.
Checklist
pytest -qpasses (update SESSION_CONTEXT Section 1 if test count changed)pre-commit run --all-filespasses (all hooks)python scripts/doc_state_sync.py --checkexits 0- Batch WP: inside
DOCSYNC:CURRENT-BATCH-START/ENDmarkers- Side task: after
DOCSYNC:CURRENT-BATCH-ENDmarker(or deviation is logged in the Section 4 entry)