Skip to content

chore(monetization): delete the never-wired AdPresentationAnchor subsystem + orphan currentBannerStatus - #923

Merged
wei18 merged 1 commit into
mainfrom
chore/922-delete-adpresentationanchor-deadcode
Jul 21, 2026
Merged

wei18 merged 1 commit into
mainfrom
chore/922-delete-adpresentationanchor-deadcode

Conversation

@wei18

@wei18 wei18 commented Jul 21, 2026

Copy link
Copy Markdown
Owner

What

Deletes the never-wired AdPresentationAnchor window-anchoring subsystem (3 source files + its test) and the orphan AdMobBridge.currentBannerStatus() protocol requirement. Net −255 lines. Also converges MinesweeperApp's @main shell to SudokuApp's explicit-composition-type style.

Why

#757 wave-6 triage. The anchor subsystem had zero production call sites — AdsAdMob resolves the presentation VC directly via LiveAdMobBridge.resolveRootViewController(). currentBannerStatus() had zero consumers (LiveAdMobAdProvider uses its own lastKnownStatus). Speculative infra that shipped unwired.

Verification

  • Per-symbol grep confirmed zero production call sites before deletion; post-delete repo-wide grep is clean.
  • AppMonetizationKit build clean + 120 tests pass; swiftlint --strict 0 violations.
  • Behavior-inert: the live banner load/present path (resolveRootViewController) is untouched.
  • Dual CR: APPROVE-with-cosmetic (one indent glitch, fixed) + APPROVE.

Known tail (per CR, leave-with-follow-up): removing currentBannerStatus() leaves LiveAdMobBridge.state / FakeAdMobBridge.cachedStatus + their setCachedStatus writers write-only — a smaller dead-code tail for a future #757 wave.

Closes #922

🤖 Generated with Claude Code

…ystem + orphan currentBannerStatus

#757 wave-6. The AdPresentationAnchor window-anchoring layer had no
production call site — the AdsAdMob adapter resolves the presentation VC
directly via LiveAdMobBridge.resolveRootViewController() and never registered
or resolved an anchor (the +Resolve helpers and the registry were never even
reconciled — different lookup shapes — because neither was exercised). And
AdMobBridge.currentBannerStatus() was a protocol requirement with zero
consumers (LiveAdMobAdProvider tracks its own lastKnownStatus).

Deleted whole: AdPresentationAnchor.swift, AdPresentationAnchor+Resolve.swift,
AdPresentationAnchorRegistry.swift, and AdPresentationAnchorRegistryTests.swift
(existed only to exercise the dead code). Removed currentBannerStatus() from
the AdMobBridge protocol + both conformers + its ProtocolShapeTests assertion.
Net -255 lines. Also converged MinesweeperApp's @main shell to SudokuApp's
explicit-composition-type style (mirror nit).

Per-symbol grep confirmed zero production call sites before deletion; a
post-delete repo-wide grep is clean. Behavior-inert — the live banner
load/present path (resolveRootViewController) is untouched.

Known tail (leave-with-follow-up, per CR): removing currentBannerStatus()
leaves LiveAdMobBridge.state / FakeAdMobBridge.cachedStatus + their
setCachedStatus writers write-only — a smaller dead-code tail a future #757
wave can pick off.

Verified: AppMonetizationKit build clean + 120 tests pass; swiftlint --strict
0 violations. Dual CR: APPROVE-with-cosmetic (indent glitch, fixed) + APPROVE.

Closes #922

Co-Authored-By: Claude Fable 5 <[email protected]>
@wei18
wei18 enabled auto-merge (squash) July 21, 2026 05:22
@wei18
wei18 merged commit 8fa0e4e into main Jul 21, 2026
5 checks passed
@wei18
wei18 deleted the chore/922-delete-adpresentationanchor-deadcode branch July 21, 2026 05:22
@wei18 wei18 mentioned this pull request Jul 21, 2026
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.

chore(monetization): delete the never-wired AdPresentationAnchor subsystem + orphan AdMobBridge.currentBannerStatus

1 participant