Skip to content

Fix incomplete results for large collections (>2500 items)#7

Merged
rianvdm merged 5 commits intomainfrom
fix/large-collection-indexing
Mar 15, 2026
Merged

Fix incomplete results for large collections (>2500 items)#7
rianvdm merged 5 commits intomainfrom
fix/large-collection-indexing

Conversation

@rianvdm
Copy link
Copy Markdown
Owner

@rianvdm rianvdm commented Mar 15, 2026

Closes #6

Summary

  • Raises collection index cap from 2,500 to 5,000 items (maxPages 25→50)
  • Fixes pagination.items to report the real Discogs total, not the truncated count
  • Fixes broken truncation detection (was comparing clamped value to itself)
  • Fixes collections KV TTL from 30min to 45min to match intended cache window
  • Adds truncation warnings in get_collection_stats and search_collection output when a collection exceeds the indexed portion

Test plan

  • Confirm 72+ tests pass (68 existing + 4 new CachedDiscogsClient tests)
  • Manual test with a 4000+ item collection: get_collection_stats should report correct total; search_collection should find all matches

🤖 Generated with Claude Code

rianvdm and others added 5 commits March 15, 2026 15:38
Documents the approach for supporting collections up to 5,000 items:
raise maxPages cap, fix pagination.items reporting, fix broken
truncation detection, align collections cache TTL to 45 minutes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… total

- Raise maxPages default from 25 to 50 (supports up to 5000 items)
- Fix pagination.items to return real Discogs total, not truncated count
- Fix broken truncation detection (was comparing clamped value to itself)
- Fix collections KV TTL from 30min to 45min to match intended cache window
- Add tests for truncation behaviour in CachedDiscogsClient

Closes #6

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ctions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rianvdm rianvdm merged commit 60dbb4c into main Mar 15, 2026
2 checks passed
@github-actions
Copy link
Copy Markdown

🚀 Deploy succeeded! Your changes have been deployed to production.

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.

search_collection and get_collection_stats return incomplete results for large collections (4000+ items)

1 participant