Repository navigation
fix(services): hide shadow scores from staff - #55
Merged
Merged
Conversation
Shadow models are not validated. The score endpoints return their rows to data_scientist and admin only (filtered in SQL before the history limit); staff gets canary and enforce. The data scientist role may now read scores. The session label model in snapshot_data is renamed so the OpenAPI schema no longer has two LabelOut components.
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.
Shadow models are unvalidated and must not influence staff decisions.
GET /api/v1/scores/players/{pseudonym}and/historyreturnshadowrows only todata_scientistandadmin(SQL filter, applied before the history limit);staffseescanaryandenforce. Job tokens stay refused. Roledata_scientistmay now read the endpoints.Also renames the session label model in
snapshot_datatoSessionLabelOutso the OpenAPI schema has a singleLabelOut(the UI no longer needs thecorvus_services__api__schemas__LabelOutalias; a test asserts no schema name contains__).Tests: authz tests for staff, viewer, data_scientist and admin on both endpoints; an integration-marked test for the new SQL (not run here). Docs: control-plane-api.md.