Skip to content

feat: Credits & Provenance — the people behind the music#219

Merged
SimplicityGuy merged 5 commits intomainfrom
claude/issue-164-kgcqp
Mar 27, 2026
Merged

feat: Credits & Provenance — the people behind the music#219
SimplicityGuy merged 5 commits intomainfrom
claude/issue-164-kgcqp

Conversation

@SimplicityGuy
Copy link
Copy Markdown
Owner

Summary

Closes #164 — Surfaces the people behind the music (producers, engineers, mastering engineers, session musicians, designers) as first-class graph entities with queryable API endpoints and an interactive Explore UI pane.

  • Graph model: Person nodes with CREDITED_ON (role, category) and SAME_AS (→Artist) relationships
  • Data pipeline: Extracts extraartists from Discogs release XML, normalizes credits with role taxonomy, creates graph entities in both per-message and batch processing paths
  • Role taxonomy: 6 categories (production, engineering, mastering, session, design, management) + "other" fallback with substring matching
  • 8 API endpoints: person credits, timeline, profile, release credits, role leaderboard, shared credits, connections graph, autocomplete
  • Explore UI: New "Credits" pane with person search, profile card, Plotly.js timeline chart, filterable release list, D3.js connections graph, and role leaderboard
  • Neo4j schema: Person unique constraint, credit_count range index, person_name fulltext index

Test plan

  • 28 tests for role taxonomy (tests/common/test_credit_roles.py)
  • 5 tests for extraartists normalization (tests/common/test_data_normalizer.py)
  • 18 tests for credits API endpoints (tests/api/test_credits.py)
  • 15 tests for credits query functions (tests/api/test_credits_queries.py)
  • 1 test for graphinator credits processing (tests/graphinator/test_graphinator.py)
  • 3 tests for Person schema objects (tests/schema-init/test_neo4j_schema.py)
  • All 1215 existing API tests pass
  • All 670 common/schema/graphinator tests pass
  • Ruff linting passes clean

https://claude.ai/code/session_01NomEjsUFJNWeFJpZaifDNU

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

❌ Patch coverage is 99.82759% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
explore/static/js/credits.js 99.64% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

claude and others added 4 commits March 27, 2026 09:44
Surface credited personnel (producers, engineers, mastering engineers,
session musicians, designers) as first-class graph entities with
queryable API endpoints and an interactive Explore UI pane.

- Add Person node type with CREDITED_ON and SAME_AS relationships
- Extract extraartists from Discogs release data in normalizer
- Create role taxonomy (production/engineering/mastering/session/design/management)
- Extend graphinator and batch processor for credits ingestion
- Add 8 API endpoints: person credits, timeline, profile, release credits,
  role leaderboard, shared credits, connections graph, autocomplete
- Add Credits pane to Explore UI with search, profile card, timeline chart,
  release list, D3.js connections graph, and leaderboard
- Add Neo4j schema: Person constraint, credit_count index, fulltext index
- Add comprehensive tests (33 API + 28 taxonomy + 5 normalizer + graphinator)

https://claude.ai/code/session_01NomEjsUFJNWeFJpZaifDNU
- Fix Semgrep XSS findings: replace all innerHTML usage in credits.js
  with safe DOM APIs (createElement, textContent, appendChild)
- Remove unused _escapeHtml helper (no longer needed)
- Add test coverage for Redis caching paths in credits router
  (cache hit, cache miss/set, cache error fallthrough for both
  person_credits and role_leaderboard endpoints)
- Add 503 service-not-ready tests for all 7 credits endpoints
- Add batch processor tests for credits/extraartists processing
  (with artist ID, without artist ID, and invalid credit data)
- Add credits endpoints to perftest config and runner
  (person credits, timeline, profile, connections, autocomplete,
  role leaderboard, and shared credits between person pairs)
- Update documentation: API, graphinator, common, and explore
  READMEs now document Credits & Provenance feature, Person nodes,
  CREDITED_ON/SAME_AS relationships, and all 8 API endpoints

https://claude.ai/code/session_01NomEjsUFJNWeFJpZaifDNU
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add 108 Vitest tests for credits.js (CreditsPanel class)
- Add 2 batch_processor tests that execute batch_write closure for
  credits code paths (CREDITED_ON + SAME_AS queries)
- Add data_normalizer test for non-dict extraartist entries (else branch)
- Add app.test.js tests for genres and credits pane switching

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@SimplicityGuy SimplicityGuy force-pushed the claude/issue-164-kgcqp branch from 74e7e79 to eb4331d Compare March 27, 2026 17:46
Cover d3 simulation tick handler, label text truncation, node click
navigation, forceLink id accessor, and dy attribute callbacks in
_renderConnections. Enhanced d3 mock to capture and invoke callbacks.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

E2E Coverage (webkit)

Totals Coverage
Statements: 41.09% ( 1005 / 2446 )
Lines: 41.09% ( 1005 / 2446 )

StandWithUkraine

@github-actions
Copy link
Copy Markdown
Contributor

E2E Coverage (firefox)

Totals Coverage
Statements: 41.09% ( 1005 / 2446 )
Lines: 41.09% ( 1005 / 2446 )

StandWithUkraine

@github-actions
Copy link
Copy Markdown
Contributor

E2E Coverage (chromium)

Totals Coverage
Statements: 41.09% ( 1005 / 2446 )
Lines: 41.09% ( 1005 / 2446 )

StandWithUkraine

@github-actions
Copy link
Copy Markdown
Contributor

E2E Coverage (webkit - iPhone 15)

Totals Coverage
Statements: 41.09% ( 1005 / 2446 )
Lines: 41.09% ( 1005 / 2446 )

StandWithUkraine

@github-actions
Copy link
Copy Markdown
Contributor

E2E Coverage (webkit - iPad Pro 11)

Totals Coverage
Statements: 41.09% ( 1005 / 2446 )
Lines: 41.09% ( 1005 / 2446 )

StandWithUkraine

@SimplicityGuy SimplicityGuy merged commit 9abe2d7 into main Mar 27, 2026
57 checks passed
@SimplicityGuy SimplicityGuy deleted the claude/issue-164-kgcqp branch March 27, 2026 18:30
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.

feat: Credits & Provenance — the people behind the music

2 participants