You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(persistence): loadOrCreate swallows fetch failures — completed-game re-view can show a virgin 0:00 snapshot #830
SavedGameStore.loadOrCreate (Packages/PersistenceKit/Sources/Persistence/Live/SavedGameStore.swift:101-137) swallows any gateway.fetch failure into "treat as no existing record" — it cannot distinguish confirmed-no-record from fetch-failed, existence unknown. Callers that use it to re-open a completed game (Sudoku's completed-card re-view, and since #826 the past-day strip taps) therefore render a virgin snapshot — .completion(elapsedSeconds: 0, mistakeCount: 0), i.e. "0:00, 0 mistakes" — for a legitimately-completed game whose record simply failed to fetch (transient CK error, cold cache).
Make loadOrCreate (or a sibling loadIfExists) surface the tri-state: record / no-record / fetch-failed. Completed-game re-open callers should treat fetch-failed like the thrown path (fall back to .board or show a transient error), never a virgin snapshot. Audit other loadOrCreate callers for whether swallow-to-create is actually the semantics they want (for RESUME it probably is; for re-view it isn't).
Acceptance sketch
A gated/failing gateway fetch on a completed-game re-open never shows 0:00/0-mistakes; it falls back per the thrown-path contract
Resume-path behavior unchanged
Deterministic test at the store level for the tri-state
Surfaced by the #826 adversarial code review (2026-07-16).
Activity
feat(daily-hub): tap a past completed week-strip dot to review that d…
wei18 commentedon Jul 16, 2026
🔒 Claiming — session 064a54f6 (Leader) dispatching implementation. Direction: tri-state at the store level (record / confirmed-no-record / fetch-failed); completed-game re-view callers treat fetch-failed like the thrown path (#379 .board fallback), resume-path semantics unchanged.
fix(persistence): add loadIfExists so completed-game re-view can't sw…
fix(persistence): loud-throw default closes loadIfExists inheritance …