Skip to content

feat(persistence): add privateckconfig.minesweeper static — distinct zone/subscription namespace - #257

Merged
wei18 merged 1 commit into
mainfrom
feat/ms-private-ck-config
Jun 3, 2026
Merged

wei18 merged 1 commit into
mainfrom
feat/ms-private-ck-config

Conversation

@wei18

@wei18 wei18 commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Summary

Mini-PR prereq for MS monetization wire Phase 3. Adds `PrivateCKConfig.minesweeper` mirroring `.sudoku` shape with distinct zone + subscription identifiers per Minesweeper's separate iCloud container.

Diff

  • `PrivateCKConfig.minesweeper`: zone=`com.wei18.minesweeper.userZone`, sub=`com.wei18.minesweeper.userZone.changes`
  • New sentinel test confirms distinct namespace vs `.sudoku`

Test plan

  • swift test --filter ZoneProvisioning — 4/4 pass
  • swift build clean both PersistenceKit + SudokuKit
  • CKContainer name encoded in Minesweeper App target entitlements (provisioned 2026-06-02 audit U4)

Refs

  • meetings/2026-06-02_minesweeper-monetization-wire-proposal.md §Phase 3 prerequisite
  • meetings/2026-06-03_ms-persistence-config.impl-notes.md

…zone/subscription namespace

Mini-PR ahead of MS monetization wire Phase 3 (per
meetings/2026-06-02_minesweeper-monetization-wire-proposal.md §Phase 3
prerequisite). PR #219's per-app injection pattern for `PrivateCKConfig`
already supported this; now adds the Minesweeper counterpart.

- `PrivateCKConfig.minesweeper`:
  - `zoneName: "com.wei18.minesweeper.userZone"`
  - `subscriptionID: "com.wei18.minesweeper.userZone.changes"`
- CKContainer itself (`iCloud.com.wei18.minesweeper`) resolved by
  `CKContainer.default()` from the Minesweeper App target's
  entitlements — not encoded in PersistenceKit
- Sentinel test `minesweeperConfigUsesDistinctNamespace` confirms
  zone+subscription IDs are distinct from `.sudoku`

User has already provisioned the MS CK container on Apple Developer
portal + bound to the MS App ID (audit U4, 2026-06-02). MS production
schema deploy is a separate user task post-Phase-3 ship.

Subagent stalled at verification phase; Leader applied + verified
(4/4 PersistenceTests pass).

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@wei18
wei18 merged commit 94ccb36 into main Jun 3, 2026
3 checks passed
@wei18
wei18 deleted the feat/ms-private-ck-config branch June 3, 2026 02:59
wei18 added a commit that referenced this pull request Jun 3, 2026
…ings (ms phase 3) (#259)

Closes Phase 3 of MS monetization wire (per
meetings/2026-06-02_minesweeper-monetization-wire-proposal.md). MS
app now has full monetization composition modulo banner UI (deferred
to U15 follow-up). Mirrors Sudoku's wire shape per
feedback/minesweeper-mirrors-sudoku.

Code:
- MinesweeperAppComposition bag extended with persistence / iapClient /
  adProvider / adGate / monetizationStateStore / monetizationController /
  toastController
- Live.swift `.live()` wires:
    * LivePersistence(ckConfig: .minesweeper)
    * LiveStoreKit2IAPClient(knownProductIds: [minesweeperRemoveAdsProductId])
    * NoopAdProvider  (LiveAdMobBridge deferred to U15)
    * AdGate + MonetizationStateController(productId: ..., ...)
    * ToastController
- `.preview()` mirrors with MonetizationTesting fakes (matches Sudoku
  precedent of linking MonetizationTesting into production target)
- LiveRouteFactory threads monetizationController to the Settings route
- SettingsView mounts Section("Purchases") with shared MonetizationUI
  rows (RemoveAdsRow / RestorePurchasesRow / AdsRemovedRow)
- minesweeperRemoveAdsProductId published at module level for parity
  with removeAdsProductId in MonetizationUI

MonetizationStateController parameterization (CR-recommended option a):
- Added `productId: String = removeAdsProductId` default param
- 4 internal direct-ref to constant swapped to self.productId
- All 4 Sudoku test sites + Sudoku Live.swift + Preview.swift compile
  byte-identically (no arg = picks up defaulted Sudoku constant)
- Docstring updated to reflect MS Phase 3 landing

Tests:
- MinesweeperKit: 30/30 pass (+ extended AppCompositionTests + new
  MinesweeperSettingsViewTests)
- SudokuKit: 209/209 pass — Sudoku byte-identicality verified by CR

CR ACCEPT (round 1). Cosmetic C3 (docstring tense) applied inline.
Open follow-ups deferred to backlog:
- Toast overlay on MinesweeperRoot (CR Important #1 — defer per CR
  recommendation; MS has no live monetization surface until U15)
- FakePersistence target for MS Preview (CR Important #2)
- Hardened MS productId test (CR Important #3)

Refs:
- meetings/2026-06-02_minesweeper-monetization-wire-proposal.md §Phase 3
- meetings/2026-06-03_ms-monetization-phase3.impl-notes.md
- prereqs: #257 (.minesweeper config), #258 (multi-app iap config)
- closes mirror-monetization-loop (modulo banner U15)

Co-authored-by: Claude Opus 4.7 <[email protected]>
wei18 added a commit that referenced this pull request Jun 3, 2026
…et injection

Captures 5 PRs merged today (#256 grace inversion / #257 .minesweeper CK
config / #258 multi-app IAP / #259 MS AppComposition wire / #263 U15
LiveAdMobAdProvider + banner + toast / #264 prod-ID comment scrub /
#265 AdMob secret injection PR1) plus 5 issues filed for follow-up
(#260 #261 #262 #266 #267).

Records decisions, rejected alternatives, Architect review hand-off,
and the spec inversion (7-day grace removed). Notes Iron Law violation
on skill writing + remediation via post-hoc CR.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant