Repository navigation
feat(v2.3): Part A — Persistence + AppComposition + RouteFactory wiring - #71
Merged
Merged
Conversation
v2.3.1 — MonetizationStateStore + CloudKit Private impl - NEW Persistence/MonetizationStateStore.swift (typealias to AdGateStateStore) - NEW Persistence/Live/LiveMonetizationStateStore.swift (actor; CloudKit Private record "MonetizationState" in userZone; first-launch seeding bootstraps firstLaunchAt → resolves audit B2) - LivePersistence: +monetizationStateStore() lazy factory - PrivateCKGateway: +monetizationStateRecordType constant - +8 tests (round-trip, seeding, nil-optionals, Codable, payload shape) v2.3.2 — AppComposition wiring - Package.swift: +AppMonetizationKit local dep on 4 sub-products - Project.swift: +package + 3 product links on App target - AppComposition: +3 monetization deps + routeFactory (9-arg init) - Live.swift: wires LiveMonetizationStateStore → AdGate → LiveAdMobAdProvider + LiveStoreKit2IAPClient + LiveRouteFactory - Preview.swift: Fake* harness for previews/tests - SudokuApp.swift: RootView call shrunk to 2 args - CompositionTests: +2 tests (monetization deps + routeFactory wired) v2.3.3 — RouteFactory promotion - NEW SudokuUI/Navigation/RouteFactory.swift (protocol + LiveRouteFactory) - RootView.init: 5 args → 2 args (viewModel + routeFactory) - +6 RouteFactoryTests (one per AppRoute case) - RootViewTests: signature update + makeTestRouteFactory() helper Plus PrivacyManifestTests updated for v2 manifest state (post #62): - Renamed noThirdPartyTrackingDomains → adMobTrackingDeclared - Assert tracking=true, 8+ domains, OtherUsageData/ThirdPartyAdvertising, UserDefaults API with reason CA92.1 Verification: - swift build: clean (0 warnings on touched files) - swift test --filter RouteFactory|MonetizationStateStore|Composition|Privacy: 26/26 pass Meeting logs: - meetings/2026-05-21_v2.3-part-a-wiring.impl-notes.md (Part A delivery) - meetings/2026-05-21_spec-drift-audit.impl-notes.md (Yellow, 2 S1) - meetings/2026-05-21_appmonetizationkit-code-audit.impl-notes.md (Yellow, B1 only — B2 resolved by this PR) - meetings/2026-05-21_app-icon-brand-audit.impl-notes.md (Yellow, 3 S1) - meetings/2026-05-21_wave-3-issues-filed.impl-notes.md (#64–#69 filed) Co-Authored-By: Claude Opus 4.7 <[email protected]>
This was referenced May 21, 2026
wei18
added a commit
that referenced
this pull request
May 22, 2026
Address all 5 Medium + 6 Nit findings from 2026-05-21 Code Reviewer audit (B1 + B2 already merged in #73 + #71). Code Reviewer approved 2026-05-22 after one revision (test fix for M5 false-positive). M1 — design ↔ code reconciliation - docs/v2/design.md §How.3 removed misleading lastShownDate gating rule; clarified lastShownDate is recorded for telemetry only (matches code) M2 — onPersistenceError closure - AdGate.init(store:calendar:onPersistenceError:) — new optional closure parameter; MonetizationCore stays Telemetry-free, host wires the route - Live wiring in SudokuKit/AppComposition/Live.swift fan-outs to Telemetry - AdGate.mutate(_:) catch now invokes the closure (was a comment) - Test: saveFailureSurfacesViaOnPersistenceError M3 — empty displayPrice + catalog-desync telemetry - LiveStoreKit2IAPClient: empty fallback now "—" (em-dash placeholder) - New optional onCatalogDesync closure → Telemetry.errorOccurred M4 — timezone-shift test - AdGateLogicTests.dismissedTodayAcrossDateLineCrossing M5 — system-clock-manipulation defense - AdGateState.lastSeenWallClock: Date? (new optional field) - AdGate.clockTamperTolerance = 24h - shouldShowBanner refuses grace if now < lastSeen - tolerance - Monotonic advance on show/dismiss/purchase paths - LiveMonetizationStateStore CloudKit field add-via-write - Tests: clockMovedBackwardsRefusesGraceAdvance (firstLaunch 2024-01-01), clockToleranceWithin24hStillShows (verified by flip-guard technique per Code Reviewer reject + revision) N1 — AdPresentationAnchor narrowed AnyHashable → UUID; drop @unchecked N2 — actor-vs-class re-eval deferred to post-v2.3.5 (noted) N3 — AdPresentationAnchor resolver split into separate file (Foundation- only type vs UIKit/AppKit resolvers); enables future Linux exclude N4 — LiveStoreKitBridge.transactionUpdates priority .background → .utility N5 — FakeIAPClient single-consumer constraint — diagnostic tracking (purchaseUpdatesWasSubscribed) instead of crashing tests N6 — ProtocolShapeTests.valueTypesRemainSendable compile-time Sendable coverage on AdGateState, IAPProduct, IAPPurchaseEvent variants, IAPPurchaseResult, AdBannerStatus, AdPresentationAnchor Public surface stable: only optional init params + optional struct field + resolver file split. No SemVer-breaking additions. Verification: - AppMonetizationKit: 87/87 tests (was 82, +5) - SudokuKit affected suites: 28/28 (HomeViewBanner saveCount assertion relaxed from == 1 → >= 1 per new wall-clock advance semantics) - swift build clean both packages - Isolation audit: 1 GoogleMobileAds import (LiveAdMobBridge.swift) §未決 (impl-notes) - M5 wall-clock advance writes on every shouldShowBanner — acceptable for v2; throttle in v2.x if CloudKit quota matters - N5 Fake vs Live multi-subscriber semantics differ (diagnostic-only) - AdPresentationAnchorRegistry still v2.2 backlog Co-authored-by: Claude Opus 4.7 <[email protected]>
2 tasks
wei18
added a commit
that referenced
this pull request
May 26, 2026
…entries (#155) Two new foundations §Backlog entries from 2026-05-26 user discussion: (A) Expand ViewModel interaction tests (no new dep): - Real gap: snapshot covers state, but tap → navigate / tap → mutate uncovered systematically - Reuse existing RouteFactory protocol (PR #71) + swift-testing protocol-injected fakes - FakeRouteFactory ~15 LOC + per-VM ~30-60 LOC tests - Trigger: navigation regressions / new View without interaction test (B) Mockable framework evaluation (trigger-based, break-glass): - Replace hand-rolled fakes with @mockable macro - Third-party SDK — requires foundations §9 break-glass justification - Trigger: 5+ large fakes / 3+ boilerplate review nits / SwiftUI preview unification - Other applications documented: SwiftUI #Preview injection, record/replay capture mode, runtime mode switch, team naming convention Closes the user's 2026-05-26 backlog framing question about UI interaction test gap + Mockable evaluation. Co-authored-by: Claude Opus 4.7 <[email protected]>
wei18
added a commit
that referenced
this pull request
Sep 11, 2026
#1067) Brings in the catalog-wide skill audit (PR #69), the phase-2 description rewrites (#70, #71), and the three-review follow-ups (#72): 136 verified corrections, iOS 26 / macOS 26 baseline, app-icon-rasterize retired (27 → 26 Apple skills), Swift 6.2 MainActor default, and a SKILL.md format gate. Pointer-only, matching the previous bumps. Co-authored-by: Claude Fable 5.1 <[email protected]>
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.
Summary
v2.3 Part A lands the wiring of AppMonetizationKit (v2.0–v2.2) into the Sudoku App's composition root. Three sub-steps in one PR:
MonetizationStateStore: CloudKit Private recordMonetizationStateinuserZone, actor-based, with first-launch seeding offirstLaunchAt.AppComposition: +3 monetization deps +routeFactory(9-arg init); App SwiftUI target now depends onMonetizationCore,IAPStoreKit2,AdsAdMob,MonetizationTesting.RouteFactorypromotion: extracted from Wave 3 audit M4 —RootView.initshrinks from 5 → 2 args; navigation seam is now testable.Plus
PrivacyManifestTestsupdated for v2 manifest state (post #62) — assertions now lock in AdMob tracking declaration.Audit B2 resolved by this PR
The Code Reviewer audit (Yellow) flagged
firstLaunchAtwas never bootstrapped — the 7-day grace clock would never start.LiveMonetizationStateStore.loadState()lines 78–82 now synthesize + persistfirstLaunchAt = clock()on first miss. Audit Blocker B2: CLOSED.Test verification
swift build: cleanswift test --filter "RouteFactory|MonetizationStateStore|Composition|Privacy": 26/26 passswift test --parallel: hit a pre-existing hang in non-Part-A snapshot test (separate issue — to be triaged post-merge); Part A's contributions are all green.Audit reports landed in
meetings/All to be addressed in follow-up PRs per Leader plan.
Follow-ups (queued)
Test plan
tuist generate; verify RootView preview rendersMonetizationStaterecord created withfirstLaunchAtfirstLaunchAtis stable (not overwritten)🤖 Generated with Claude Code