Skip to content

id5: add resolveId5 with QA flags, bounded live resolution and a dedicated cache - #341

Merged
etiennelatendresse-optable merged 7 commits into
masterfrom
id5-resolution
Oct 5, 2026
Merged

etiennelatendresse-optable merged 7 commits into
masterfrom
id5-resolution

Conversation

@etiennelatendresse-optable

@etiennelatendresse-optable etiennelatendresse-optable commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Why

Theres need for a resolveId5/getCachedId5UserId, the on-demand ID5 resolution used to enrich targeting calls.

What Changed

  • resolveId5(partnerId, { isBot?, timeoutMs? }), QA flags first (optableResolveID5ID, optableResolveId5), then a 7-day cache, then a live resolution with ID5's A/B holdout disabled, validating the partner id and rejecting the "0" placeholder.
  • The cache lives in its own OPTABLE_ID5 key instead of _id5 metadata piggybacked on a cached EID, same reasoning as the _ref refs-sidecar change in eidCache: add merging targeting responses to core #330: cached EIDs stay wire-clean.
  • Live resolution is bounded (default 10s): the bundles' copies awaited ID5's onUpdate forever, and a hang blocked targeting.
  • Bot gating is a caller-supplied isBot callback
  • Tests, README section.

How to Test

  • Tested
  • Docs updated

Notes

Comment thread lib/core/id5.ts Outdated
Comment thread lib/core/id5.ts Outdated
Comment thread lib/core/id5.ts
Comment thread lib/core/id5.ts Outdated
Comment thread lib/core/id5.ts
@etiennelatendresse-optable
etiennelatendresse-optable merged commit 604bfc8 into master Oct 5, 2026
14 checks passed
@etiennelatendresse-optable
etiennelatendresse-optable deleted the id5-resolution branch October 5, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants