Skip to content

Conversation

robertky
Copy link
Member

Closes #105

What was done

  • Expanded the reproducible MusicBrainz snapshot from 500 to 2,000 real albums, retaining all 500 existing release groups. Added 49 familiar album targets so reviewers can find recognizable titles and exercise the filters across 11 genres, eight decades and 60 artist countries.
  • Updated the fetch script with paginated searches, batched artist-country lookups, reuse of previous country/track metadata and an optional request cache for interrupted fetches. The application still imports the committed snapshot without calling MusicBrainz at runtime.
  • Updated catalog validation, source/import documentation and the AI usage log. Synthetic performance data and deterministic test fixtures remain separate. The snapshot has 100 track lists; 21 albums have no release year.

What was tested

  • pnpm format:check && pnpm lint && pnpm typecheck && pnpm test && pnpm build — passed. Client: 203 tests; server: 82 tests with 56 database tests skipped in the default run. Largest client JS chunk: 385.45 kB, below the 512 kB budget.
  • Applied migrations to a temporary PostgreSQL database and ran the server suite with TEST_DATABASE_URL — all 138 tests passed, with none skipped.
  • Imported all 2,000 albums into a separate empty temporary database, added a test review and crate item, then reimported: 0 new / 2,000 matched. All album IDs, the review and the crate item were preserved.
  • Exercised the search resolver against the imported catalog: Abbey Road, Thriller, Nevermind and Kind of Blue were found; genre, decade, country and review filters narrowed the results. Facets reported 11 genres, eight decades and 60 countries.
  • Confirmed 2,000 unique release-group IDs, all original 500 IDs retained and all 49 familiar album targets present. No deployment or production database changes were made.

@robertky robertky requested a review from a team as a code owner November 20, 2026 18:43
Copy link
Member

@erikhfj erikhfj left a comment

Choose a reason for hiding this comment

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

Nice expansion — I checked server/data/musicbrainz-albums.json directly and confirmed all counts and invariants match the PR description and README.md (2,000 unique release groups, all 500 original IDs retained, 49/49 familiar albums present, 11 genres, 8 decades, 60 artist countries, 100 track lists, 21 without release year).

A couple of small things before merging:

  1. Broken Markdown table in docs/AI-USAGE.md: There is a blank line between the previous row and the new 2026-11-20 row, which breaks the Markdown table so the new row renders as plain pipe-delimited text instead of a table row. Removing that blank line fixes it.
  2. Default track-list count in server/scripts/fetch-musicbrainz.mjs: MUSICBRAINZ_TRACK_ALBUM_COUNT still defaults to 50 rather than 100. The snapshot reached 100 track lists because the 50 existing albums kept their tracks and 50 new ones were fetched, so a fresh run from scratch without an existing snapshot would only fetch 50 track lists (disagreeing with README.md). Bumping the default to 100 (or skipping already-populated track lists up to the target) would keep fresh runs consistent.

Two quick coordination notes (no action needed in this PR):

  • .github/workflows/ci.yml runs migrations on deploy, not pnpm db:import:musicbrainz, so we'll need to run the import on the VM after merging for the live prototype to pick up the 2,000 albums.
  • docs/AI-USAGE.md will have a small conflict with #99 depending on merge order.

@robertky robertky force-pushed the feat/105-expand-album-catalog branch 2 times, most recently from b46d079 to 669a715 Compare November 20, 2026 21:20
@erikhfj
Copy link
Member

erikhfj commented Nov 22, 2026

MUSICBRAINZ_TRACK_ALBUM_COUNT in server/scripts/fetch-musicbrainz.mjs still defaults to 50 instead of 100

@robertky robertky force-pushed the feat/105-expand-album-catalog branch from 669a715 to 1a3095c Compare November 22, 2026 20:12
Copy link
Member

@erikhfj erikhfj left a comment

Choose a reason for hiding this comment

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

Confirmed MUSICBRAINZ_TRACK_ALBUM_COUNT now defaults to 100 in server/scripts/fetch-musicbrainz.mjs, README.md and musicBrainzCatalog.test.ts are synced, and CI (including PostgreSQL integration tests) is green. Approving!

@erikhfj erikhfj merged commit 39bfe0a into main Nov 23, 2026
3 checks passed
@erikhfj erikhfj deleted the feat/105-expand-album-catalog branch November 23, 2026 19:15
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expand the real album catalog beyond 500 recognizable albums
2 participants