Skip to content

One failed search batch no longer strands the albums behind it - #7

Merged
alperien merged 1 commit into
mainfrom
port/search-batches
Jul 27, 2026
Merged

One failed search batch no longer strands the albums behind it#7
alperien merged 1 commit into
mainfrom
port/search-batches

Conversation

@alperien

@alperien alperien commented Jul 27, 2026

Copy link
Copy Markdown
Owner

The last idea worth taking from fix/robustness-audit.

Searches go out in batches of a hundred, and a batch that failed raised straight out of search_albums. On a 250-album chart, one timed-out request in the middle left the last fifty albums unsearched — and the caller printed a single search request failed line that never said how many albums it had cost.

Reproduced on current main: with the second of three batches failing, the third is never attempted.

Change

Every batch is attempted. search_albums returns (queued, errors), and the push reports how many albums went unsearched and why, so a partial failure is visible and fixable by rerunning with --search.

Ids that came back None are dropped before batching, so a Lidarr that answers an add without a body can't put a null in the command payload.

Verification

This closes out fix/robustness-audit

Everything in that branch is now either on main or deliberately declined:

Finding Where it landed
Decision should outrank the match #5
Credentials in error messages #5
searchForNewAlbum unreliable #6
Failed search batch strands the rest this PR
Unreachable retry semantics already on main as SearchUnavailable
Error normalisation already on main, as a superset
Undo a mistaken skip #4, as the u key
Tied-rank keys moot — main keys on sha1(artist+title)
Confirm screen and --no-search declined: preference, not correctness

After this, that branch and the other four stale ones can be deleted.

Searches go out in hundreds and a failing batch raised immediately, so a
250-album chart could lose its last fifty to one timed-out request, with
nothing said. Every batch is attempted; the summary reports what missed.

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@alperien, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 44 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 90097cd8-9aa6-4089-9c5c-730f266e19dd

📥 Commits

Reviewing files that changed from the base of the PR and between 9582455 and 76c0f81.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • chartarr/cli.py
  • chartarr/lidarr.py
  • tests/test_cli.py
  • tests/test_lidarr.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch port/search-batches

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@alperien
alperien merged commit d57e946 into main Jul 27, 2026
14 checks passed
@alperien alperien mentioned this pull request Jul 28, 2026
alperien added a commit that referenced this pull request Jul 28, 2026
Version bump and changelog. No code changes; everything here landed in
#4, #5, #6 and #7.

Four fixes since 0.1.0, led by the review screen redrawing about 17,000
times a second while it waited for a keypress. Also: a skip or re-pick
ignored on a row that also matched, one failed search request stranding
the albums behind it, and basic-auth credentials appearing in error
messages. Adds the u undo key and an idle-albums note when --search is
off.

The --search round trip between #4 and #6 is deliberately absent from
the changelog: 0.1.0 already searched correctly, and nothing shipped in
between, so there is no user-visible bug to report. The dead
searchForNewAlbum flag's removal is recorded under Changed.

Co-Authored-By: Claude <noreply@anthropic.com>
@alperien
alperien deleted the port/search-batches branch July 28, 2026 13:48
alperien added a commit that referenced this pull request Jul 28, 2026
Searches are sent in batches of a hundred and a failing batch raised out
of search_albums immediately, so a 250-album chart could lose its last
fifty to one timed-out request, reported only as a single line that did
not say how many albums it cost.

Every batch is attempted now. search_albums returns (queued, errors) and
the push reports how many albums went unsearched and why. Ids that came
back None are dropped before batching.

The last idea worth taking from fix/robustness-audit. 142 passing.
alperien added a commit that referenced this pull request Jul 28, 2026
Version bump and changelog. No code changes; everything here landed in
#4, #5, #6 and #7.

Four fixes since 0.1.0, led by the review screen redrawing about 17,000
times a second while it waited for a keypress. Also: a skip or re-pick
ignored on a row that also matched, one failed search request stranding
the albums behind it, and basic-auth credentials appearing in error
messages. Adds the u undo key and an idle-albums note when --search is
off.

The --search round trip between #4 and #6 is deliberately absent from
the changelog: 0.1.0 already searched correctly, and nothing shipped in
between, so there is no user-visible bug to report. The dead
searchForNewAlbum flag's removal is recorded under Changed.
alperien added a commit that referenced this pull request Jul 31, 2026
Searches are sent in batches of a hundred and a failing batch raised out
of search_albums immediately, so a 250-album chart could lose its last
fifty to one timed-out request, reported only as a single line that did
not say how many albums it cost.

