Context
The price optimization poller (src/services/price-optimization-poller.ts) currently uses adapter.getMediaBuyDelivery() to fetch delivery metrics for pacing decisions. This works for the managed adapter (synchronous, simulated data) but will be suboptimal for real upstream platforms where get_media_buy_delivery has 4+ hour reporting lag.
Depends on: adcontextprotocol/adcp#1160 (get_media_buy_snapshot)
When get_media_buy_snapshot is available
- Add
getMediaBuySnapshot() to PlatformAdapter interface
- Update
price-optimization-poller.ts to prefer getMediaBuySnapshot() over getMediaBuyDelivery()
- Use
staleness_seconds from the snapshot response to inform the warmup check — if staleness_seconds is low and impressions are zero, that's a real signal to step up price
- Fall back to
getMediaBuyDelivery() for adapters that don't implement snapshot
Warmup short-circuit (build now or later)
Separate from the snapshot endpoint, the pacing calculator should detect zero delivery after the reporting lag window and step up more aggressively (to p75) rather than waiting for a full 24-hour window. This can be built against the current getMediaBuyDelivery() and will work better once snapshots are available.
Context
The price optimization poller (
src/services/price-optimization-poller.ts) currently usesadapter.getMediaBuyDelivery()to fetch delivery metrics for pacing decisions. This works for the managed adapter (synchronous, simulated data) but will be suboptimal for real upstream platforms whereget_media_buy_deliveryhas 4+ hour reporting lag.Depends on: adcontextprotocol/adcp#1160 (
get_media_buy_snapshot)When
get_media_buy_snapshotis availablegetMediaBuySnapshot()toPlatformAdapterinterfaceprice-optimization-poller.tsto prefergetMediaBuySnapshot()overgetMediaBuyDelivery()staleness_secondsfrom the snapshot response to inform the warmup check — ifstaleness_secondsis low and impressions are zero, that's a real signal to step up pricegetMediaBuyDelivery()for adapters that don't implement snapshotWarmup short-circuit (build now or later)
Separate from the snapshot endpoint, the pacing calculator should detect zero delivery after the reporting lag window and step up more aggressively (to p75) rather than waiting for a full 24-hour window. This can be built against the current
getMediaBuyDelivery()and will work better once snapshots are available.