Skip to main content
← Back to list
01Issue
BugOpenSwamp Club
AssigneesNone

Relationships

#1504 Ghost profile bypasses the score-read seam and 500s on a slow ledger

Opened by keeb · 8/2/2026

Split out of #1496. Also recorded at scoring/flipped.md:59-62, where it has been open since the read flip.

What

loadGhostProfile (lib/app/profile-score-reads.ts:253-306) calls reads.resolveGhostAlias and reads.dailyHistory directly, bypassing withScoreReadFallback entirely. So /ghost/<slug> is the one score surface with no breaker participation and no degraded rendering: a struggling ledger gives it a generic 500 after a full deadline, where every other consumer degrades to a blank standing.

Wanted (per flipped.md): breaker participation, so a repeat failure fails in ~25ms instead of re-paying the timeout, plus a deliberate "history temporarily unavailable" state.

Why frame-first does not apply

#1496 fixed the leaderboard by rendering the frame and filling the data in. That does not transfer here: on a ghost page the score history is the page. There is no frame worth shipping without it — a skeleton with nothing behind it is just a 500 with better manners.

So this needs its own answer. Options worth weighing:

  • Route the two reads through withScoreReadFallback (score-class breaker) and render a real unavailable state. Cheapest, closes the 500.
  • Treat a ghost page as cacheable — ghosts are unclaimed and their history changes slowly, so a short server-side cache would make the common path immune to ledger health.

Constraints

  • Ghosts exist only in the ClickHouse ledger; there is no Mongo fallback and there must not be one (a divergent number is worse than none).
  • The raw distinct_id must stay inside loadGhostProfile — the page gets only the alias.
  • resolveGhostAlias refresh already pulls all ghost ids per 60s cache refresh; right shape to ~1M ghosts, past that it wants a persisted slug column (also noted in flipped.md).
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED

Open

8/2/2026, 7:35:15 PM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.