Skip to content

gpt: fix the contextual key-value test against always-emitted brand safety - #354

Merged
etiennelatendresse-optable merged 1 commit into
masterfrom
fix-gpt-contextual-test
Sep 28, 2026
Merged

etiennelatendresse-optable merged 1 commit into
masterfrom
fix-gpt-contextual-test

Conversation

@etiennelatendresse-optable

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

Copy link
Copy Markdown
Contributor

Why

#352 makes ContextualTargetingKeyValues always emit a brand-safety key, on purpose, so a line item can tell an assessed and clean page from an unassessed one. That means the map is never empty, and #337's queues nothing when there are no key-values asserts something the code can no longer do.

What Changed

  • gpt.test.js: queues nothing when there are no key-values opts out of both defaulted keys with { keywordKey: "", brandSafetyKey: "" }, so it tests the empty-map guard in gpt.ts again instead of a state that is now unreachable.
  • gpt.test.js: new queues the brand-safety key for an unassessed page, covering the always-emit behaviour at the GAM layer. Nothing asserted it there.

How to Test

  • Tested
  • Docs updated

Notes

  • Breaking change
  • Requires release

@etiennelatendresse-optable
etiennelatendresse-optable merged commit 2c4d8ef into master Sep 28, 2026
7 checks passed
@etiennelatendresse-optable
etiennelatendresse-optable deleted the fix-gpt-contextual-test branch September 28, 2026 19:31
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