Skip to content

test: cover interactive singleton manual ID selection - #7109

Merged
snejus merged 1 commit into
beetbox:masterfrom
stewbob:test/singleton-manual-id
Oct 22, 2026
Merged

snejus merged 1 commit into
beetbox:masterfrom
stewbob:test/singleton-manual-id

Conversation

@stewbob

@stewbob stewbob commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Add regression coverage for interactive singleton imports where the user manually enters a MusicBrainz recording ID.

PR #7005 fixed an issue where manually selected metadata candidates were not correctly applied during interactive imports. Its tests cover album manual ID selection and singleton manual search, but not singleton manual ID selection.

This test fills that remaining coverage gap.

Changes

  • Add test_singleton_manual_id_updates_candidates to ImportSingletonTest.
  • Mock the MusicBrainz recording ID lookup to avoid external dependencies.
  • Verify that the requested recording ID is passed to the lookup.
  • Confirm that the imported singleton receives the selected track title, artist and MusicBrainz recording ID.

No production code changes.

Verification

Version Result
Beets 2.14.0 FAIL — original track metadata retained
Beets 2.14.1 PASS — manually selected metadata applied

The 2.14.0 failure occurs after the recording ID lookup succeeds, confirming that the test exercises the original regression.

Additional checks:

  • Terminal importer tests: 61 passed, 3 skipped
  • Ruff lint and formatting: passed
  • git diff --check: passed

AI assistance disclosure

ChatGPT assisted with investigating the regression, identifying the missing test scenario, drafting the test and reviewing the results.

I personally reviewed and applied the changes, executed the tests against both Beets versions, verified the results and created the commit. I will handle the pull request and any maintainer feedback myself.

@stewbob
stewbob requested a review from a team as a code owner October 21, 2026 21:54
@github-actions

Copy link
Copy Markdown

Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry.

@codecov

codecov Bot commented Oct 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.49%. Comparing base (18967aa) to head (8d6b954).
⚠️ Report is 40 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7109      +/-   ##
==========================================
+ Coverage   79.26%   80.49%   +1.23%     
==========================================
  Files         149      149              
  Lines       21216    21243      +27     
  Branches     3276     3281       +5     
==========================================
+ Hits        16817    17100     +283     
+ Misses       3585     3314     -271     
- Partials      814      829      +15     

see 29 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@snejus snejus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@snejus
snejus added this pull request to the merge queue Oct 22, 2026
Merged via the queue into beetbox:master with commit c2c728c Oct 22, 2026
19 checks passed
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.

2 participants