release: play-count read path (test โ main)
Merged
SW
5mo ago+1469+1469+0123456789012345678901234567890123456789-20-20-01234567890123456789
Promotes exactly one change: #660 โ stitched /track/historic-stats (store-only spotify history + backfill enqueue), GET /research/playcounts, GET /research/track/playcount-deltas.
Preview-verified with real data (results table on #660); docs reconciled and live (docs#239). Release scope checked: 4192e1bf is the only commit on test not on main.
Part of recoupable/chat#1791.
๐ค Generated with Claude Code
Summary by cubic
Adds store-served play-count APIs: stitched Spotify historic stats, album playcounts, and per-track deltas. Reduces Songstats use on the Spotify path, labels per-point provenance, and enqueues missing backfills, meeting recoupable/chat#1791.
- New Features
- GET /api/research/track/historic-stats: Spotify history comes from the measurement store only (Apify snapshots + Songstats backfill points); dedupes by date preferring Apify, honors start/end dates, enqueues unbackfilled tracks; other sources still passthrough.
- GET /api/research/playcounts?spotify_album_id=: Latest platform-displayed playcount per mapped track on an album; 404 with a pointer to POST /api/research/snapshots when no snapshot exists.
- GET /api/research/track/playcount-deltas?isrc=&since[&until=]: Nearest-capture deltas per (platform, metric) with annualized run-rate; returns an empty array when history is insufficient; 404 for unknown ISRC.