Skip to content

Comments

New Module: CTV VAST Enrichment#4673

Open
przemkaczmarek wants to merge 8 commits intomasterfrom
ctv
Open

New Module: CTV VAST Enrichment#4673
przemkaczmarek wants to merge 8 commits intomasterfrom
ctv

Conversation

@przemkaczmarek
Copy link
Collaborator

@przemkaczmarek przemkaczmarek commented Feb 2, 2026

This module provides comprehensive VAST processing for CTV ads:

module.go: PBS module entry point (Builder + HandleRawBidderResponseHook)
pipeline.go: Main orchestration and BuildVastFromBidResponse entrypoint
handler.go: HTTP handler for VAST requests
types.go: Type definitions, interfaces (BidSelector, Enricher, Formatter)
config.go: PBS-style layered configuration (host/account/profile merge)
model/: VAST XML structures, parser, and helper functions
select/: Bid selection logic with SINGLE/TOP_N strategies
enrich/: VAST enrichment with VAST_WINS collision policy
format/: VAST XML formatting for GAM_SSU receiver

Features:

Bid selection by price with deal prioritization
VAST XML parsing and skeleton generation
Metadata enrichment (pricing, advertiser, categories, debug)
Pod support with sequence numbering
VAST_WINS policy — preserves existing VAST values, does not overwrite
ChangeSet/UpdateBids mutation pattern (PBS-compliant, same as ortb2blocking)
clearInnerXML() fix preventing duplicate XML elements during serialization
Golden file tests for XML output

This module provides comprehensive VAST processing for CTV ads:

- vast.go: Main orchestration and BuildVastFromBidResponse entrypoint
- handler.go: HTTP handler for VAST requests
- types.go: Type definitions, interfaces (BidSelector, Enricher, Formatter)
- config.go: PBS-style layered configuration (host/account/profile merge)
- model/: VAST XML structures, parser, and helper functions
- select/: Bid selection logic with SINGLE/TOP_N strategies
- enrich/: VAST enrichment with VAST_WINS collision policy
- format/: VAST XML formatting for GAM_SSU receiver

Features:
- Bid selection by price with deal prioritization
- VAST XML parsing and skeleton generation
- Metadata enrichment (pricing, advertiser, categories, debug)
- Pod support with sequence numbering
- Golden file tests for XML output
@bsardo bsardo added the module label Feb 3, 2026
@bsardo bsardo changed the title add CTV VAST module for Connected TV ad processing New Module: CTV VAST Enrichment Feb 3, 2026
…Builder pattern

- Rename vast.go to pipeline.go for clarity
- Add module.go with Builder() and HandleRawBidderResponseHook()
- Add module_test.go with comprehensive tests
- Update README.md and README_EN.md with new structure
- Fix import paths for new module location
- Module now follows ortb2blocking/rulesengine patterns
- Change package name from 'vast' to 'ctv_vast_enrichment'
- Register module in modules/builder.go
- Fix ChangeSet mutation logic to use UpdateBids pattern
- Add 'vast' import alias in subpackages (enrich, select, format)
- Update tests to apply ChangeSet mutations before assertions
…\n\n- Add module registration section (modules/builder.go)\n- Replace YAML enabled_modules with proper host_execution_plan JSON config\n- Document ChangeSet/UpdateBids mutation pattern\n- Document clearInnerXML() XML serialization fix\n- Add package naming note (ctv_vast_enrichment + vast alias)\n- Add step-by-step PBS integration instructions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants