Skip to content

uid2: add the refreshStaleUid2s stale-token loop - #333

Draft
mosherBT wants to merge 1 commit into
migrate-eid-cache-mergefrom
uid2-refresh-orchestrator
Draft

uid2: add the refreshStaleUid2s stale-token loop#333
mosherBT wants to merge 1 commit into
migrate-eid-cache-mergefrom
uid2-refresh-orchestrator

Conversation

@mosherBT

@mosherBT mosherBT commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Why

The protocol client (#328) and cache apply (#329) exist, but nothing strings them together. mergeCache (#330) returns staleUid2s with nowhere to send them.

ClickUp Task ID: PRODUCT-3938

What Changed

  • addons: refreshStaleUid2s(config, staleEids) in lib/addons/uid2-refresh.ts — for each stale EID: guard via getRefData, refresh against the operator, apply the outcome to the cache. Sequential, per-EID try/catch, failures logged through the optableDebug-gated debugLog; never throws into the host page.
  • docs: uid2-refresh.md section; eid-cache.md now points its staleUid2s output here.

How to Test

Unit tests cover: end-to-end refresh (cache rewritten, event sent), opt-out eviction, EIDs without usable _ref skipped, network failure and undecryptable response both resolving without a throw and leaving the cache untouched, empty list no-op.

  • Tested
  • Docs updated

Notes

  • Stacked on eidCache: add merging targeting responses to core #330 (migrate-eid-cache-merge) for getRefData/CachedEid; retarget to master after it merges.

  • Completes the addon surface for PRODUCT-3938; page-load wiring is adoption in the wrappers.

  • Breaking change

  • Requires release

@mosherBT mosherBT self-assigned this Sep 3, 2026
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.

1 participant