[Contests] Add GET /v1/users/{id}/contests endpoint#789
Closed
dylanjeffers wants to merge 3 commits intomainfrom
Closed
[Contests] Add GET /v1/users/{id}/contests endpoint#789dylanjeffers wants to merge 3 commits intomainfrom
dylanjeffers wants to merge 3 commits intomainfrom
Conversation
…lgorithm Implements a personalized For You feed modeled on Twitter's 2023 open-sourced timeline pipeline (candidate generation -> ranking -> filtering -> diversity). Candidate sources (4): - in-network: recent uploads from artists the viewer follows - weekly trending (track_trending_scores, time_range=week) - underground trending (sub-1500 follower/following artists) - similar-artist 1-hop CF: artists co-saved by users who saved my saved artists' tracks Ranking (SQL-side): - 48h half-life recency: EXP(-LN(2) * hours_old / 48) - engagement: LN(1 + 3*saves + 2*reposts + plays) (saves > reposts > plays) - social affinity: 1 + min(LN(1 + my_engagement_count) / 4, 1) - source weight: in-network 1.20, trending 1.00, underground 0.95, similar 0.90 Filtering / diversity: - hard filters mirror the v1_events_remix_contests.go pattern: is_delete=false, is_unlisted=false, is_available=true, stem_of IS NULL, no access_authorities, owner not deactivated - excludes tracks the viewer has already saved - 3-per-artist cap via ROW_NUMBER() OVER (PARTITION BY owner_id) - Go-side greedy diversity pass with a 5-track lookahead to avoid consecutive same-artist tracks without disturbing global rank Pagination: user_id (required), limit (1-100, default 25), offset (0-200). Consumed by apps#14237. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add the OpenAPI entry for the new endpoint so it shows up in /v1 (swagger UI) and the SDK codegen pipeline. Documents the four query params (user_id required; limit, offset, max_per_artist optional with min/max bounds matching the handler's validate tags) and points the 200 response at the existing "tracks" component schema. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add a per-user remix-contest endpoint so the profile "Contests" tab can fetch only the artist's contests instead of paginating the global discovery list and filtering client-side. Mirrors the discovery endpoint's ordering (active first by soonest end_date, then ended most-recent-first) and `related` payload shape so call sites can swap without changing render logic. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 tasks
Contributor
Author
|
Duplicate — #791 already merged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
🤖 Generated with Claude Code