StackUp RTD Provider: support dual taxonomy enrichment - #15472
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 300b761309
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| segments.push(segment); | ||
| } | ||
| } | ||
| return { ...stackup, ...publisher, segment: segments }; |
There was a problem hiding this comment.
Preserve non-conflicting metadata in matching data blocks
Whenever a publisher block matches by name and segtax, the shallow publisher spread replaces the enrichment block's entire ext object. For example, a publisher block containing only ext.segtax causes transitional 501/502 response metadata such as ext.stackup.taxonomy_version, dimension, or source_tier to disappear even though those fields do not conflict. Merge ext publisher-first at the field level rather than replacing it wholesale.
Useful? React with 👍 / 👎.
|
This PR introduces changes that may not work on all browsers. According to Babel, the following polyfills may be needed, and they are not automatically included:
The best way to address this is to provide good test coverage, as normal PR checks run unit tests on older browsers. |
Summary
segtax6/9), standard audience blocks (segtax4), publisher FPD (segtax600), transitional 501/502 blocks, and untagged proprietary blockssegtax, union segment IDs, and preserve publisher-owned values on collisionssite.cattax/site.pagecat, stop derivingsite.content.idfrom the page path, and merge the current GARM extension shapeWhy
The existing module validates only legacy
segtax502 content, validates no user blocks, replaces every block sharing a provider name, and synthesizessite.content.idfrom the lookup path. Current StackUp enrichment returns separate IAB 2.2 and 3.1 blocks plus optional standard audience, proprietary, publisher, and GARM signals. The legacy behavior rejects or collapses those signals before the bid request reaches adapters.Impact
Publishers can consume the current dual-taxonomy response without losing either taxonomy or their existing first-party fields. Legacy 501/502 responses remain readable during migration. Cache schema version 2 prevents old snapshots from bypassing the new merge semantics.
Validation
npx eslint modules/stackupRtdProvider.ts test/spec/modules/stackupRtdProvider_spec.js --cache --cache-strategy contentnpx gulp test --nolint --file test/spec/modules/stackupRtdProvider_spec.js— 70 tests passed, including strict TypeScript/declaration checksType of issue
Bug fix / compatibility update.
Description
Update the StackUp RTD provider to support the current OpenRTB enrichment contract and non-destructive publisher-data merging.
Steps to reproduce
stackupRtdwith a valid publisher ID.site.content.datablocks withsegtax6 and 9 from the enrichment endpoint.segtax502.Test page
Not applicable; the module spec exercises the API response and final
ortb2Fragments.globalmerge with the XHR mock.Expected results
Dual taxonomy and other supported blocks survive as distinct data objects, publisher fields win conflicts, and no content ID is synthesized from the lookup path.
Actual results
The previous module rejects the current response or collapses blocks by provider name and creates a content ID from the path.
Platform details
Node.js 22.22.2, npm 10.9.7, Chrome Headless 151 on macOS.
Other information
No external code or identifiers are added. The request, consent, storage-manager, and auction timeout behavior are unchanged.