Make Sprocket authoritative for franchise roster/staff reads (GH-728)#739
Draft
Make Sprocket authoritative for franchise roster/staff reads (GH-728)#739
Conversation
…728) - Add RosterAuthorityService to project mledb.player/team/captain into roster_slot and franchise staff/leadership appointments - Hook PlayerService MLE saves and post-commit intake to run sync - Prefer Sprocket data in FranchiseService.getPlayerFranchisesByUserId - Document source of truth and legacy mirror removal checklist 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 a Sprocket-first read path for franchise roster slots, staff/captain roles, and documents the temporary MLE legacy mirror for issue #728.
What changed
RosterAuthorityService(core/src/franchise/roster-authority.service.ts): After MLEplayerchanges, projects state intosprocket.roster_slot(viamledb_bridge.team_to_franchise+league_to_skill_group+ MLErolecodes) and intofranchise_staff_appointment/franchise_leadership_appointment(from MLEteamstaff columns,team_to_captain, and PR support when a matchingfranchise_staff_rolenamedPR Supportexists).PlayerService: Runs sync after MLE player saves (and afterupdatePlayer/intakeUsercommits so the bridge row exists).FranchiseService.getPlayerFranchisesByUserId: Uses Sprocket appointments + roster slots when present; otherwise falls back to the previous MLE-only implementation (cold start / missing seed data).reports/issue-728-sprocket-roster-authority.md: States source of truth, legacy mirror, and removal checklist.Suspension
getLeagueSuspendedFromMleis added for callers that needmledb.player.suspendeduntil a first-class Sprocket field exists (not wired into GraphQL in this PR).Proof
npm run build --workspace=core(passes).Follow-ups (not in this PR)
suspended.