Skip to content

Conversation

@Calm0
Copy link
Member

@Calm0 Calm0 commented Jan 12, 2026

Removed the unused max_scores field from the challenge creation request and schema.

Calm0 added 2 commits January 12, 2026 13:17
Only commented it out instead of deleting to:
1. Indicate the reasoning why the proto is skipping a field number/tag.
2. In case we want to implement it back in the future and actually make use of it.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the unused max_scores field from the challenge creation API. The field was previously defined in both the protobuf schema and OpenAPI specification but is no longer needed.

Changes:

  • Removed max_scores field from ChallengeCreateRequest message in protobuf schema
  • Removed max_scores field from OpenAPI schema definition
  • Added claim_reward boolean field to another schema (appears unrelated to main purpose)

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
hiro.proto Removed unused max_scores field and its documentation comment from ChallengeCreateRequest
hiro-openapi.yml Removed max_scores field definition from challenge creation schema and added claim_reward field to a different schema

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

@tolgatolgay tolgatolgay changed the title Remove unused challenges 'max_scores' on create Remove unused challenges 'max_scores' on create [HIRO-270] Jan 12, 2026
@linear
Copy link

linear bot commented Jan 12, 2026

@novabyte
Copy link
Member

@sesposito can you review this one and keep in mind the requirements we had from Halfbrick? 🙏

@VBorisof
Copy link

Just wondering, can we be sure this will not break any client code?

@sesposito
Copy link
Member

sesposito commented Jan 13, 2026

@VBorisof you raise a fair point, the proto json unmarshaler in Hiro is initialized with: DiscardUnknown: false, I think that if a customer upgrades Hiro on the server to a release that would contain this change, but have clients that are still sending the max_scores field in the Create request (the incoming value is currently ignored in favor of the server-side config value), it may fail the request.

@Calm0 Calm0 marked this pull request as draft January 15, 2026 12:53
@Calm0 Calm0 marked this pull request as ready for review January 20, 2026 20:44
// Deprecated: This field is no longer used and will be removed in future versions.
// Maximum number of scores a user can submit to the leaderboard.
int64 max_scores = 6;
int64 max_scores = 6 [deprecated = true];
Copy link

@VBorisof VBorisof Jan 21, 2026

Choose a reason for hiding this comment

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

Codegen doesn't currently pick this up right? (the deprecated = true bit)

Copy link
Member

Choose a reason for hiding this comment

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

I don't believe so.

Copy link
Contributor

Choose a reason for hiding this comment

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

I can work on adding support for deprecated, I want to make changes in hiro leaderboard that will need deprecated but that will be a new pr, created linear ticket
https://linear.app/heroiclabs/issue/HIRO-331/add-support-for-deprecated-annotations-in-port

@Calm0 Calm0 merged commit d2beff9 into main Jan 22, 2026
2 checks passed
@Calm0 Calm0 deleted the nabil-remove-unused-Challenges-MaxNumScore-on-Create branch January 22, 2026 10:29
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.

6 participants