Repository navigation
Move OpenRTB into an auction protocol module - #1388
Open
jwrosewell wants to merge 49 commits into
Open
jwrosewell wants to merge 49 commits into
jwrosewell wants to merge 49 commits into
Conversation
`Eid` and `Uid` move from core's OpenRTB module to `ec::eids`, beside the helpers that resolve them from the identity graph and carry them in the `x-ts-eids` header. The identity cookie, that header, the identify API and the auction request body all carry this shape, so it is the identity module's, and an auction protocol formats it into its own request from here. The OpenRTB user extension refers to the moved type and every import follows it. The serialization tests move with the types.
Core's demand seam is neutral. A compiled demand source builds its own request from the routed input, the transport facts and the signing input core settles, answering the body, the headers, the ids of the slots it asks for and any state it keeps for the answer, or nothing when it has nothing to ask for, and reads its own answer into core's bids. Core sends what the source built and reads the answer against those slots. The dimension admission rules every reader applies are `auction::admission`, the notification policy and the ignored bidder parameter count are the provider's, and the routed auction and its transport facts are public. Everything OpenRTB moves to `crates/auction-protocol/openrtb`: the wire types with their extension objects, the request builder, the response reader, the identifier formatting, and `OpenRtbDemand`, the hook trait a demand implementation that speaks OpenRTB fills in, run through core's seam by `OpenRtbDriver`. The plain implementation wraps its source in the driver, as `auction.prebid-server` and `auction.aps` now do, and `ad-server.mock` reads bids by core's admission rules. Core's own `openrtb` module, `auction/openrtb.rs` and its tests are gone, and core's test stand-ins speak a plain JSON of their own. The browser-facing response in `auction/formats.rs` still uses the generated types, so core's manifest keeps that one dependency for now. A deployment's settings do not change.
…col module The design page says what core keeps, what the protocol crate holds, what is not in this change and why, and which tests cover it. The guide's module table and demand paragraph follow the move, and the changelog carries the breaking change for crates outside core.
The consent series' reading of the neutral consent records moves with the OpenRTB builder into the protocol crate, and its additional consent switch goes from the moved field policy. The Prebid cookie series' identifiers are the identity module's type. The seam probe's demand source implements the protocol crate's hook and is wrapped in its driver, as the vendors are, and the APS and Prebid Server test helpers format the core identifiers to the wire.
The formatter's inner struct names every field, and two header reads pass the method itself.
… series breaks Review round 1 found that the design named an ad server module that does not exist, said the Prebid EID cookie parser and the consent decoders were still to move when the two series below had moved them, and said a reader in any crate admits a bid by the rules core applies when core only offers the rules. The design now says what the code does on all three, adds the adapters, consent and privacy, signing, failure, compatibility and the missing tests, asks the reviewer whether core should enforce admission, and records the review round. The auction README and the Prebid guide now name the provider and the files that exist.
Review round 2 found no blocking issues and three corrections. The related specs line pointed at a pull request that was closed on 15 October, so it now names the open pull request that holds each of the three specs and the one that holds the earlier design documents of the stack. The note on an identifier extension that is not an object now says the extension is dropped and the identifier is still sent. The round 1 entry in the review log no longer says all of that round's advice was applied, because two stale code comments are left for a later change. The round 2 entry and a revision record row are added.
# Conflicts: # docs/guide/integration-guide.md
jwrosewell
marked this pull request as ready for review
October 19, 2026 20:24
This branch has not been deployed
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.
Summary
Changes
crates/trusted-server-core/srccrates/auction-protocol/openrtbdocs/superpowersdocs/guidecrates/auction/prebid-servercrates/auction/apsCargo.lockcrates/testing/iabtlcrates/ad-server/iabtlCHANGELOG.mdcrates/auction/prebidCloses
Closes #1336
Spec
Spec: auction-protocol
Test plan
CI on this pull request at dfd2e3b passed all 20 checks.
cargo test-fastly && cargo test-axumcargo clippy-fastly && cargo clippy-axumcargo fmt --all -- --checkcd crates/trusted-server-js/lib && npx vitest runcd crates/trusted-server-js/lib && npm run formatcd docs && npm run formatcargo build --package trusted-server-adapter-fastly --release --target wasm32-wasip1fastly compute serveChecklist
unwrap()in production code (clippy deniesunwrap_usedin CI)logmacros as AGENTS.md asks (notprintln!)On top of the 51Degrees client hints middleware (#1386). Issue: #1336.
Kept current. This update only merges the pull request below (#1386), which brings Tech Lab's
mainat 7aa5c99, the changes made lower in the stack andfiftyone-caching4.5.13 (#1372).What this adds
What changes.
OpenRTB is a protocol module and core's auction names no protocol on the way to a demand source. The request builder, the response reader and the regulations object leave
crates/trusted-server-core/src/auction/openrtb.rsandopenrtb.rsforcrates/auction-protocol/openrtb, core's demand interface speaks its own neutral types, and the identifiers a request carries are the identity module's own type inec/eids.rs.How it works.
OpenRtbDriverin the protocol crate implements core's interface around theOpenRtbDemandhook the demand crates implement, with the request builder, the regulations object, the finalization and the response reader that core held. APS and Prebid Server implement the hook and wrap themselves in the driver, and the mock ad server reads only core's admission rules.EidandUidlive inec/eids.rs, because the cookie, the header, the body field and the identify API carry them with no auction involved, and the protocol crate formats them to the wire.Why
The seam made each demand source a module and left them all speaking the one protocol core knows. A standard is a vendor as much as a product is, and the auction protocol is the largest standard core still carries.
What breaks
A demand crate implemented against core's previous OpenRTB hook implements
OpenRtbDemandfrom the protocol crate and wraps itself in the driver. A deployment's settings do not change.The commits
What is not in this pull request
The browser-facing response.
auction/formats.rsstill writes the OpenRTB response the endpoints return, so core still depends on the generated types crate. Moving it needs an interface the endpoint calls and a decision for the maintainers: which protocol writes the response when no demand source is selected, where a disabled auction answers an empty OpenRTB body today, and when the selected sources' protocols differ. The design page records the question.