Skip to content

chore(ads): set AdGate.gracePeriodDays = 0 for TestFlight/dogfood visibility (release-blocker #212) - #213

Merged
wei18 merged 3 commits into
mainfrom
chore/adgate-grace-zero-for-testflight
May 30, 2026
Merged

wei18 merged 3 commits into
mainfrom
chore/adgate-grace-zero-for-testflight

Conversation

@wei18

@wei18 wei18 commented May 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • Temporarily set AdGate.gracePeriodDays = 0 so banner appears immediately on TestFlight / Mac dogfood builds without the 7-day onboarding wait.
  • Refactored the literal 7 * 86_400 into a named static constant so revert is one-line.
  • Four boundary tests .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.md rule #6 still names 7 days as the product commitment.

Test plan

  • swift build clean
  • swift test --filter AdGateLogicTests — 19/19 pass (4 grace-boundary tests skipped; rest enabled)
  • User-owned: build + launch app, verify banner appears in the iPhone simulator on first launch (no AdGate suppression)

🤖 Generated with Claude Code

wei18 and others added 3 commits May 30, 2026 21:33
…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.
@wei18
wei18 merged commit a058597 into main May 30, 2026
5 checks passed
@wei18
wei18 deleted the chore/adgate-grace-zero-for-testflight branch May 30, 2026 14:21
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