store: break dashboard updated_at ties by id !555

merged merged by cmc on 2026-10-02 16:08 UTC · krz/gitbay:dashboard-order-tiebreak into main

Discussion

cmc
  • Dashboard queries (DashboardMRs, DashboardIssues, ReviewQueue both halves, AssignedIssues) order by updated_at DESC, id DESC.
  • Migration 0076 rebuilds issues_recent and merge_requests_recent as (updated_at DESC, id DESC); with the 0035 indexes id DESC falls back to a full-table sort.
  • TestDashboardQueriesUseIndexes rejects any temp B-tree, including a partial sort.
  • TestDashboardEqualUpdatedAtStableOrder: three issues/MRs with equal updated_at come back newest first; fails on main for all four lists.

Keyset-cursor lists key on unique columns and need no change.

Closes #320