← All findingssource · memory/project_clv_settle_stranding.md
The settle cron only ever looks at today and yesterday —
internal/clvcron/cron.go builds dates := []{now, now-1d}. Anything not
settled inside ~48h is stranded permanently; nothing ever revisits it. Any
outage that spans two nights silently costs you those slates.
That window is why the 2026-08-21 slate survived the SDS outage (project-sds-pool-deadlock) with ~15h to spare, and why a 12,487-row backlog had accumulated back to 2026-05-25.
The stranding bug (fixed, grading-service 287ff73): bet_clv keys a bet
by player_id; the boxscore is keyed by name, and namesByID is built FROM
the boxscore. A player who did not dress has no box entry — and
system_lineedges rows carry an id with an EMPTY player_name. Both lookups
miss, so settle.go could not distinguish "player sat" from "identity unknown"
and fail-closed. Correct call, but permanent given the 2-day window. Fix adds an
SDS /{league}/player/{id} fallback: a resolvable id means the identity is
known, so absence from the box is a real DNP and settles as a void;
unresolvable still skips.
Backfill result (2026-08-22): POST /clv/settle?from=&to= (120-day cap)
over 2026-05-25→2026-08-12 cleared 11,445 rows — 282 win, 121 loss, 11,042 void.
Plus 162 on a 8/12 test run. 12,487 → 439 remaining. UpdateCLVSettlement has
AND settled_at IS NULL, so re-running is safe and never overwrites.
Worth doing: widen the settle lookback beyond 2 days, or add an unsettled-backlog alarm. Without one, the next multi-night gap strands silently again.