Skip to content

StackUp RTD Provider: support dual taxonomy enrichment - #15472

Open
yurii-bli wants to merge 1 commit into
prebid:masterfrom
yurii-bli:agent/stackup-rtd-dual-taxonomy
Open

StackUp RTD Provider: support dual taxonomy enrichment#15472
yurii-bli wants to merge 1 commit into
prebid:masterfrom
yurii-bli:agent/stackup-rtd-dual-taxonomy

Conversation

@yurii-bli

Copy link
Copy Markdown

Summary

  • accept StackUp Content Taxonomy 2.2/3.1 blocks (segtax 6/9), standard audience blocks (segtax 4), publisher FPD (segtax 600), transitional 501/502 blocks, and untagged proprietary blocks
  • merge data by provider name plus segtax, union segment IDs, and preserve publisher-owned values on collisions
  • preserve publisher site.cattax / site.pagecat, stop deriving site.content.id from the page path, and merge the current GARM extension shape
  • bump the cache schema and document the updated OpenRTB output

Why

The existing module validates only legacy segtax 502 content, validates no user blocks, replaces every block sharing a provider name, and synthesizes site.content.id from 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 content
  • npx gulp test --nolint --file test/spec/modules/stackupRtdProvider_spec.js — 70 tests passed, including strict TypeScript/declaration checks

Type 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

  1. Configure stackupRtd with a valid publisher ID.
  2. Return separate site.content.data blocks with segtax 6 and 9 from the enrichment endpoint.
  3. On the previous implementation, schema validation fails because content blocks are required to use segtax 502.
  4. If blocks share the StackUp provider name, the previous merge also replaces one block rather than retaining both taxonomies.

Test page

Not applicable; the module spec exercises the API response and final ortb2Fragments.global merge 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.

@yurii-bli
yurii-bli marked this pull request as ready for review August 7, 2026 23:48

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread modules/stackupRtdProvider.ts
segments.push(segment);
}
}
return { ...stackup, ...publisher, segment: segments };

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

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:

  • Changes to modules/stackupRtdProvider.ts may need:
    • es.iterator.constructor
    • es.iterator.every
    • es.set.difference.v2
    • es.set.intersection.v2
    • es.set.is-disjoint-from.v2
    • es.set.is-subset-of.v2
    • es.set.is-superset-of.v2
    • es.set.symmetric-difference.v2
    • es.set.union.v2
    • esnext.iterator.constructor
    • esnext.iterator.every
    • esnext.set.difference.v2
    • esnext.set.intersection.v2
    • esnext.set.is-disjoint-from.v2
    • esnext.set.is-subset-of.v2
    • esnext.set.is-superset-of.v2
    • esnext.set.symmetric-difference.v2
    • esnext.set.union.v2
  • Changes to test/spec/modules/stackupRtdProvider_spec.js may need:
    • es.iterator.constructor
    • es.iterator.find
    • es.iterator.map
    • esnext.iterator.constructor
    • esnext.iterator.find
    • esnext.iterator.map

The best way to address this is to provide good test coverage, as normal PR checks run unit tests on older browsers.

@barecheck

barecheck Bot commented Aug 8, 2026

Copy link
Copy Markdown

Barecheck - Code coverage report

Total: 91.15%

Your code coverage diff: 0.01% ▴

Uncovered files and lines
FileLines
modules/stackupRtdProvider.ts243-245, 283-284, 306, 366, 372, 441, 504-505, 509, 512-514, 516, 519, 522-523, 529-531, 534-536, 541, 543, 602

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