New Adapter: Peak226 - #4919
Open
chanand wants to merge 2 commits into
Open
Conversation
chanand
marked this pull request as ready for review
August 25, 2026 04:46
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5c7d08f90c
ℹ️ 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".
Impressions sharing a region but declaring different publisherId values were previously merged into one request, with only the first non-empty publisherId applied to site/app.publisher.id — silently misattributing the rest. Grouping is now keyed on (region, publisherId) so each distinct pair gets its own request. Addresses Codex review comment on prebid#4919.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New Adapter: Peak226
Branch:
peak226-bid-adapter(cut from upstreammaster@0ba352315)Docs PR: prebid/prebid.github.io#6715 — rewrites the 2018
dev-docs/bidders/peak226.mdstub.Prebid.js adapter: not part of this submission. The docs PR is scoped server-only (
pbjs: false); a Prebid.js adapter is planned as a separate PR.Description
Adds the
peak226server-side bid adapter (Edge226 Ltd), supporting banner, video andnative for both
siteandapptraffic.peak226https://{{.Region}}.a.viddea.com/edge_directImp params
publisherIdstringsite.publisher.idorapp.publisher.id.placementIdstringimp.tagid.regionstringus,eu,jp. Defaults tous. Resolves the{{.Region}}endpoint macro.Behavior worth a reviewer's attention
Requests are split per region
regionselects a data center, so imps are grouped by their ownregionvalue and one requestis emitted per distinct region — each carrying only its own impressions, in first-seen order —
rather than routing everything to the first imp's region. Each region group also resolves its
own effective
publisherId. Covered bysupplemental/multi-region-split.json.The adapter modifies
device— please read this bitsanitizeDeviceclearsdevice.ifawhen it is the all-zero sentinel(
00000000-0000-0000-0000-000000000000) that the OS reports when app tracking permission wasdeclined (e.g. iOS ATT). It is not a real device ID, and forwarding it as though it were is
misleading to the bidder.
I want to flag this explicitly since an adapter touching
deviceis unusual and reasonably drawsscrutiny. It is not duplicating core behavior:
privacy/lmt/ios.goinspects this sentinel butnever clears it, so nothing upstream of the adapter removes it. The original
request.Deviceisnot mutated — a copy is taken. If maintainers would prefer this live in core (or not happen at
all), I'm happy to drop it from this PR and raise it separately. Covered by
supplemental/app-zero-ifa-cleared.json.${AUCTION_PRICE}is resolved inMakeBidspeak226 always returns the
${AUCTION_PRICE}macro inadm(andnurl) as its countingmechanism and relies on the demand-side adapter to expand it, so
resolveMacrossubstitutes thebid price before the
TypedBidis built. Without it the literal macro text would render in thecreative and the win notice would report the wrong price. Covered by
supplemental/auction-price-macro.json.Imp ext handling
stripBidderExtremoves only thebidderkey fromimp.ext, preserving non-bidder signals suchas
gpid,dataandtidthat the Prebid.js adapter also forwards. When nothing else remains,imp.extis cleared so the impression does not serialize an empty"ext": {}. Covered bysupplemental/imp-ext-passthrough.jsonand a table-driven unit test.Bidder-info
static/bidder-info/peak226.yamldeclaresopenrtb: {version: 2.6, gpp-supported: true, multiformat-supported: true},geoscope: [global]andmodifyingVastXmlAllowed: false. NouserSyncblock is declared: GVL 1202 declaresusesCookies: falseand does not includePurpose 1 ("store and/or access information on a device"), so a TCF-compliant CMP has no basis
to authorize a cookie drop. Bidding is unaffected — Purpose 2 (basic ads) is declared. Sync will
be proposed as a follow-up once the GVL entry is corrected and a real sync endpoint exists.
endpointCompression: gzipis deliberately not set — it has not been verified against thebackend.
Test results
Adapter coverage: 93.3%, above the 90% floor in
docs/developers/contributing.md.The remaining uncovered statements are the error branches that
docs/developers/contributing.mdexempts as unreachable through the JSON test framework —jsonutil.Marshalfailures on a struct that always marshals, andmacros.ResolveMacrosfailures on a template that parsed successfully at build time.
Test coverage added
Exemplary:
banner,video,native,multiformat.Supplemental:
multi-region-split,region-jp-app-publisher,imp-ext-passthrough,app-device-eids-passthrough,app-zero-ifa-cleared,bidfloor-currency-conversion,bidfloor-currency-conversion-error,auction-price-macro,invalid-bidder-ext,invalid-imp-ext,bad-server-response,empty-seatbid,unrecognized-mtype,status-code-bad-request,status-code-no-content,status-code-server-error.Go unit tests:
TestJsonSamples,TestEndpointTemplateMalformed,TestStripBidderExt(table-driven: nil ext, empty ext, bidder-only ext, non-bidder keys preserved, malformed JSON),
TestSetPublisherIDEmpty, plusparams_test.goschema validation.Sequencing
The docs page
dev-docs/bidders/peak226.mdalready exists inprebid/prebid.github.ioas a 2018stub from the original Prebid.js adapter removed in Prebid.js 3.0; the docs PR rewrites it
rather than creating it, and is scoped to this server adapter only (
pbjs: false, correcting aflag that has been stale since that removal). The docs front-matter carries
pbs: true, whichbecomes truthful when this PR merges — happy to sequence the two in whichever order maintainers
prefer.