Skip to content

fix(recommender): detect and exclude box sets, omnibuses, and anthology contributions#392

Merged
vavallee merged 1 commit intomainfrom
fix/recommender-collection-filter
Apr 24, 2026
Merged

fix(recommender): detect and exclude box sets, omnibuses, and anthology contributions#392
vavallee merged 1 commit intomainfrom
fix/recommender-collection-filter

Conversation

@vavallee
Copy link
Copy Markdown
Owner

Summary

  • Adds looksLikeCollection(title string) bool to internal/recommender/candidates.go; returns true when the title (case-insensitive) contains any of: complete, collected, omnibus, boxed set, box set, anthology, the best of, stories of, tales of, (omnibus), (collection), complete works, complete collection
  • Wires the check into hardFilter in internal/recommender/recommender.go so matching candidates are suppressed from the Discover page
  • Adds TestLooksLikeCollection in candidates_test.go covering 8 cases (7 matches, 1 clean title)

Closes #361

Test plan

  • go test ./internal/recommender/... passes
  • Titles like "Dune Omnibus", "The Complete Asimov Stories", "Box Set: Stormlight Archive" do not surface in Discover
  • Clean single-book titles like "Dune" are unaffected

🤖 Generated with Claude Code

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Codecov Report

❌ Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/recommender/recommender.go 0.00% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

…gy contributions

Adds a looksLikeCollection helper that matches titles containing keywords
like "omnibus", "box set", "anthology", "complete", "collected", etc., and
wires it into hardFilter so these multi-work entries are suppressed from
the Discover page. Includes TestLooksLikeCollection covering 8 cases.

Closes #361

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vavallee vavallee force-pushed the fix/recommender-collection-filter branch from 4bccb92 to 2c92633 Compare April 24, 2026 20:17
@vavallee vavallee merged commit fa60591 into main Apr 24, 2026
25 of 26 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.

fix(recommender): detect and exclude box sets, omnibuses, and anthology contributions

1 participant