Skip to content
This repository was archived by the owner on Jun 13, 2026. It is now read-only.
This repository was archived by the owner on Jun 13, 2026. It is now read-only.

Wholesale product create should validate forecast shape used by create_media_buy #682

Description

@bokelley

Problem

A wholesale product can be created successfully with a legacy/simple forecast shape, but later create_media_buy fails when salesagent rehydrates the product into the stricter AdCP Product model.

Observed in local managed-PSA e2e:

  1. Tenant-management wholesale-products:validate accepts a draft with:
{
  "forecast": { "impressions": 100000 }
}
  1. Tenant-management wholesale-products creates the product.
  2. Buyer-protocol create_media_buy for that product fails with:
3 validation errors for Product
forecast.points: Field required
forecast.method: Field required
forecast.currency: Field required

Expected

The write path should either:

  • reject invalid/legacy forecast shapes during validate/create, with an actionable error, or
  • normalize the simple legacy shape into the current structured forecast shape before persisting.

Why it matters

Agentic/Murph uses tenant-management wholesale product APIs as the write path. A product that validates and creates successfully should not become unusable only when a buyer later calls create_media_buy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions