Skip to content

Proposal: @adcp/client/compliance-fixtures — one-import seed for storyboard-hardcoded IDs #663

Closed

Description

@bokelley

Problem

Conformance storyboards reference fixtures by hardcoded ID — test-product, test-pricing, default, video_30s, native_post, native_content, campaign_hero_video, gov_acme_q2_2027, sports_ctv_q2, cpm_guaranteed, mb_acme_q2_2026_auction, and more. None are discoverable from the spec.

Every agent implementer hits the same wall: failing storyboards → grep YAML source → hand-seed matching fixtures.

Our training agent (adcontextprotocol/adcp#2582) hand-aliases ~8 such fixtures across product-factory.ts and formats.ts. A Python or Go seller would rebuild the same list from scratch.

Proposal

Ship a new subpath export: @adcp/client/compliance-fixtures.

import { createAdcpServer } from '@adcp/client/server';
import { seedComplianceFixtures } from '@adcp/client/compliance-fixtures';

const server = createAdcpServer({ ... });
seedComplianceFixtures(server);

seedComplianceFixtures registers (via comply_test_controller seed scenarios from adcontextprotocol/adcp#2584, or directly via the SDK's state store during the transition):

  • Products: test-product with delivery_type: non_guaranteed, minimal channels/formats; sports_ctv_q2 as a CTV variant; all with pricing_options including test-pricing, default, cpm_guaranteed.
  • Formats: video_30s, native_post, native_content — explicit entries alongside the existing format catalog.
  • Creatives: campaign_hero_video with status: approved.
  • Plans: gov_acme_q2_2027 at the domain the test storyboards assume.
  • Media buys: mb_acme_q2_2026_auction as a pre-created fixture for flow-derived-ID tests.

Shape

export interface ComplianceFixturesOptions {
  /** Subset of fixture categories to seed. Defaults to all. */
  categories?: Array<'products' | 'formats' | 'creatives' | 'plans' | 'media_buys' | 'pricing_options'>;
  /** Override specific fixture bodies (for sellers whose catalog shape differs). */
  overrides?: Partial<ComplianceFixtureSet>;
}

export function seedComplianceFixtures(
  server: AdcpServer,
  options?: ComplianceFixturesOptions
): Promise<void>;

export const COMPLIANCE_FIXTURES: Readonly<ComplianceFixtureSet>;

COMPLIANCE_FIXTURES is the canonical data; seedComplianceFixtures just walks it and calls the appropriate seed helpers. Sellers who prefer to seed via their own mechanism can read COMPLIANCE_FIXTURES directly.

Source of truth

The fixture set SHOULD be generated from — or validated against — the actual storyboard YAML. If a storyboard references product_id: "test-product", CI lints that the fixtures package declares it. Catches drift on day zero.

Benefits

For SDK-based implementers

One import closes ~20 of 55 storyboards. (In our training agent: universal suite, error_compliance, idempotency, deterministic_testing, schema_validation, webhook_emission, plus parts of sales_* and governance_*.)

For non-SDK implementers

The canonical COMPLIANCE_FIXTURES data is still useful — ported to Python/Go/Rust once, reusable across implementations. Or the seed scenarios from adcp#2584 let any agent seed on demand.

For storyboard authors

Storyboard reviewers see "references new_fixture_xyz not in COMPLIANCE_FIXTURES" at lint time instead of agents failing in the wild.

Migration path

  1. Land the package with today's hardcoded set.
  2. Follow Spec: comply_test_controller fixture-seeding scenarios (seed_product, seed_pricing_option, seed_creative, seed_plan, seed_media_buy) adcp#2584 + fix(projection): lint package selector dimensions #2585 upstream; evolve to runner-driven seeding.
  3. Deprecate the package when storyboards fully adopt fixtures: / $capture patterns.

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions