You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replaces key-prefix URL derivation with an explicit AudienceEnvironment
enum. Studios pick Dev / Sandbox / Production via
AudienceConfig.Environment; default is Sandbox so a misconfigured
integration cannot accidentally send production traffic — Production
is opt-in.
API changes:
- AudienceEnvironment enum: Dev / Sandbox / Production.
- AudienceConfig.Environment field, default Sandbox.
- Constants.DevBaseUrl added; Constants.BaseUrl / MessagesUrl /
ConsentUrl / DataUrl now take an AudienceEnvironment (the old
publishable-key parameter is gone).
- HttpTransport constructor accepts AudienceEnvironment (default
Sandbox); removes the old key-prefix URL logic.
- ImmutableAudience.Init wires config.Environment into HttpTransport;
DeleteData and SetConsent thread it through to their control-plane
URLs.
- ImmutableAudience.CurrentEnvironment public getter returns the
last Init's env. Survives Shutdown so a diagnostic HUD does not
flicker to Sandbox on teardown; pre-Init returns Sandbox;
ResetState restores the Sandbox default.
Behavior change worth flagging: integrations using a production-
prefixed key that left Environment unset previously hit production
via the key-prefix path; they now hit Sandbox until Environment =
Production is set explicitly. Test-key integrations already got
Sandbox and are unaffected.
Tests cover every env → URL mapping, HttpTransport honoring
explicit Dev / Production over the Sandbox default, and
CurrentEnvironment pre-Init / post-Shutdown / default-Sandbox
behaviour.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments