Skip to content

Implement UploadCompetitionRankingScore for Splatfest - #19

Open
sultanbarys wants to merge 2 commits into
PretendoNetwork:masterfrom
sultanbarys:main
Open

Implement UploadCompetitionRankingScore for Splatfest#19
sultanbarys wants to merge 2 commits into
PretendoNetwork:masterfrom
sultanbarys:main

Conversation

@sultanbarys

@sultanbarys sultanbarys commented Jun 15, 2026

Copy link
Copy Markdown

Finally got around to finishing the Splatfest implementation. The method was completely stubbed out so I added the handler to actually save competition ranking scores to the database.

Basically what I did:

  • Created the handler that reads the CompetitionRankingUploadScoreParam from the packet and extracts festival_id, score, team_id, team_score, is_first_upload
  • Added the competition_ranking_scores table to store the results
  • Wired it up in the protocol registration

Splatfest should now actually work instead of just silently dropping all the score data. Haven't tested it on actual Wii U yet but the server compiles and the handler logic looks solid.

Resolves #6

Changes:

  • Added UploadCompetitionRankingScore handler in globals/upload_competition_ranking_score.go that parses the NEX packet and extracts competition ranking data
  • Created PostgreSQL migration competition_ranking_scores.sql with schema for storing festival_id, score, team_id, team_score, is_first_upload
  • Integrated handler into ranking protocol via register_common_secure_server_protocols.go

Database migration:

CREATE TABLE IF NOT EXISTS competition_ranking_scores (
    id bigserial PRIMARY KEY,
    pid numeric(10) NOT NULL,
    festival_id integer NOT NULL,
    score integer NOT NULL,
    team_id smallint NOT NULL,
    team_score integer NOT NULL,
    is_first_upload boolean NOT NULL
);

Finally got around to finishing the Splatfest implementation. The method was
completely stubbed out so I added the handler to actually save competition
ranking scores to the database.

Basically what I did:
- Created the handler that reads the CompetitionRankingUploadScoreParam from
  the packet and extracts festival_id, score, team_id, team_score, is_first_upload
- Added the competition_ranking_scores table to store the results
- Wired it up in the protocol registration

Splatfest should now actually work instead of just silently dropping all the
score data. Haven't tested it on actual Wii U yet but the server compiles and
the handler logic looks solid.
Copilot AI review requested due to automatic review settings June 15, 2026 17:26
@CLAassistant

CLAassistant commented Jun 15, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds support for uploading Splatoon competition ranking scores by wiring a new handler into the secure ranking protocol and persisting uploads to Postgres.

Changes:

  • Registers UploadCompetitionRankingScore as the handler for the ranking protocol method.
  • Implements request parsing + DB insert for competition ranking score uploads.
  • Adds a SQL schema for competition_ranking_scores.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
nex/register_common_secure_server_protocols.go Wires the new upload handler into the secure ranking protocol registration.
globals/upload_competition_ranking_score.go Implements the upload handler: parses parameters and inserts into Postgres, returns RMC success.
competition_ranking_scores.sql Introduces the competition_ranking_scores table used by the new handler.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread competition_ranking_scores.sql Outdated
Comment thread globals/upload_competition_ranking_score.go
Comment thread competition_ranking_scores.sql
@ashquarky

Copy link
Copy Markdown
Member

Sorry I've been busy, will give a proper review soon. Just some questions:

  • How tested are your changes? I never got around to implementing Ranking since the Splatfest matchmaking itself doesn't work, and afaik Ranking only comes into it after the match ends. Has something changed - were you able to run matches to test this out?
  • Was LLM or AI assistance used (other than the Copilot review above?) Just for our own info, we're workshopping a policy internally.

@sultanbarys

Copy link
Copy Markdown
Author

Sorry I've been busy, will give a proper review soon. Just some questions:

  • How tested are your changes? I never got around to implementing Ranking since the Splatfest matchmaking itself doesn't work, and afaik Ranking only comes into it after the match ends. Has something changed - were you able to run matches to test this out?
  • Was LLM or AI assistance used (other than the Copilot review above?) Just for our own info, we're workshopping a policy internally.

Hey ashquarky! Thanks for responding, really appreciate that!
The method was completely stubbed so i implemented the actual logic, so the server now saves Splatfest results to the database instead of just dropping them.
Well, i couldn't test this on actual Wii U since Splatfest matchmaking itself is broken(#3 issue), no way to reach it yet and fixing matchmaking is way more complicated.
So i used claude code to understand how to un-stub UploadCompetitionRankingScore, all the other things as structuring the handler is on me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Splatfest results upload

4 participants