Skip to main content
← Back to list
01Issue
FeatureShippedSwamp Club
Assigneeskeeb

Relationships

↔ sibling #978

#1058 Serve leaderboard locate ('find yourself') live, retiring its per-replica standings cache

Opened by keeb · 7/9/2026· Shipped 7/10/2026

Follow-up from #1055 (retiring the per-pod leaderboard snapshot).

Context

#1055 made the four leaderboard boards serve live per request from the score_daily rollup — no per-pod snapshot, instant freshness on every pod, an asOf pin for pagination consistency. But routes/api/v1/leaderboard/locate.ts (the 'find yourself' neighborhoods) still keeps its OWN per-replica standings cache (getCachedStandings, 30s TTL) for the window boards.

Problem

So the 'see it everywhere immediately, on every pod' goal is only partially delivered: the board is live, but locate/'find yourself' still serves from a per-replica time-bounded cache — the same per-pod divergence + up-to-30s staleness class this epic is retiring for boards.

Proposed

Give locate the same live + asOf treatment as the boards: read the window standings live per request (bounded by the same asOf the board uses so a located neighborhood is consistent with the board the user is viewing), and drop the per-replica getCachedStandings cache. Verify the window-standings read stays cheap enough per request (same score_daily rollup cost profile as the boards).

Surfaced as finding ADV-5 during the #1055 adversarial review; filed to keep #1055 scoped to the boards.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 4 MOREPR_MERGED+ 1 MORENOTIFICATION_SKIPPED

Shipped

7/10/2026, 6:09:02 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
keeb assigned keeb7/10/2026, 4:12:04 AM
keeb linked related to #9787/10/2026, 4:41:03 AM
Editable. Press Enter to edit.

keeb commented 7/10/2026, 4:41:02 AM

Absorbing #978 (leaderboard search excludes ghosts) into this work.

It is the same code path this issue reworks: findScoreTarget() and board()'s SEARCH filter both append is_ghost = 0 and match owner ILIKE against the raw distinct_id, so a ghost visible on the board (alias like 👻 murk-wisp-9dc54f2a, clickable /ghost/<slug>) returns zero search results and locate cannot jump to it.

Rather than two conflicting rewrites of findScoreTarget, this change also switches ghost search/locate to match against the ghost slug (ghostSlug()/buildAliasIndex(), already in clickhouse-score-reads.ts) — keeping the query off the raw distinct_id. #978 closed as resolved-under this issue; its fix ships in this PR.

Sign in to post a ripple.