Skip to content

Integrate storyboard-driven testing into @adcp/client #423

Description

@bokelley

Summary

Storyboards should be the primary testing surface in @adcp/client, replacing the current scenario-based comply system. Today, storyboard runs call comply() which runs ALL scenarios, then retrofits results onto storyboard steps via comply_scenario string matching. Only 26 of 63 steps have mappings — five media buy storyboards are completely dark.

Problem

Three layers do overlapping work:

  1. @adcp/clienttestAllScenarios(), individual scenario functions, SCENARIO_REQUIREMENTS
  2. Server compliance layer — wraps testAllScenarios() with track grouping
  3. Storyboard run endpoint — runs comply(), then matches results back to steps

Storyboards define the exact tasks and expected behavior. The client library has SingleAgentClient with typed methods for every AdCP task. These should be connected directly.

Proposal

Add src/lib/testing/storyboard/ module to @adcp/client:

runStoryboard(agentUrl, storyboard, options)

  • Parse storyboard YAML into executable step sequence
  • Iterate phases/steps, calling SingleAgentClient methods directly (client.getProducts(), client.buildCreative(), etc.)
  • Run per-step validations (schema check, field_present, field_value) defined in the YAML
  • Propagate stateful context between steps (e.g., account_id from sync_accounts feeds into get_products)
  • Return per-step pass/fail results with timing and error details

runStoryboardStep(client, step, context)

  • Execute a single step for interactive/progressive testing
  • Returns result + updated context for next step
  • Enables step-by-step debugging from the dashboard UI

Unify with platform types

  • Platform type → recommended storyboard(s) mapping replaces SCENARIO_REQUIREMENTS + DEFAULT_SCENARIOS
  • comply() calls runStoryboard() instead of testAllScenarios()

Storyboard YAML enrichment

Add context_outputs / context_inputs to steps for stateful data flow:

steps:
  - id: sync_accounts
    task: sync_accounts
    context_outputs:
      - path: "accounts[0].account_id"
        key: "account_id"
  - id: get_products_brief
    task: get_products
    context_inputs:
      - key: "account_id"
        inject_at: "account.account_id"

Ship storyboard YAMLs with the package

The docs/storyboards/*.yaml files from the spec repo become the executable test definitions, published alongside @adcp/client.

Task-to-method mapping

Storyboard task Client method
get_products client.getProducts()
create_media_buy client.createMediaBuy()
build_creative client.buildCreative()
sync_accounts client.syncAccounts()
list_creative_formats client.listCreativeFormats()
preview_creative client.previewCreative()
sync_creatives client.syncCreatives()
get_media_buys client.getMediaBuys()
get_media_buy_delivery client.getMediaBuyDelivery()
get_signals client.getSignals()

Migration path

  1. Build runStoryboard() / runStoryboardStep() in @adcp/client
  2. Server's comply() switches from testAllScenarios() to runStoryboard()
  3. Dashboard gets step-by-step execution via runStoryboardStep()
  4. Deprecate SCENARIO_REQUIREMENTS, DEFAULT_SCENARIOS, individual scenario functions
  5. Platform types map to storyboards instead of scenario lists

Related

  • Storyboard YAML definitions: adcontextprotocol/adcp docs/storyboards/*.yaml (12 storyboards)
  • Current testing module: src/lib/testing/
  • Server comply wrapper: adcontextprotocol/adcp server/src/addie/services/compliance-testing.ts

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