feat(audience): warn and drop identify()/alias() calls with a malformed passport id#2899
Open
nattb8 wants to merge 1 commit into
Open
feat(audience): warn and drop identify()/alias() calls with a malformed passport id#2899nattb8 wants to merge 1 commit into
nattb8 wants to merge 1 commit into
Conversation
|
View your CI Pipeline Execution ↗ for commit b17e38b
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
✅ Audience Bundle Size — @imtbl/audience
Budget: 24.00 KB gzipped (warn at 20.00 KB) |
✅ Pixel Bundle Size — @imtbl/pixel
Budget: 10.00 KB gzipped (warn at 8.00 KB) |
19180b5 to
8217e4c
Compare
f7a2eff to
2df7fff
Compare
2df7fff to
2b70a9f
Compare
…ed passport id Studios sometimes call identify() or alias() with identityType passport but pass their own internal user id instead of a real Passport id, which silently pollutes downstream analytics. Reject the call (no-op, no event sent, userId untouched) and warn unconditionally when the id doesn't look like a Passport id, using the same connection|id or UUID shape Passport actually issues. Also adds sample-app coverage for the new behaviour.
2b70a9f to
b17e38b
Compare
shineli1984
approved these changes
Jul 10, 2026
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
Studios sometimes call
identify()oralias()withidentityType: 'passport'but pass their own internal user id instead of a real Passport id, and today nothing catches it, so bad data silently flows into the audience pipeline. This rejects the call (no event sent,userIduntouched) and warns unconditionally (not gated behinddebug) when the id doesn't match the shape Passport actually issues (connection|idor a bare UUID), so studios see the mistake immediately during local testing instead of finding it in the data warehouse later.Test plan
isPassportIdValid(core) covering valid pipe-form ids, valid UUIDs, whitespace padding, and invalid shapesidentify()/alias(): malformed passport id warns and drops the call; warning fires withoutdebugenabled; valid ids and non-passport identity types never warnpnpm jestpasses forpackages/audience/coreandpackages/audience/sdkeslintpasses on all changed filestsc --noEmitpasses forpackages/audience/sdk