Repository navigation
chore(ads): set AdGate.gracePeriodDays = 0 for TestFlight/dogfood visibility (release-blocker #212) - #213
Merged
Conversation
…ibility Temporarily zero out the 7-day onboarding grace so banner placement can be verified on TestFlight / Mac dogfood builds without waiting a week per device install. Refactored the literal `7 * 86_400` into a named static constant `AdGate.gracePeriodDays` so the revert is a single-line change. The four AdGateLogicTests that assert the 7-day boundary (`day0SuppressesDuringGrace`, `day6StillInGrace`, `day7BoundaryReleasesGrace`, `justBeforeDay7BoundaryStillInGrace`) are `.disabled(...)`-traited with a pointer to issue #212. Their bodies stay intact — re-enable by removing the `.disabled(...)` trait, no other change needed. **This MUST be reverted before the v2.5 App Store submission.** Tracking: issue #212 (release-blocker label). `docs/v2/design.md` rule #6 documents the 7-day grace as a product commitment; this PR ships a deviation from spec gated on a clear restore path. Co-Authored-By: Claude Opus 4.7 <[email protected]>
…se state XCC iOS+macOS Test failed on PR #213's first push because `HomeViewBannerTests.gateDenies_slotRendersNothing` and `BoardViewBannerTests.running_butGateDenies_bannerSlotCollapsesToEmpty` both relied on `makeAdGate(allow: false)`, which previously denied via a fresh grace-period `firstLaunchAt`. With `AdGate.gracePeriodDays = 0` (this PR's whole point), that denial path collapses and the helper now allows the banner — tests fail. Switch the deny path to `hasPurchasedRemoveAds = true` (rule #1 in `shouldShowBanner`). Purchase-driven denial is purely state-driven, so these helpers stay correct whether grace returns to 7 (per #212 revert) or stays at 0. Test intent ("slot collapses when gate denies") preserved — we just deny via a different rule.
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
AdGate.gracePeriodDays = 0so banner appears immediately on TestFlight / Mac dogfood builds without the 7-day onboarding wait.7 * 86_400into a named static constant so revert is one-line..disabled(...)-traited with restore instructions baked in.Release blocker
Issue #212 — must revert to 7 days + re-enable 4 disabled tests before submitting v2.5 to App Store Connect. Restoration is a 5-line diff;
docs/v2/design.mdrule #6 still names 7 days as the product commitment.Test plan
swift buildcleanswift test --filter AdGateLogicTests— 19/19 pass (4 grace-boundary tests skipped; rest enabled)🤖 Generated with Claude Code