CXD-1045: Demo apps conform to CLXTestHarnessApp settings-mutation API#68
Open
bryanboyko wants to merge 2 commits into
Open
CXD-1045: Demo apps conform to CLXTestHarnessApp settings-mutation API#68bryanboyko wants to merge 2 commits into
bryanboyko wants to merge 2 commits into
Conversation
Adds -applySettingsMutation:params:error: and -verifyCleanState: conformance in both demo apps so the QA harness can drive the settings-mutation matrix without XCUITest. Covers gdpr_applies, us_privacy, hashed_user_id, user_kv_add, app_kv_add, clear_all_kvs, user_targeting_off, and hi_roi_targeting_signals by calling CloudXCore's public privacy and key-value APIs plus the IAB NSUserDefaults keys for GDPR/CCPA signals. verifyCleanState inspects CLXManualPrivacyState, CLXKeyValueState, and the IAB NSUserDefaults keys so no state leaks between mutation rows. Requires CloudXCore 3.1.0 or newer for the CLXKeyValueState / CLXManualPrivacyState accessors; the demo apps are already pinned to 3.1.0 on main. Paired with the CLXTestHarnessApp protocol additions in the cloudx-qa-automation feature branch. Made-with: Cursor
DeepLinkRouter.swift used `CloudXCore.shared()` which fails to compile — the ObjC `+ (instancetype)shared` bridges as a Swift property, not a method. Changed to `CloudXCore.shared`. Both demo Podfiles gain an opt-in `pod 'CloudXTestHarness'` line guarded by `ENV['CLX_QA_HARNESS'] == '1'`. Normal dev and release builds are unchanged (harness absent). The QA orchestrator sets the env var before `pod install` so the adapter's `applySettingsMutation:` and `verifyCleanState:` conformances get wired through the harness. Podfile.lock updates reflect the existing `~> 3.1.0` pinning that was already on `main` — no new SDK version bump. Validated: both demo apps compile clean against CloudXCore 3.1.0 with the harness linked locally. Made-with: Cursor
Member
Author
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
Adds
-applySettingsMutation:params:error:and-verifyCleanState:conformance to both the Objective-C and Swift demo apps so the QA harness can drive the settings-mutation matrix (touchpoint C of the new release-QA sweep) without XCUITest.Mutation IDs implemented in both apps:
gdpr_applies— sets IAB GDPR NSUserDefaults keys +CLXManualPrivacyState.hasUserConsent.us_privacy— setsIABUSPrivacy_String.hashed_user_id— calls[CloudXCore shared] setHashedUserID:.user_kv_add/app_kv_add— callssetUserKeyValue:value:/setAppKeyValue:value:.clear_all_kvs— callsclearAllKeyValues.user_targeting_off— clears all KVs as the observable equivalent of disabled targeting (no first-class API yet).hi_roi_targeting_signals— fans params out across user and app KVs.verifyCleanStateassertsCLXManualPrivacyState.hasUserConsent/doNotSellare bothnil,CLXKeyValueState.hashedUserIdis empty, user and app KV dictionaries are empty, and none of the IAB GDPR/CCPANSUserDefaultskeys are set. Any violation short-circuits with a descriptiveNSError/ Swiftthrowsso the harness can classify the row astest_infraand move on.Requires CloudXCore 3.1.0 or newer for the
CLXKeyValueState/CLXManualPrivacyStateaccessors; the demo apps are already pinned to 3.1.0 onmain.Paired PRs
feature/qa-automation-expansion(protocol extension + orchestrator).docs/release-md-qa-orchestrator(RELEASE.md Phase 3 wording).Test plan
pod install+ simulator build in both schemes (pending; primary unchecked risk is any signature mismatch against the liveCloudXCoreheaders).cloudxobjcremotepods://verify-clean-stateproducesCLX_CLEAN_STATE_RESULT {"ok":true}on a fresh install.cloudxobjcremotepods://apply-mutation?id=us_privacy¶ms=<base64({"value":"1YNN"})>producesCLX_MUTATION_RESULT {"verdict":"pass"}.settings-mutation-suite.shrow end-to-end once the qa-automation PR is merged.Made with Cursor