feat(core): Sprocket-primary platform identity (issue #727)#737
Draft
feat(core): Sprocket-primary platform identity (issue #727)#737
Conversation
- Resolve platform accounts via member_platform_account first; backfill from mledb.player_account during cutover - Discord OAuth: returning users no longer require mledb.player; sync legacy accounts with upsert - Intake: optional Steam IDs on CreatePlayerTuple; write to Sprocket and mirror to mledb when MLE_Player bridge exists - Member relink: re-upsert mledb.player_account after Sprocket update - Drop unique tracker index on mledb.player_account (migration + entity) - Document legacy mirror and removal plan on MledbPlayerAccountService Co-authored-by: Jake Bailey <asaxplayinghorse@gmail.com>
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.
Summary
Implements GitHub issue #727: treat
sprocket.member_platform_account(and Discord auth onUser) as the source of truth for platform account linkage, withmledb.player_accountas an explicit, temporary mirror during cutover.Changes
MledbPlayerService:getSprocketUserByPlatformInformation,getSprocketPlayerByPlatformInformation, andgetPlayerByPlatformIdresolve the user via SprocketMemberPlatformAccountfirst. If only legacy data exists, they readmledb.player_account+ Discord crosswalk and best-effort backfill the Sprocket row for the default-org member.discord.strategy): Returning users with Discord linked in Sprocket no longer require a row inmledb.player. New account import still requires MLEDB until full cutover. Legacymledb.player_accountrows are synced into Sprocket withupsertMemberPlatformAccount(idempotent).PlayerService.intakeUser: optionalaccountSteamIdsonCreatePlayerTuplewrites Steam links to Sprocket and mirrors tomledb.player_accountwhen anMLE_Playerbridge exists (Rocket League / game id 7 only).MemberFixService: after relinkingMemberPlatformAccount, re-upserts the legacymledb.player_accountrow when the platform code maps toMLE_Platform.player_account_tracker_uniqueonmledb.player_account(multiple rows could share empty/null trackers during Sprocket-primary mirroring). Entity index annotation aligned.MledbPlayerAccountService: JSDoc documents what is mirrored and a removal plan formledb.player_accountwrites.Proof
npm run build --workspace=core(passes).npm run test --workspace=coreforplayer.service.specwas not run here: Jest fails in this environment without secrets (e.g.REDIS_PASSWORD).Follow-ups (not in this PR)
createOrUpdatePlayerAccountcalls and eventually stop writingmledb.player_accountentirely.