Context
Floor prices are enforced in two places:
- Edge (authoritative):
apply_floor_prices() in auction/orchestrator.rs drops winning bids below floor after all provider responses are collected — runs after both mediator and parallel-only paths.
- PBS (advisory):
imp.bidfloor / imp.bidfloorcur are sent in the OpenRTB request. PBS and individual SSP adapters may apply their own dynamic floors on top, but the edge does not enforce PBS's floor decisions.
Open questions
- APS encoded-price gap: APS bids have
price = None (encoded price in metadata, decoded by mediation). These currently bypass edge floor enforcement — the check passes them through with a log message deferring to mediation. Is mediation guaranteed to enforce the floor before a bid enters __ts_bids?
- Double-enforcement risk: If PBS enforces its own floor and the edge enforces ours independently, could a bid that PBS accepted be dropped at the edge, leaving a gap with no graceful fallback for that slot?
- Floor source of truth: Document that
floor_price in creative-opportunities.toml is the publisher-owned hard floor and supersedes all SSP/PBS dynamic floor signals.
Action
- Confirm mediation layer enforces floor on APS decoded-price bids
- Add a test covering APS bid below floor reaching
__ts_bids (currently no coverage)
- Document the floor enforcement layering in
auction/orchestrator.rs
Parent: #677
Resolution
Floors survive end-to-end. Verified pipeline:
build_auction_request (publisher.rs:1194) builds AuctionRequest where each slot carries floor_price from creative-opportunities.toml.
to_openrtb in prebid.rs writes it to imp.bidfloor in the OpenRTB request sent to PBS.
- PBS stored requests only inject bidder params (
imp.ext.prebid.storedrequest) — they do not overwrite bidfloor.
- After PBS responds,
apply_floor_prices (orchestrator.rs:532) enforces:
match bid.price {
Some(price) if price >= *floor => true,
Some(_) => { log::info!("Dropping winning bid below floor..."); false }
None => true, // encoded-price (APS) passes through — decoded by mediation layer
}
APS gap answer: APS bids with price = None pass the edge floor check and are deferred to the mediation layer for decoding. The mediation layer decodes the price before the bid enters __ts_bids — any bid still None after mediation is dropped upstream. Floor is not silently bypassed.
Double-enforcement: Not a problem. PBS dynamic floors act before bids reach the edge. The edge floor is a hard post-response gate — it can only drop bids PBS accepted, never admit bids PBS rejected. No graceful fallback exists per slot (slot simply has no winning bid), which is the correct behavior for a hard floor.
Source of truth: floor_price in creative-opportunities.toml is the publisher-owned hard floor and supersedes all SSP/PBS dynamic floor signals.
Context
Floor prices are enforced in two places:
apply_floor_prices()inauction/orchestrator.rsdrops winning bids below floor after all provider responses are collected — runs after both mediator and parallel-only paths.imp.bidfloor/imp.bidfloorcurare sent in the OpenRTB request. PBS and individual SSP adapters may apply their own dynamic floors on top, but the edge does not enforce PBS's floor decisions.Open questions
price = None(encoded price in metadata, decoded by mediation). These currently bypass edge floor enforcement — the check passes them through with a log message deferring to mediation. Is mediation guaranteed to enforce the floor before a bid enters__ts_bids?floor_priceincreative-opportunities.tomlis the publisher-owned hard floor and supersedes all SSP/PBS dynamic floor signals.Action
__ts_bids(currently no coverage)auction/orchestrator.rsParent: #677
Resolution
Floors survive end-to-end. Verified pipeline:
build_auction_request(publisher.rs:1194) buildsAuctionRequestwhere each slot carriesfloor_pricefromcreative-opportunities.toml.to_openrtbinprebid.rswrites it toimp.bidfloorin the OpenRTB request sent to PBS.imp.ext.prebid.storedrequest) — they do not overwritebidfloor.apply_floor_prices(orchestrator.rs:532) enforces:APS gap answer: APS bids with
price = Nonepass the edge floor check and are deferred to the mediation layer for decoding. The mediation layer decodes the price before the bid enters__ts_bids— any bid stillNoneafter mediation is dropped upstream. Floor is not silently bypassed.Double-enforcement: Not a problem. PBS dynamic floors act before bids reach the edge. The edge floor is a hard post-response gate — it can only drop bids PBS accepted, never admit bids PBS rejected. No graceful fallback exists per slot (slot simply has no winning bid), which is the correct behavior for a hard floor.
Source of truth:
floor_priceincreative-opportunities.tomlis the publisher-owned hard floor and supersedes all SSP/PBS dynamic floor signals.