feat(egress): report loyalty milestones unlocked by a purchase - #35
Open
dinosoeren wants to merge 1 commit into
Open
feat(egress): report loyalty milestones unlocked by a purchase#35dinosoeren wants to merge 1 commit into
dinosoeren wants to merge 1 commit into
Conversation
Adds unlocked_milestones to the egress PlayerLoyaltyState so a purchase request reports which loyalty milestones that purchase's points gain crossed. Milestones can be claimed at any time rather than being granted automatically when they are reached, so the moment one becomes available is otherwise not observable from this payload. The field reuses the message's existing nested Milestone shape, is repeated because a single purchase can cross more than one threshold, and is disjoint from next_milestone by construction: next_milestone is strictly above the reported balance while these are at or below it. It is purely additive, so a payload that crossed no threshold is unchanged. Regenerated the OpenAPI artifacts to match. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
dinosoeren
marked this pull request as ready for review
August 14, 2026 01:34
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.

Adds
unlocked_milestonesto the egressPlayerLoyaltyState, so a purchase request reports which loyalty milestones that purchase's points gain crossed. Milestones can be claimed at any time rather than being granted automatically when they are reached, so the moment a milestone becomes available is otherwise not observable from the purchase payload.repeated Milestone unlocked_milestones = 10onPlayerLoyaltyState, reusing the message's existing nestedMilestoneshape (milestone_idplus its rewards), so no new vocabulary is introduced.next_milestoneby construction:next_milestoneis strictly above the reported balance, these are at or below it.Regenerated the OpenAPI artifacts to match.
part of STORE-1488
Note
Low Risk
Additive API documentation and proto field only; existing payloads stay unchanged when the field is omitted.
Overview
Purchase egress
PlayerLoyaltyStatenow includesunlockedMilestones: milestones whose thresholds were crossed by that purchase’s points gain, each withmilestoneIdandrewards, reusing the existingMilestoneshape. The field is additive (omitted when no threshold was crossed or points did not increase), can list multiple milestones in ascending order, and is documented as disjoint fromnextMilestone.The shared
MilestoneOpenAPI description is broadened from “next milestone only” to a generic milestone-and-rewards object.docs/gen/swagger.v1.jsonis regenerated for register/confirm payment and related schemas.Reviewed by Cursor Bugbot for commit 7a5e2bc. Bugbot is set up for automated code reviews on this repo. Configure here.