Skip to content

New Adapter: Teal#4765

Draft
ChrisHuie wants to merge 1 commit into
prebid:masterfrom
ChrisHuie:feat/new-adapter-teal
Draft

New Adapter: Teal#4765
ChrisHuie wants to merge 1 commit into
prebid:masterfrom
ChrisHuie:feat/new-adapter-teal

Conversation

@ChrisHuie
Copy link
Copy Markdown
Contributor

@ChrisHuie ChrisHuie commented May 5, 2026

Description

Adds the Teal OpenRTB 2.6 bidder to prebid-server (Go). Teal is a publisher-side bidder exchanging requests through https://a.bids.ws/openrtb2/auction. Teal already has a Prebid.js adapter and a prebid-server-java adapter; this PR completes the trifecta with the Go server-side implementation.

  • Maintainer email: prebid@teal.works
  • GVL Vendor ID: 1378 (verified — registered to "Teal Digital Group Ltd")
  • Existing documentation: dev-docs/bidders/teal.md already covers Teal across Prebid.js + Prebid Server; the page declares pbs: true and lists the same account (required) / placement (optional) params our Go adapter consumes. No separate docs PR needed.

Behavior

The adapter is a 1:1 port of prebid-server-java's org.prebid.server.bidder.teal.TealBidder; every assertion in TealBidderTest.java has a matching Go test in teal_test.go.

Three request-level mutations distinct to Teal's integration model:

  • M1 — Per-imp imp.ext.prebid.storedrequest.id = placement injection (when set)
  • M2Site.Publisher.ID and App.Publisher.ID rewritten to the first valid imp's account
  • M3request.ext.bids = {"pbs":1} reporting/billing signal

All three are documented inline in teal.go and pinned by dedicated test cases. The package-level doc.go also captures four cross-language fidelity divergences from Java (placement-pointer typing, URL-validation lenience, NBSP whitespace classification, JSON map-key ordering) so future readers don't have to rediscover them.

Test surface

  • 32 Go unit tests covering 100% of Java unit-test scenarios + Go-specific edge cases
  • 9 exemplary + 6 supplemental JSON fixtures (15 total)
  • 95.0% line coverage; race-clean
  • 3 fuzz harnesses (FuzzParseImpExt, FuzzMergeBidsPBSFlag, FuzzModifyImp) — these surfaced a real fidelity bug during development which is fixed and pinned by TestMergeBidsPBSFlag_NullInputHandledAsEmpty
  • 3 benchmarks with b.ReportAllocs() for hot-path measurement

Note on test artifacts

The doc.go, teal_fuzz_test.go, and teal_bench_test.go files are not yet standard in the adapter corpus. They're entirely additive (no wire-behavior impact) and were retained because the fuzz harnesses caught a real regression during development. Happy to remove them if reviewers prefer they land in a separate PR — just let me know.

Test plan

  • ./validate.sh passes locally
  • go test ./adapters/teal/... -race passes
  • go test ./openrtb_ext/... passes
  • go test ./config/... passes
  • Coverage ≥ 80% (actual: 95.0%)
  • Semgrep adapter rules: 0 findings
  • GVL ID 1378 verified against IAB vendor list
  • Endpoint https://a.bids.ws/openrtb2/auction reachable
  • Maintainer email domain (teal.works) MX records valid

Adds the Teal OpenRTB 2.6 bidder. Teal is a publisher-side bidder
exchanging bid requests via https://a.bids.ws/openrtb2/auction.

Maintainer: prebid@teal.works
GVL Vendor ID: 1378 (Teal Digital Group Ltd)

Behavior is a 1:1 port of prebid-server-java's TealBidder; every Java
unit-test scenario has a matching Go test. The adapter applies three
request-level mutations distinct to Teal's integration model:
  - per-imp imp.ext.prebid.storedrequest.id = placement (when set)
  - Site.Publisher.ID and App.Publisher.ID rewritten to the first
    valid imp's account
  - request.ext.bids = {"pbs":1} reporting/billing signal

Disabled tealplus alias declared via static/bidder-info/tealplus.yaml.

Test surface:
  - 32 unit tests + 15 JSON fixtures (9 exemplary + 6 supplemental)
  - 95.0% line coverage; race-clean
  - 3 fuzz harnesses + 3 benchmarks for adapter hardening
  - doc.go for full mutation contract + cross-language fidelity notes

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 6367a39

teal

Refer here for heat map coverage report

github.com/prebid/prebid-server/v4/adapters/teal/teal.go:34:	Builder			100.0%
github.com/prebid/prebid-server/v4/adapters/teal/teal.go:61:	MakeRequests		90.0%
github.com/prebid/prebid-server/v4/adapters/teal/teal.go:121:	parseImpExt		100.0%
github.com/prebid/prebid-server/v4/adapters/teal/teal.go:138:	validateImpExt		100.0%
github.com/prebid/prebid-server/v4/adapters/teal/teal.go:150:	isBlank			100.0%
github.com/prebid/prebid-server/v4/adapters/teal/teal.go:164:	modifyImp		84.0%
github.com/prebid/prebid-server/v4/adapters/teal/teal.go:210:	decodeOrEmptyObject	100.0%
github.com/prebid/prebid-server/v4/adapters/teal/teal.go:221:	decodeJSONObject	100.0%
github.com/prebid/prebid-server/v4/adapters/teal/teal.go:243:	modifyBidRequest	100.0%
github.com/prebid/prebid-server/v4/adapters/teal/teal.go:269:	clonePublisherWithID	100.0%
github.com/prebid/prebid-server/v4/adapters/teal/teal.go:283:	mergeBidsPBSFlag	100.0%
github.com/prebid/prebid-server/v4/adapters/teal/teal.go:295:	MakeBids		100.0%
github.com/prebid/prebid-server/v4/adapters/teal/teal.go:332:	getBidType		100.0%
github.com/prebid/prebid-server/v4/adapters/teal/teal.go:352:	standardHeaders		100.0%
total:								(statements)		95.0%

@przemkaczmarek przemkaczmarek self-assigned this May 6, 2026
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