fix(api): Weekly Rotation underground weight, coin metadata handle, comment cleanup - #1048
Merged
Merged
Conversation
A track in both the trending and underground candidate sets kept the 'trending' row because DISTINCT ON sorted source ascending, so the 1.15 underground weight almost never applied. Also join only the current users row in coin metadata so the default description cites the current handle, and correct the swagger text for suggested-follows (includes playlists) and the Weekly Rotation rollover (Wednesday 00:00 UTC). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ints Trim comments added with suggested-follows, Weekly Rotation, coin metadata, is_streamable enforcement and owner downloads to plain statements of what the code does and why. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Logic fixes:
trendingsource for tracks in both candidate sets (ORDER BY source ASCsortstrendingfirst), so the 1.15 underground weight almost never applied. It now prefersunderground. The new test pins a week where the trending-only track would otherwise win by about 1%. It fails before the fix.userswithoutis_current, so a user with a superseded row could get their old@handlein the generated description. The join now filters onis_current, and the test adds a non-current row.Comment cleanup: shortened long or narrative comments added with suggested-follows, Weekly Rotation, coin metadata, is_streamable enforcement and owner downloads. No code changes in that commit.
Tests:
go test ./api/...passes exceptTestSearch, which needs Elasticsearch on :21401 and isn't running locally.gofmt -lis clean on the changed files.🤖 Generated with Claude Code