Skip to content

comply_test_controller's simulate_delivery dispatcher drops viewability/reach/frequency/reach_window params #1110

Description

@austinwiltshire

Summary

register_test_controller's dispatch for the simulate_delivery scenario hardcodes exactly five forwarded kwargs (media_buy_id, impressions, clicks, conversions, reported_spend) to the TestControllerStore method — viewability, reach, frequency, and reach_window are silently dropped before the method is ever called, even though this same repo's own bundled schema (schemas/cache/3.1/compliance/comply-test-controller-request.json) documents all four as real simulate_delivery params (viewability's own description: "sellers MUST surface these values inside viewability on the next get_media_buy_delivery response").

Confirmed present in v6.4.0 (pinned) and still present in the latest v8.0.0-beta.10 pre-release — not yet fixed.

Impact

A TestControllerStore subclass that correctly implements simulate_delivery(..., viewability=...) per the documented schema can never actually receive that value over real MCP/A2A calls — only when called directly in-process (e.g. a unit test bypassing this dispatcher). This makes any storyboard scenario exercising viewability/reach/frequency permanently unwinnable regardless of how correctly the seller implements the feature.

Evidence

  • Dispatch code, identical in both versions checked:
    elif scenario == "simulate_delivery":
    result = await method(
    media_buy_id=scenario_params["media_buy_id"],
    impressions=scenario_params.get("impressions"),
    clicks=scenario_params.get("clicks"),
    conversions=scenario_params.get("conversions"),
    reported_spend=scenario_params.get("reported_spend"),
    **extra,
    )
  • This repo's own schema documenting viewability as a simulate_delivery param:
    "viewability": {
    "type": "object",
    "description": "Viewability metrics to inject into the simulated delivery row. Used by simulate_delivery. When present, sellers MUST surface these values inside `viewability` on the next get_media_buy_delivery response. Mirrors the `viewability` block in delivery-metrics.json: measurable_impressions is the shared denominator for viewable_rate and viewed_seconds. Sellers SHOULD include standard whenever measured values are present.",
    "properties": {
    "measurable_impressions": {
    "type": "number",
    "minimum": 0,
    "description": "Impressions where viewability could be measured. Coverage denominator for viewable_rate and viewed_seconds."
    },
    "viewable_impressions": {
    "type": "number",
    "minimum": 0,
    "description": "Impressions that met the viewability threshold."
    },
    "viewable_rate": {
    "type": "number",
    "minimum": 0,
    "maximum": 1,
    "description": "Viewable impression rate (viewable_impressions / measurable_impressions)."
    },
    "viewed_seconds": {
    "type": "number",
    "minimum": 0,
    "description": "Average in-view duration per measurable impression in seconds. Reporting counterpart to the viewed_seconds optimization metric."
    },
    "standard": {
    "$ref": "../enums/viewability-standard.json",
    "description": "Viewability measurement standard governing the threshold for viewable_rate and viewed_seconds."
    }
    },
    "additionalProperties": true

Ask

  • Forward viewability, reach, frequency, reach_window the same way the other simulate_delivery params are forwarded — or better, forward whatever the store method's own signature actually accepts (via inspect.signature) so new documented params don't silently require a matching dispatcher update every time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions