Add SQL player leaderboard snapshots and weekly-job checkpoints - #26
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Companion PRs: ClashKingInc/ClashKingTracking#30 and ClashKingInc/ClashKingAPI#66. Rollout order: migration 020 → Tracking initial population → API reader. All are non-draft; no merges or production operations performed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a769896ee
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -0,0 +1,38 @@ | |||
| -- +goose Up | |||
There was a problem hiding this comment.
Update the explicit migration inventory for 020
Adding this migration makes TestTimescaleMigrationsAreExplicitlyNumbered in database/migrations/war_archive_schema_test.go fail: its glob now finds 20 SQL files, while the unchanged want slice still ends at 019_unlimited_personal_bases.sql and requires equal lengths. Add 020_player_leaderboard_snapshots.sql to that inventory so the repository's required go test ./... validation can pass.
Useful? React with 👍 / 👎.
|
Base-storage correction added in 899b62f: forward migration 021 moves images and votes onto bases, preserving positions, voter identities, directions and timestamps. Downloads remain unchanged. The old base_images/base_votes tables are removed. IMPORTANT: unlike additive 020, 021 requires draining old base traffic and deploying paired API PR #66 before resuming it. See database/INLINE_BASE_STORAGE.md. Populated 018→021 upgrade, full disposable-database Go tests and harness tests passed. No production changes performed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 899b62f64b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| DROP TABLE public.base_images; | ||
| DROP TABLE public.base_votes; |
There was a problem hiding this comment.
Update the existing operational contract for inline base data
When migration 021 is applied, these tables no longer exist, but docs/final-operational-contract.md still directs API implementers to store and stage data through base_images and base_votes (including its first-click flow), and database/timescale/README.md still presents migration 019 as the latest contract. Update those established contract documents or clearly mark them as superseded; otherwise downstream work following them will issue queries against tables this migration drops.
Useful? React with 👍 / 👎.
Changes
Rollout
Apply 020, deploy the companion Tracking branch to populate both views, verify ispopulated, then deploy the companion API reader. No production changes or merges performed.
Validation
See database/PLAYER_LEADERBOARD_ROLLOUT.md for fields, examples, access requirements and rollback order.