Skip to content

feat(asc-register): add minesweeper remove ads to multi-app iap config (ms phase 2) - #258

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

wei18 merged 1 commit into
mainfrom
feat/ms-iap-config-phase2

Conversation

@wei18

@wei18 wei18 commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Summary

Phase 2 of Minesweeper monetization wire. Extends ASCRegister's IAP config + xcstrings so user can later run `ASCRegister iap plan|apply --app-id ` to push MS Remove Ads metadata to ASC, mirroring the Sudoku flow shipped 2026-06-02.

Multi-app design

  • `Config.iaps` ships 2 entries (Sudoku + Minesweeper). Single config list, runtime `--app-id` is the discriminator.
  • Entries not found on the targeted ASC app silently no-op (existing reconciler behavior).
  • `IAPProduct.shortId` extended to handle MS namespace:
    • Sudoku → `remove_ads` (legacy short prefix preserved)
    • MS → `minesweeper.remove_ads` (spec'd namespaced shape)
    • Unknown vendor → returns productId verbatim (gap surfaces via missed xcstrings lookup)

Strings

  • `Minesweeper/Resources/Localizable.xcstrings` populated with 2 keys × 7 locales (en + zh-Hant filled; rest `` placeholders).
  • Copy mirrors Sudoku's shipped version — under Apple's 55-char description cap (verified per project memory).

Test plan

  • 55/55 ASCRegister tests pass (+2 new ConfigConsistencyTests assertions)
  • `ASCRegister validate --xcstrings ` exit 0 (cross-app "MISSING" warnings are informational per multi-app catalog design)
  • swift build clean
  • User (later): live `iap plan --app-id ` against ASC

Out of scope

  • Phase 1.b pricing
  • Phase 3 MinesweeperAppComposition.Live wire (dispatching next)

Refs

  • meetings/2026-06-02_minesweeper-monetization-wire-proposal.md §Phase 2
  • meetings/2026-06-03_ms-monetization-phase2.impl-notes.md

…g (ms phase 2)

Phase 2 of MS monetization wire (per
meetings/2026-06-02_minesweeper-monetization-wire-proposal.md). Extends
ASCRegister's IAP config + xcstrings so user can later run
`ASCRegister iap plan|apply --app-id <MS-app-id>` to push MS Remove
Ads metadata to ASC, mirroring the Sudoku flow shipped 2026-06-02.

Code:
- Config.iaps now ships 2 entries (Sudoku + Minesweeper). One Config
  list, runtime --app-id discriminator; entries not found on the
  targeted ASC app silently no-op via existing reconciler path
- IAPProduct.shortId extended for multi-app namespace:
  - "com.wei18.sudoku.iap.<x>" → "<x>" (preserves shipped Sudoku
    xcstrings key shape: iap.remove_ads.name)
  - "com.wei18.<app>.iap.<x>" → "<app>.<x>" (MS yields
    iap.minesweeper.remove_ads.name)
  - Anything else → productId verbatim (surfaces gap via missed
    xcstrings lookup, not silent key corruption)
- Multi-app design rationale documented in Config MARK comment

Strings:
- Minesweeper/Resources/Localizable.xcstrings: 2 keys × 7 locales
  (en + zh-Hant filled; ja/zh-Hans/es/th/ko <TRANSLATE> placeholders)
- Copy mirrors Sudoku's polished shipped version:
  - "Remove Ads" / "移除廣告" (name)
  - "Remove all in-app ads forever. Family Sharing." (46 chars,
    under Apple's 55-char description cap per project memory
    asc-iap-field-limits.md)
  - "永久移除 App 內所有廣告。支援「家人共享」。"
- iap-strings.xcstrings.patch source kept in sync (subagent added
  MS section)

Tests:
- ConfigConsistencyTests: iap count 1→2, asserts both productIds +
  ordered allIAPProductIds, plus new iapShortIdNamespace test pins
  the shortId resolution contract for both apps
- 55/55 ASCRegister tests pass

NOT done (deferred):
- Live `iap plan/apply` against MS-app-id (user-owned next step;
  MS ASC app + IAP product already provisioned per audit U5)
- Phase 1.b pricing (separate phase per #200)
- Phase 3 MinesweeperAppComposition.Live wire (next dispatch)

Subagent stalled at verification phase (600s watchdog); Leader
applied diff verbatim from worktree + finished xcstrings catalog +
ConfigConsistencyTests update + verification.

Refs:
- meetings/2026-06-02_minesweeper-monetization-wire-proposal.md §Phase 2
- meetings/2026-06-03_ms-monetization-phase2.impl-notes.md
- closes #200 Phase 1.a for Minesweeper app surface

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@wei18
wei18 merged commit f6bc723 into main Jun 3, 2026
3 checks passed
@wei18
wei18 deleted the feat/ms-iap-config-phase2 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