Repository navigation
eidCache: let firstPartyMatchers keep a third-party EID over a first-party one - #362
Merged
Merged
Conversation
etiennelatendresse-optable
force-pushed
the
eid-cache-matcher-preference
branch
from
October 8, 2026 14:32
21cd816 to
dd90626
Compare
etiennelatendresse-optable
marked this pull request as ready for review
October 8, 2026 18:07
mosherBT
reviewed
Oct 9, 2026
mosherBT
reviewed
Oct 9, 2026
mosherBT
reviewed
Oct 14, 2026
mosherBT
approved these changes
Oct 14, 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.
Why
When targeting and tokenize both resolve the same source,
mergeCachekept whichever landed last, so a first-party result could overwrite a third-party one that carried more. Deciding by the EID's label instead of arrival order lets the two calls run in parallel.What changed
mergeCachetakes afirstPartyMatchersoption. With it set, a first-party EID no longer displaces a third-party one already cached on that source, and the kept EID keeps its refs.matchercounts as third-party.CachedEidcarriesmatcher, which the SDK already read untyped in the analytics and event paths.How to Test
.mdalongside the code (for examplelib/addons/<addon>.md) and the matching README section. New addons ship with a new.md.Notes