Repository navigation
chore(monetization): delete the write-only ad-status cache left after #922 - #926
Merged
Merged
Conversation
…922 #757 wave-6 follow-on to #922. Removing AdMobBridge.currentBannerStatus() (#922) deleted the ONLY reader of an internal ad-status cache, leaving it write-only. This removes that dead tail: - LiveAdMobBridge: the status-only OSAllocatedUnfairLock<AdBannerStatus> + setCachedStatus + its 3 call sites (start/loadBanner success+failure). - FakeAdMobBridge: the cachedStatus field + setCachedStatus + its 2 call sites. Surgical: the deleted Live lock held ONLY the status; liveBanners / inFlightDelegates / per-load delegate locks are untouched. The Fake's state lock SURVIVES (only its cachedStatus sub-field removed — it still guards startError/loadError/nextHandle/callCounts/disposedHandles, all still read). Behavior-inert: LiveAdMobAdProvider tracks status via its own lastKnownStatus, never read the bridge cache. A test whose name referenced the deleted cache was renamed + its comment corrected (orphan cleanup). Per-symbol grep confirmed zero readers before deletion. Verified: AppMonetizationKit build clean + 120 tests pass; swiftlint --strict clean. Dual CR: APPROVE x2 (surgical scope confirmed on both bridges; one optional cosmetic on a merged comment block, left as coherent). Part of #757 Co-Authored-By: Claude Fable 5 <[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.
What
Removes the write-only ad-status cache orphaned when #922 deleted
currentBannerStatus()(its only reader):LiveAdMobBridge's status-onlyOSAllocatedUnfairLock<AdBannerStatus>+setCachedStatus+ 3 call sites, andFakeAdMobBridge.cachedStatus+setCachedStatus+ 2 call sites.Why
#757 wave-6 follow-on to #922 — dead-code tail flagged by that PR's CR.
Verification
statelock SURVIVES (guards other still-read fields, onlycachedStatusremoved);liveBanners/inFlightDelegatesuntouched.LiveAdMobAdProvideruses its ownlastKnownStatus, never read the bridge cache.swiftlint --strictclean.Part of #757
🤖 Generated with Claude Code