Repository navigation
feat(gaming): review queue for imported games - #287
Merged
Merged
Conversation
okapitula
requested review from
damianrzepka,
jakubfilinger-b,
klaudia-blazyczek-blurify,
marek-chmielowski-blurify,
mp-blurify and
zaxovaiko
as code owners
October 8, 2026 20:06
Games a catalogue sync imports wait as pending until an admin approves them, unless their provider auto-approves new games. Adds the review status and a check that keeps unapproved games inactive, single and bulk approve/decline routes, a review-status filter on the admin game list, pending counts per provider and in the catalogue stats, an ids filter on the admin provider list, and audited review events.
zaxovaiko
force-pushed
the
feat/game-review-queue
branch
from
October 9, 2026 17:37
0f3dbab to
a171f00
Compare
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
Games a catalogue sync imports now wait in a review queue until an admin approves them, unless their provider is trusted to auto-approve new games. Admins get a queue filter, single and bulk approve/decline, pending counts per provider and in the catalogue stats, and the admin provider list can be loaded for a set of provider ids in one request.
Why
An aggregator sync can add hundreds of games at once, and until now a synced game could go live with nobody having looked at it. The gate has to live in core because the lobby, the bulk set-active paths and the provider admin all sit here: a
game.review_statuscolumn with a database check (is_activeimplies approved or auto-approved) is the only place that stops an unreviewed game going live through every path. A consumer could not add that without forking core's tables. The state is aggregator-agnostic, so any importer uses it the same way.What changes:
game.review_status(pending,auto_approved,approved,declined) andreviewed_at;game_provider.auto_approve_new_games, off by default.POST /backoffice/gaming/games/{id}/reviewandPOST /backoffice/gaming/games/bulk/review(by game ids or provider ids, capped at 5,000 matched games). Approving also enables the game in the same transaction; declining writes only the review columns. Provider scope moves available pending games only.reviewSkippedCount.autoApproveNewGames.reviewStatuses; provider detail and list carrypendingReviewCount; the provider list takes an optionalidsfilter; catalogue stats carrygames.pendingReviewandproviders.autoApprove.gaming.games.reviewedandgaming.games.auto_approved, both written to the audit log.initialGameReviewState(autoApprove, now)gives an importer the review columns for a new game.Alternatives considered
reviewed_bycolumn: the audit record already holds the actor, so it would duplicate it.Risks
approved, then switch new rows topending, add a check that keeps unapproved games inactive, and add two indexes. 0015 holds a lock ongamethrough its check scan and partial index build, and 0017 blocks writes togamewhile it builds the second index; both windows grow with catalogue size.gaming.provider.*snapshots gainautoApproveNewGames; older events replay it asfalse.initialGameReviewState(...), read the provider's auto-approve flag in the insert transaction, callnotifyGamesCreatedafter commit, and emitgaming.games.auto_approvedonce when they put an auto-approved game live.