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
{{ message }}
Repository navigation
Commit ef214b7
Browse filesBrowse the repository at this point in the historyBrowse files
[AI-FSSDK] [FSSDK-12813] Normalize decision event campaign_id, variation_id, and entity_id (#634)
* [FSSDK-12813] Normalize decision event campaign_id, variation_id, and entity_id
* [FSSDK-12813] Relax campaign_id/entity_id validation to non-empty string per updated spec
Per the updated FSSDK-12813 spec, decision-event campaign_id and impression
entity_id only require a non-empty string (IDs may be opaque, e.g.
"default-12345" or "layer_abc"). Fallback to experiment_id now fires only
when the value is null or "". variation_id retains the stricter
numeric-string-only contract.
- EventIdNormalizer: add isNonEmptyString predicate and route
normalizeCampaignId through it; isNumericString and normalizeVariationId
unchanged.
- EventIdNormalizerTest: add isNonEmptyString coverage; flip
normalizeCampaignId tests so non-numeric/whitespace inputs assert
passthrough; variation_id assertions unchanged.
- EventFactoryNormalizationTest: flip whitespace and non-numeric
campaign_id tests to passthrough; split the uniform-across-rule-types
test into opaque-passthrough and null-fallback variants; update
entity_id-mirrors-campaign_id and event-never-dropped tests to use
null/empty for the campaign_id fallback path and a non-numeric value
only for the variation_id null path.
* [FSSDK-12813] Remove ticket references from code comments per cross-sdk guideline
* [FSSDK-12813] Fix copyright year to 2026 in changed files
* [FSSDK-12813] Trigger CI
* [FSSDK-12813] Emit variation_id as JSON null instead of stripping the key
JacksonSerializer sets Include.NON_NULL globally, so any null field is
dropped from the wire payload unless overridden at the field level.
campaign_id and experiment_id already carried @JsonInclude(ALWAYS);
variation_id did not, so once normalization began returning null for
non-numeric / empty inputs, the entire variation_id key disappeared from
the payload — breaking cross-SDK byte-equivalence (all other SDKs emit
explicit JSON null).
Added @JsonInclude(ALWAYS) on Decision.variationId, plus a focused
serializer test that asserts "variation_id":null is present in the
serialized output when the value is null.
0 commit comments