Skip to content

ci: storyboard runner CI vs local divergence — fresh @adcp/client install validates against 3.0.1 schemas more strictly than local npm cache #324

@bokelley

Description

@bokelley

Context

After PR #322 closed the original 5 fixture-dependent storyboard failures, local end-to-end against examples/seller_agent.py reports:

overall_status: passing
total: 47, passed: 45, failed: 0, skipped: 2
controller_detected: true

But CI's storyboard job (with continue-on-error: true) reports:

overall_status: partial
total: 59, passed: 25, failed: 13, skipped: 21
controller_detected: true

Same code, same npx -y -p @adcp/client@latest invocation (resolves to 5.21.1 in both per npm view @adcp/client version), same Python 3.12. Different storyboard outcomes.

Symptoms in CI not present locally

Repeated stderr from the runner (printed by @adcp/client/dist/lib/core/TaskExecutor.js:1119):

Schema validation failed for get_products: [
  "/products/2/name: must have required property 'name'",
  "/products/2/description: must have required property 'description'",
  "/products/2/publisher_properties: must have required property 'publisher_properties'",
  "/products/2/reporting_capabilities: must have required property 'reporting_capabilities'",
  "/products/2/format_ids/0/agent_url: must have required property 'agent_url'",
  ...
]

The dumped response in the CI log shows products[2] does have all of those fields populated correctly. The schema validator is reporting them as missing anyway — and CI shows the failures cascade (21 dependent steps skipped due to unresolved context variables from prior steps).

The runner expects schema URL /schemas/3.0.1/media-buy/get-products-response.json. Local cache may be serving an older schema; CI's fresh install fetches 3.0.1 and validates more strictly — but the products are spec-compliant 3.0.1 shape, so the strict validation should pass.

Likely root cause

The 3.0.1 product schema is a oneOf discriminated union (per delivery_type, or pricing_options[*].pricing_model). @adcp/client@5.21.1's validator may iterate each variant and emit must have required property errors from the variants that DIDN'T match — even though one variant DOES match and validation should pass overall.

Two products at indices 0 and 1 (premium-homepage, run-of-site) pass; new products 2-5 fail. The structural difference is pricing_option_id value (po-cpm-homepage / po-cpm-ros for passing vs cpm_standard / cpm_guaranteed for failing) and product_id (hyphenated for passing vs underscored for failing). Neither has a schema-level pattern restriction visible in the cache. May be runner schema-validator bug or CI-vs-local schema-cache divergence.

Why this isn't blocking

Investigation paths

  1. Reproduce locally with a fresh npm cache clean --force — see if local also starts failing with fresh schema fetch.
  2. Diff the runner's schema cache between local and CI. If CI gets newer schemas, that's the issue.
  3. Inspect @adcp/client/dist/lib/validation/index.js Ajv setup — does it use oneOf errors-collection or first-match-passes?
  4. File upstream against @adcp/client if confirmed runner bug.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions