Repository navigation
Leaderboard Ordering - Reject repeated score uploads for a submission - #2608
Merged
Merged
Conversation
8 tasks done
ihsaan-ullah
force-pushed
the
fix_leaderboard_ordering
branch
from
October 20, 2026 06:16
0f5bf58 to
09f5e57
Compare
ObadaS
force-pushed
the
fix_leaderboard_ordering
branch
from
October 20, 2026 11:14
09f5e57 to
9f13bde
Compare
Collaborator
Didayolo
force-pushed
the
fix_leaderboard_ordering
branch
from
October 21, 2026 03:50
9f13bde to
ec0da6b
Compare
Member
|
@ObadaS This problem has always been tricky to reproduce. It happened sometimes quite randomly (you can find examples in the associated issue). |
This was referenced Oct 21, 2026
Collaborator
Author
|
Sorry @obada, I did not provide enough details for testing: Steps to reproduce the problem
docker compose exec django python manage.py shell -c "from competitions.models import Submission; print(Submission.objects.get(pk=<SUB_ID>).secret)"
curl -X POST http://localhost/api/upload_submission_scores/<SUB_ID>/ \
-H "Content-Type: application/json" \
-d '{"secret": "<secret>", "scores": {"final_score": 0.17}}'
|
ihsaan-ullah
force-pushed
the
fix_leaderboard_ordering
branch
from
October 21, 2026 08:38
ec0da6b to
2a56793
Compare
upload_submission_scores now returns 409 Conflict when the submission already has scores for its phase leaderboard, instead of creating another set of score rows. Repeated uploads previously added duplicate rows, and the leaderboard ranks on the sum of a column's rows, so a submission could rank above higher-scoring submissions. The check uses the submission's own scores, so each child of a multi-task or multi-queue parent can still upload once. Add UploadSubmissionScoresTests covering successful uploads, unknown keys, leaderboard placement, wrong secret, missing scores, repeated uploads and child/parent uploads.
ObadaS
force-pushed
the
fix_leaderboard_ordering
branch
from
October 27, 2026 10:25
2a56793 to
040d6f2
Compare
ObadaS
approved these changes
Oct 27, 2026
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.




Description
upload_submission_scoresnow returns 409 Conflict when the submission already has scores for its phase leaderboard, instead of creating another set of score rows. Repeated uploads previously added duplicate rows, and the leaderboard ranks on the sum of a column's rows, so a submission could rank above higher-scoring submissions.UploadSubmissionScoresTestscovering successful uploads, unknown keys, leaderboard placement, wrong secret, missing scores, repeated uploads and child/parent uploads.For more details check this comment: #1540 (comment)
Issues this PR resolves
N/ascores discussion #1540Additional files
I used the follwoing bundle and submissions to check everything
Bundle.zip
Sample_Submission.zip
Submissions to create multiple ranking scores on leaderboard
Checklist