Skip to content

[#903] Make leaderboard ordering and cursor pagination deterministic - #914

Merged
greatest0fallt1me merged 1 commit into
Predictify-org:mainfrom
mikewheeleer:codex/issue-903-predictify-ranking
Aug 27, 2026
Merged

[#903] Make leaderboard ordering and cursor pagination deterministic#914
greatest0fallt1me merged 1 commit into
Predictify-org:mainfrom
mikewheeleer:codex/issue-903-predictify-ranking

Conversation

@mikewheeleer

Copy link
Copy Markdown
Contributor

Summary

  • use user_id as the final tie-breaker when assigning leaderboard ranks and when reading ranked rows
  • validate decoded cursor ranks before constructing a keyset predicate
  • preserve the look-ahead row in the cached first page so cache hits retain nextCursor
  • document the materialized-view snapshot behavior for refreshes

Acceptance criteria

  • Equal scores receive deterministic rank ordering
  • Leaderboard reads use the same deterministic (rank, user_id) order
  • Cursor inputs with invalid ranking keys fail safely
  • Cached first pages continue pagination instead of silently truncating the traversal
  • Existing offset callers remain supported

Validation

  • git diff --check passed
  • Runtime test execution was not available in the isolated worktree because dependencies are not installed

Closes #903

@greatest0fallt1me
greatest0fallt1me merged commit 17347e5 into Predictify-org:main Aug 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GrantFox][Medium] Make leaderboard pagination and ranking deterministic

2 participants