Repository navigation
Allow three display name changes through Popcorn - #539
Merged
Merged
Conversation
This was referenced Dec 1, 2026
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||
msaroufim
marked this pull request as ready for review
December 1, 2026 03:45
Contributor
|
Thanks for these PRs! |
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.
Add a CLI-authenticated
PATCH /user/profileendpoint so users can choose the name shown on their existing leaderboard entries and chart history. Names are trimmed to 1–32 printable characters. Each account gets three successful lifetime changes; invalid requests and unchanged names consume none. The response includes the saved name and remaining changes, and a fourth distinct change returns a clear HTTP 403 error.One counter on
leaderboard.user_infoand a row lock keep concurrent requests within the allowance. Historical entries already join the canonical user record, so submission IDs, scores, and ownership stay unchanged. CLI re-registration preserves and returns the chosen name.Apply migration
20261130_02_display-name-changesbefore deploying the API. Companion CLI and Kernelboard changes add the command and refresh names in historical caches; no website rename controls or Discord announcement changes.Validation: 428 tracked non-integration tests pass, including 21 new real-PostgreSQL/API tests for authentication, validation, unchanged names, the three-change boundary, concurrent final-slot requests, historical rankings, and re-registration. Migration apply/rollback/reapply verified locally. Actual Popcorn → local FastAPI → PostgreSQL smoke test verifies three successful changes and the fourth rejection, with no GPU work or production mutations. Ruff and diff checks pass.