Every batch is attempted now. search_albums returns (queued, errors) and
the push reports how many albums went unsearched and why. Ids that came
back None are dropped before batching.

The last idea worth taking from fix/robustness-audit. 142 passing.
alperien added a commit that referenced this pull request Jul 31, 2026
Version bump and changelog. No code changes; everything here landed in
#4, #5, #6 and #7.

Four fixes since 0.1.0, led by the review screen redrawing about 17,000
times a second while it waited for a keypress. Also: a skip or re-pick
ignored on a row that also matched, one failed search request stranding
the albums behind it, and basic-auth credentials appearing in error
messages. Adds the u undo key and an idle-albums note when --search is
off.

The --search round trip between #4 and #6 is deliberately absent from
the changelog: 0.1.0 already searched correctly, and nothing shipped in
between, so there is no user-visible bug to report. The dead
searchForNewAlbum flag's removal is recorded under Changed.
alperien added a commit that referenced this pull request Jul 31, 2026
Searches are sent in batches of a hundred and a failing batch raised out
of search_albums immediately, so a 250-album chart could lose its last
fifty to one timed-out request, reported only as a single line that did
not say how many albums it cost.

Every batch is attempted now. search_albums returns (queued, errors) and
the push reports how many albums went unsearched and why. Ids that came
back None are dropped before batching.

The last of the hardening fixes. 142 passing.
alperien added a commit that referenced this pull request Jul 31, 2026
Version bump and changelog. No code changes; everything here landed in
#4, #5, #6 and #7.

Four fixes since 0.1.0, led by the review screen redrawing about 17,000
times a second while it waited for a keypress. Also: a skip or re-pick
ignored on a row that also matched, one failed search request stranding
the albums behind it, and basic-auth credentials appearing in error
messages. Adds the u undo key and an idle-albums note when --search is
off.

The --search round trip between #4 and #6 is deliberately absent from
the changelog: 0.1.0 already searched correctly, and nothing shipped in
between, so there is no user-visible bug to report. The dead
searchForNewAlbum flag's removal is recorded under Changed.
alperien added a commit that referenced this pull request Jul 31, 2026
Searches are sent in batches of a hundred and a failing batch raised out
of search_albums immediately, so a 250-album chart could lose its last
fifty to one timed-out request, reported only as a single line that did
not say how many albums it cost.

Every batch is attempted now. search_albums returns (queued, errors) and
the push reports how many albums went unsearched and why. Ids that came
back None are dropped before batching.

The last of the hardening fixes. 142 passing.
alperien added a commit that referenced this pull request Jul 31, 2026
Version bump and changelog. No code changes; everything here landed in
#4, #5, #6 and #7.

Four fixes since 0.1.0, led by the review screen redrawing about 17,000
times a second while it waited for a keypress. Also: a skip or re-pick
ignored on a row that also matched, one failed search request stranding
the albums behind it, and basic-auth credentials appearing in error
messages. Adds the u undo key and an idle-albums note when --search is
off.

The --search round trip between #4 and #6 is deliberately absent from
the changelog: 0.1.0 already searched correctly, and nothing shipped in
between, so there is no user-visible bug to report. The dead
searchForNewAlbum flag's removal is recorded under Changed.
alperien added a commit that referenced this pull request Jul 31, 2026
Searches are sent in batches of a hundred and a failing batch raised out
of search_albums immediately, so a 250-album chart could lose its last
fifty to one timed-out request, reported only as a single line that did
not say how many albums it cost.

Every batch is attempted now. search_albums returns (queued, errors) and
the push reports how many albums went unsearched and why. Ids that came
back None are dropped before batching.

The last of the hardening fixes. 142 passing.
alperien added a commit that referenced this pull request Jul 31, 2026
Version bump and changelog. No code changes; everything here landed in
#4, #5, #6 and #7.

Four fixes since 0.1.0, led by the review screen redrawing about 17,000
times a second while it waited for a keypress. Also: a skip or re-pick
ignored on a row that also matched, one failed search request stranding
the albums behind it, and basic-auth credentials appearing in error
messages. Adds the u undo key and an idle-albums note when --search is
off.

The --search round trip between #4 and #6 is deliberately absent from
the changelog: 0.1.0 already searched correctly, and nothing shipped in
between, so there is no user-visible bug to report. The dead
searchForNewAlbum flag's removal is recorded under Changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant