[Internal] Complete Age Signals telemetry and release validation - #16377
[Internal] Complete Age Signals telemetry and release validation#16377JorgeMucientes wants to merge 4 commits into
Conversation
Generated by 🚫 Danger |
|
|
|
Version |
3d0aacf to
8e9c3ce
Compare
38e1a66 to
cdb5be6
Compare
8e9c3ce to
722ba97
Compare
There was a problem hiding this comment.
AI Code Review - No issues found. The changes look good.
The durability fix is sound: userAgeRestrictionReason is now the authoritative source in readPersistedRestriction, and clearLegacyAgeRestriction() resets the legacy isUserAgeEligibleForAppUse flag (default true) so a stale legacy false can no longer re-trigger LEGACY_RESTRICTION_UNKNOWN_REASON after an authoritative allowed result. Making the wrapper property read-only is safe — the checker was its only writer. The removed SUPERVISED_APPROVAL_DENIED enum value has no remaining references. The new AgeSignalsAnalyticsTracker keeps all reported values categorical, and the tests explicitly assert raw bounds/IDs/exception data are never emitted.
PR housekeeping
- Applied repo
AGENTS.md/CLAUDE.mdguidance (store-app analytics + testing conventions) while reviewing. - The added
docs/age-signals-sdk-004-qa.mdprovides a detailed release-validation checklist covering the behaviour-changing paths.
Automatic review · claude-opus-4-8 · Workflow run
How to reply to a finding
Reply on this review (or inline at the line the finding refers to) with one of:
@claude addressed- I made the change. Bot verifies against the next diff before marking resolved.@claude rejected: <reason>- Will not fix; reason gets quoted on the next review.@claude not-applicable- Finding does not apply (wrong file, already covered elsewhere, etc.).
The bot honours these on the next review pass.
|
diff --git a/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/ageeligibility/AgeSignalsModule.kt b/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/ageeligibility/AgeSignalsModule.kt import android.content.Context
+import com.google.android.gms.tasks.Task
+internal enum class ManualAgeSignalsTestScenario {
+internal fun createManualAgeSignalsManager(): AgeSignalsManager = when (ACTIVE_MANUAL_AGE_SIGNALS_SCENARIO) {
+private fun fakeManager(
+private fun result(
+private class VerificationThenSharedAgeSignalsManager : AgeSignalsManager {
+} |
722ba97 to
eaf575b
Compare
cdb5be6 to
c3dee55
Compare

Fixes WOOMOB-3768
Description
Completes the Age Signals 0.0.4 migration with privacy-bounded telemetry, legacy cleanup, release notes, and an executable release-validation checklist.
account_age_restriction_checkedwith bounded request stage, access status, age band, significant-change status, final decision, restriction reason, SDK error, retry count, and recovery properties.account_age_verification_actionfor opening Play, manual retry, and return-from-Play retry; retry actions are emitted only after a check is admitted.below_13,13_15,16_17,18_plus,eligible, orambiguouscategories—never raw bounds, install ID, approval date, exception text, or user IDs.docs/age-signals-sdk-004-qa.mdwith policy, Play Console, Play-installed QA, accessibility, privacy, rollback, monitoring, and evidence gates.Automated validation passed on the exact rewritten stack: the complete age-eligibility unit-test package and repository-wide
detektAll. GitHub CI will separately rerun its full build and checks on the pushed commits.Stack: #16374 ← #16375 ← #16376 ← this PR. Merge bottom-up only after #16376 is approved.
Test Steps
The manual-test patch replaces the production manager provided by Hilt with Google's SDK 0.0.4
FakeAgeSignalsManager. It is based on commitc3dee55541c169268b7e332b8f1f19f0ef8ddf80, is only for local review, and must not be committed.Start from a clean checkout of this PR, then download and apply the patch:
Modify the value for
ACTIVE_MANUAL_AGE_SIGNALS_SCENARIOinManualAgeSignalsTestScenario.ktwith the below values then install the Wasabi debug build, and cold-start both logged-in and logged-out flows:Verify the final decision and
account_age_restriction_checkedpayload for each group:NOT_SHAREDnot_shared; no age band and no second-stage result.VERIFICATION_REQUIREDverification_required; final decisionverification_required; no logout.VERIFICATION_REQUIRED_THEN_SHARED_18_PLUSopen_play_storeandreturn_from_play_retry; recovery check ends allowed with age band18_plusand dismisses the dialog. Use Retry separately to verifymanual_retry.SHARED_BELOW_13orSHARED_MISSING_LOWER_BELOW_13below_minimum_age, range outcomebelow_13, and log out.SHARED_13_TO_15,SHARED_16_TO_17,SHARED_18_PLUS13_15,16_17, or18_plus, respectively.SHARED_13_PLUS_OPEN_ENDEDeligible; do not report it as ambiguous.SHARED_MISSING_BOUNDS,SHARED_CROSSING_BOUNDSambiguous; preserve a prior restriction or otherwise allow.SIGNIFICANT_CHANGE_PENDING,SIGNIFICANT_CHANGE_APPROVED,SIGNIFICANT_CHANGE_DECLINEDUNEXPECTED_ACCESS_STATUSInspect the emitted events with the normal Tracks debugging workflow. Confirm the payload contains only the documented categorical properties and never raw age bounds,
installId, approval date, exception text, or exact user identifiers.To verify persistence, first run
SHARED_BELOW_13; then switch toNOT_SHARED, an ambiguous range, and an error without clearing app data. The restriction must remain. Switch toSHARED_18_PLUS; it must clear.Disable
AGE_ELIGIBILITY_CHECKSand confirm the check is bypassed without erasing the persisted restriction. Re-enable it before continuing.Restore the scenario to the patch default (
VERIFICATION_REQUIRED_THEN_SHARED_18_PLUS), then remove the manual patch:Separately complete
docs/age-signals-sdk-004-qa.mdwith a Play-installed internal-testing build on a Play-certified Android 6.0+ device. The fake patch does not validate Play ownership, account configuration, or the real Play UI. Attach that evidence to WOOMOB-3726 and resolve the policy/Play Console gates before rollout.The scenarios use the access, response, significant-change, and exception setters documented in Google's Age Signals testing guide. The verification-to-shared scenario composes two fake managers so recovery and its analytics can be verified in one app run.
Images/gif
No new UI in this layer; #16375 contains the verification screen and preview coverage.