fix(audience): lowercase DistributionPlatform at Init (SDK-269)#721
Merged
ImmutableJeffrey merged 1 commit intoApr 30, 2026
Merged
Conversation
nattb8
approved these changes
Apr 30, 2026
The DistributionPlatforms constants ship lowercase ("steam", "epic",
"gog", "itch", "standalone"), but a studio passing "Steam" or "STEAM"
shipped that casing on the wire and split dashboard rows from
constant-using studios in the same project.
Init now lowercases config.DistributionPlatform once at the boundary
so the rest of the SDK and the wire format see a single canonical
form. Mutates the caller's AudienceConfig instance the same way the
existing block already does for PersistentDataPath.
Adds 4 test cases:
- Init_LowercasesDistributionPlatform_WhenCallerPassesMixedCase
- Init_LowercasesDistributionPlatform_WhenCallerPassesAllUpperCase
- Init_LeavesDistributionPlatformUnchanged_WhenAlreadyLowercase
- Init_LeavesDistributionPlatformNull_WhenNotSet
Discovered during SDK-150 docs review (immutable/documentation#69).
b86aa40 to
2fe5db4
Compare
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
config.DistributionPlatformto lowercase once at the SDK boundaryDistributionPlatformsconstants ship lowercase; passing"Steam"or"STEAM"previously shipped that casing on the wire and split dashboard rows from constant-using studiosAudienceConfiginstance the same way Init already does forPersistentDataPathLinear: SDK-269
Note
Low Risk
Low risk: a small input-normalization change at SDK init that only affects the casing of
AudienceConfig.DistributionPlatform, with targeted unit test coverage.Overview
ImmutableAudience.Initnow normalizesconfig.DistributionPlatformto lowercase (when non-empty) so mixed/uppercase caller values don’t fragment analytics aggregation.Adds unit tests covering mixed-case, uppercase, already-lowercase, and unset
DistributionPlatforminputs to verify the normalization behavior.Reviewed by Cursor Bugbot for commit b86aa40. Bugbot is set up for automated code reviews on this repo. Configure here.