Skip to content

feat(audience): remove sandbox routing, add TestMode (SDK-352, SDK-353)#780

Closed
nattb8 wants to merge 1 commit into
mainfrom
feat/sdk-352-353-sandbox-removal-test-mode
Closed

feat(audience): remove sandbox routing, add TestMode (SDK-352, SDK-353)#780
nattb8 wants to merge 1 commit into
mainfrom
feat/sdk-352-353-sandbox-removal-test-mode

Conversation

@nattb8
Copy link
Copy Markdown
Collaborator

@nattb8 nattb8 commented May 13, 2026

Closes SDK-352, SDK-353. Sub-issue of SDK-351.

What changed

Sandbox removal (SDK-352)

  • All publishable keys now resolve to https://api.immutable.com. Key-prefix routing (pk_imapik-test- → sandbox) is gone.
  • Removed TestKeyPrefix, SandboxBaseUrl, WarnIfKeyEnvironmentMismatch, and the two associated log messages.
  • Simplified BaseUrl()/URL helper signatures — publishableKey param dropped. BaseUrl override still works for internal dev environments.
  • Deleted PublishableKeyPrefixTests.cs (tested removed sandbox logic).

Test mode (SDK-353)

  • Added TestMode bool to AudienceConfig (default false). When true, all outbound events carry test: true so the backend can filter them from production data.

Sample app

  • Added TEST MODE toggle (default true) with the same tick-label fix applied to DEBUG and MOBILE ATTRIBUTION toggles.
  • Removed the prod-warning banner — permanently true once sandbox was removed.
  • Updated live-fire tests and constants to match.

Test plan

  • All 317 Audience unit tests pass

@nattb8 nattb8 requested review from a team as code owners May 13, 2026 22:35
Sandbox removal (SDK-352):
- Remove TestKeyPrefix, SandboxBaseUrl, and key-prefix-based URL routing.
  All keys now resolve to https://api.immutable.com by default; BaseUrl
  override still works for internal dev environments.
- Remove WarnIfKeyEnvironmentMismatch and its log messages.
- Simplify BaseUrl/URL helper signatures (drop unused publishableKey param).
- Delete PublishableKeyPrefixTests.cs and its .meta file.
- Update ConstantsTests, ConsentSyncTests, HttpTransportTests.

Test mode (SDK-353):
- Add TestMode bool to AudienceConfig (default false). When true, every
  outbound event carries test: true so the backend can filter test traffic.
- Add testMode param to MessageBuilder.Track/Identify/Alias; all call sites
  in ImmutableAudience pass config.TestMode.
- Add TestMode tests to AudienceConfigTests and MessageBuilderTests.

Sample app:
- Add test-mode Toggle to UXML (default true) with tick-label workaround
  matching the existing debug toggle.
- Wire TestMode through InitForm → BuildAudienceConfig → BuildConfigEcho.
- Apply same tick-label injection to test-mode and mobile-attribution toggles.
- Remove prod-warning banner (permanently true now that all keys go to prod).
- Replace SandboxBaseUrl with ExplicitBaseUrl in test constants; update
  live-fire tests and stale comments.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nattb8 nattb8 force-pushed the feat/sdk-352-353-sandbox-removal-test-mode branch from b47f84b to 97fd5d1 Compare May 13, 2026 23:25
@nattb8 nattb8 closed this May 14, 2026
@nattb8 nattb8 reopened this May 14, 2026
@nattb8 nattb8 closed this May 14, 2026
@nattb8 nattb8 deleted the feat/sdk-352-353-sandbox-removal-test-mode branch May 14, 2026 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant