Skip to content

fix(audience): lowercase DistributionPlatform at Init (SDK-269)#721

Merged
ImmutableJeffrey merged 1 commit into
mainfrom
fix/audience-lowercase-distribution-platform
Apr 30, 2026
Merged

fix(audience): lowercase DistributionPlatform at Init (SDK-269)#721
ImmutableJeffrey merged 1 commit into
mainfrom
fix/audience-lowercase-distribution-platform

Conversation

@ImmutableJeffrey

@ImmutableJeffrey ImmutableJeffrey commented Apr 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Init normalizes config.DistributionPlatform to lowercase once at the SDK boundary
  • DistributionPlatforms constants ship lowercase; passing "Steam" or "STEAM" previously shipped that casing on the wire and split dashboard rows from constant-using studios
  • Mutates the caller's AudienceConfig instance the same way Init already does for PersistentDataPath
  • Adds 4 test cases covering mixed-case input, all-uppercase input, already-lowercase input, and unset (null) input
  • Discovered during SDK-150 docs review (immutable/documentation#69)

Linear: 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.Init now normalizes config.DistributionPlatform to 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 DistributionPlatform inputs 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.

@ImmutableJeffrey ImmutableJeffrey requested review from a team as code owners April 30, 2026 06:44
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).
@ImmutableJeffrey ImmutableJeffrey force-pushed the fix/audience-lowercase-distribution-platform branch from b86aa40 to 2fe5db4 Compare April 30, 2026 08:52
@ImmutableJeffrey ImmutableJeffrey merged commit 0c2e3af into main Apr 30, 2026
31 checks passed
@ImmutableJeffrey ImmutableJeffrey deleted the fix/audience-lowercase-distribution-platform branch April 30, 2026 10:45
@github-actions github-actions Bot added the fix label Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants