Repository navigation
feat(minesweeper): wire saved-game resume — save hooks, .resumeBoard loader, fetchResume (#455 step 4) - #465
Merged
Merged
Conversation
…loader, fetchResume (#455 step 4) Lights the MS Home resume pill end-to-end: - PersistenceKit: public PrivateCKGatewayFactory (LivePrivateCKGateway stays internal). LAZY by contract — defers CKContainer.default() to first op; the app-shape tests construct .live() in a runner with no CloudKit entitlement, where eager resolution raises an uncatchable ObjC CKException (found by the test run, fixed via a deferring proxy actor — mirrors LivePersistence's own per-op gateway). - Store: stale-daily filter in latestInProgress (daily-<day> recordName vs today UTC; Sudoku #228 class) + .gameSaved/.gameSaveFailed telemetry funnel (mirrors Sudoku's store) - VM: optional store/recordName seam + persistCurrentState() — save points: pause, terminal reveal (upsert → wireStatus completed clears the pill), scenePhase .background + onDisappear (BoardView). Idle boards never save; failures funnel, never interrupt gameplay - AppRoute.resumeBoard(recordName:mode:) + MinesweeperBoardLoaderView (mirrors Sudoku's BoardLoaderView): loadInProgress → MinesweeperSession.restore → board mounts paused (elapsed frozen); missing/newer-schema/corrupt records land in an honest failed state + Retry - recordName fixed at board creation (daily == MinesweeperDaily.puzzleId for today; practice singleton slot) via a UI-layer GameMode helper - Composition: savedGameStore over the factory; fetchResume (Live+Resume.swift — Live.swift is at the file_length budget) maps summary → ResumeCandidate; route factory threads store into boards + mounts the loader Tests: MS 141 (was 136; +4 persist-hooks +1 stale-daily), PersistenceKit 58, SudokuKit 220, MSCore 87 — green; no snapshot PNG changes. Follow-up: 'Couldn't load saved game.' needs the next L10n pass (Retry already in the MS catalog); resume-pill title strings keep the pre-#460 literal-interpolation behavior. Co-Authored-By: Claude Fable 5 <[email protected]>
The step-4 wiring (+store build, +2 args) tipped Live.swift to 404; strict CI treats the 400-line file_length warning as an error. Condensed 4 comment blocks — no factual loss; Live+Resume.swift already carries the resume rationale. Co-Authored-By: Claude Fable 5 <[email protected]>
Closed
… doc sweeps, contract tests Code Reviewer (APPROVE-WITH-NITS): - Retry rebuilt the VM without errorReporter/store/recordName → save hooks silently died post-Retry (same class as the #330 soundPlayer omission). Seams now internal-readable on the VM and re-threaded in onRetry — a retried board keeps saving to its original slot. - doc sweeps: RootViewModel header (resume is ON via Live+Resume.swift), store header (constructed + conflict policy decided + schema deployed), VM scope line, filter >= wording - +2 tests: save-failure funnels (FakePrivateCKGateway.alwaysOnSave + FakeErrorReporter; gameplay state intact) and the GameModeRaw == GameMode.rawValue string contract Deferred (CR nit, narrow + self-healing): daily .board recordName derives 'today' at view-build while the seed was baked at hub render — a hub left open across UTC midnight can file yesterday's board under today's slot. Airtight fix = carry the day in the route; noted for a future route-payload change. MinesweeperKit 143 (was 141). Co-Authored-By: Claude Fable 5 <[email protected]>
…ntifier_name) Co-Authored-By: Claude Fable 5 <[email protected]>
This was referenced Jun 11, 2026
wei18
added a commit
that referenced
this pull request
Jun 11, 2026
…o CLAUDE.md (#466) (#467) * chore: #466 hygiene — wire AchievementID SSOT, README 16 packages, spec as-built, zh-Hant naming - AchievementEvaluator now consumes the AchievementID enum (the SSOT it documented but never honored — 8 raw literals replaced); GameCenterIdentifiers header re-scoped honestly (GameCenterClient = structural; ASCRegister = deliberate runtime-reconciled copy, CLI must not depend on the cores) - README.md + README.zh-Hant.md architecture trees 14 → 16 (add DeterminismKit, GameAppKit) - resume-seam spec: MS section re-tagged as-built (#463/#465 landed same day; .resumeBoard supersedes the .board prediction) - skills index zh: file-count 6→'5 files + meetings/' (en fixed in #461; zh missed) + renamed README.zh-TW.md → README.zh-Hant.md to match repo-root convention Tests: GameCenterKit suite pending in CI; SudokuCoreKit 131, ASCRegisterKit 153 green locally. Co-Authored-By: Claude Fable 5 <[email protected]> * docs: add repo-root CLAUDE.md — distilled agent operating guide Operating knowledge distilled from the spec-first build sessions: the mirror principle (apps differ only in gameplay + resources, down to source), architecture layering in one map (zero-dep shell vs GameAppKit composition layer), the Leader/Developer/CR workflow contract (incl. subagent write-probe + model selection), build/verify discipline (absolute --package-path, stale-SourceKit rule, snapshot/determinism stops, unentitled-runner CloudKit laziness), user-owned hard gates (tf:upload, Console-only CK prod promote, secrets), and the conventions that bite (--no-gpg-sign, lowercase PR subject, strict-lint ceilings, .task arm64, worktree bleed). Pointer-first: deeper truth stays in skills / foundations / memory. Co-Authored-By: Claude Fable 5 <[email protected]> --------- Co-authored-by: Claude Fable 5 <[email protected]>
Closed
Closed
wei18
added a commit
that referenced
this pull request
Jun 24, 2026
) Upkeep #592 staleness sweep (Leader-verified against code): - SDD-004 RFC: status RFC_FINAL->IMPL_APPROVED (M1-M4 built, M5 parked #501); mark M3/M4 DONE; resolve bundle-id checklist contradiction - MS flow prototype: re-tag resume pill SHIPPED (#455 via #463/#465); best-time row corrected to OMITTED-BY-DESIGN (not 'not yet built' - MS stores no completed-game elapsed) - README + README.zh-Hant: add Game2048CoreKit/Game2048Kit to package tree - docs/README: add superpowers/specs to doc map - GameViewModel: stale 626->648 line count in file_length rationale Screenshots (#236) + .task footgun (#607) routed separately; README 3rd-game prose disclosure left to user. Co-authored-by: Claude Opus 4.8 <[email protected]>
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The last mile of #455 — the MS Home resume pill lights up.
Flow
start board → play → background/pause/dismiss →
persistCurrentState()→ relaunch →fetchResume(Live+Resume.swift) →ResumeCandidate→ pill → tap →.resumeBoard→MinesweeperBoardLoaderView→loadInProgress+MinesweeperSession.restore→ exact board, paused, elapsed frozen.Pieces
PrivateCKGatewayFactory(LivePrivateCKGatewaystays internal). Lazy by contract — eagerCKContainer.default()raised an uncatchable ObjCCKExceptionin the entitlement-less test runner (the MS shape tests construct.live()); the deferring proxy mirrorsLivePersistence's own per-op gateway..gameSaved/.gameSaveFailedfunnel.persistCurrentState()— pause / terminal reveal (completed → clears pill) / scenePhase background / onDisappear. Idle never saves; failures funnel.AppRoute.resumeBoard+MinesweeperBoardLoaderView(mirrors Sudoku'sBoardLoaderView): honest failed-state + Retry for missing / newer-schema / corrupt records.MinesweeperDaily.puzzleId(today); practice = singleton slot per difficulty.Tests
MS 141 (+5) · PersistenceKit 58 · SudokuKit 220 · MSCore 87 — green; no snapshot PNGs.
Follow-ups: one new L10n key ("Couldn't load saved game.") for the next translation pass; on-device verification (start→background→relaunch→resume) after merge. Refs #455.
🤖 Generated with Claude Code