Skip to content

fix: storyboard validation failures against training agent#1995

Merged
bokelley merged 6 commits intomainfrom
bokelley/fix-client-validation
Apr 8, 2026
Merged

fix: storyboard validation failures against training agent#1995
bokelley merged 6 commits intomainfrom
bokelley/fix-client-validation

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

@bokelley bokelley commented Apr 8, 2026

Summary

Training agent fixes only — storyboard coverage and brand track belong in #1985.

Capabilities response (#1990):

  • get_adcp_capabilities now includes creative, account blocks and brand in supported_protocols

Rate limit (#1991, #1994):

  • Increased from 60 to 300 req/min to prevent cascading failures during bulk storyboard evaluation

Creative handler schema compliance:

  • build_creative: assets use object map format per creative-manifest.json, not arrays; added generative mode (target_format_id only); capped target_format_ids at 50
  • list_creatives: added required created_date/updated_date; added include_snapshot with snapshot_unavailable_reason
  • preview_creative: response includes response_type, preview_id, input per schema; uses preview_url/preview_html; rejects invalid format_ids

Test plan

  • npm test — 1329 unit tests pass
  • Integration: capability_discovery — 8/8 steps PASS
  • Integration: creative_sync — 3/3 steps PASS
  • Integration: creative_flow — 8/8 steps PASS
  • Integration: creative_lifecycle — 7/7 steps PASS
  • CI — all checks green

Closes #1990, closes #1991, closes #1994. #1992 and #1993 are addressed by #1985.

🤖 Generated with Claude Code

bokelley and others added 2 commits April 8, 2026 05:23
- Add creative and account capability blocks to get_adcp_capabilities
  response so capability_discovery validation passes (#1990)
- Increase training agent rate limit from 60 to 300 req/min to prevent
  cascading failures during bulk storyboard evaluation (#1991, #1992, #1994)
- Add brand_rights and capability_discovery storyboard YAMLs (#1993, #1992)
- Add brand compliance track to TRACK_SCENARIOS infrastructure (#1993)
- Update storyboard test to accept core/ and brand/ schema_ref prefixes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Update stale rate limit comment (60→300 req/min) in task TTL calculation
- Add 'brand' to supported_protocols since training agent implements brand tools
- Update test expectation for supported_protocols

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor Author

@bokelley bokelley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good fixes for the training agent — the capabilities response and rate limit changes should land. A few notes since #1985 overlaps:

schema_ref in capability_discovery.yaml is wrong — uses core/get-adcp-capabilities-request.json but the schema file lives at static/schemas/source/protocol/get-adcp-capabilities-request.json. There's no core/ schema directory. #1985 has this as protocol/get-adcp-capabilities-request.json.

brand_rights.yaml#1985 has a more complete version with creative_approval phase and update_rights lifecycle management. This one is fine but thinner.

Merge order#1985 adds capability_discovery.yaml, brand_rights.yaml, campaign_governance track, PLATFORM_STORYBOARDS mapping, storyboards option on comply(), and comply_scenario annotations across all 21 storyboards. These two PRs will conflict on:

  • docs/storyboards/capability_discovery.yaml (different content)
  • docs/storyboards/brand_rights.yaml (different content)
  • server/src/addie/services/compliance-testing.ts (both add tracks)
  • server/tests/unit/storyboards.test.ts (different prefix lists)

Suggestion: Split the training agent fixes (rate limit + capabilities response) from the storyboard YAML / track additions. The training agent changes are clean and non-overlapping. The storyboard content should come from whichever PR is more complete (#1985 has 21 storyboards with full comply_scenario annotations + the comply() migration).

bokelley and others added 4 commits April 8, 2026 05:52
- Add created_date and updated_date to list_creatives response (required by schema)
- Add include_snapshot param to list_creatives tool schema and return
  snapshot_unavailable_reason when requested
- Fix build_creative assets format: use object map with content field
  instead of array with html field (matches creative-manifest.json schema)
- Add generative build mode (target_format_id only, no manifest/library)
  since training agent declares supports_generation: true
- Fix preview_creative render format: use render_id, output_format, role,
  preview_url/preview_html per preview-render.json schema

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix preview_creative response: add response_type, preview_id, input
  fields per preview-creative-response.json schema
- Fix preview_creative: reject invalid format_ids with INVALID_FORMAT error
- Fix BuildCreativeArgs/PreviewCreativeArgs: type assets as Record (object
  map) matching creative-manifest.json schema, not Array
- Cap target_format_ids at 50 to prevent response amplification
- Remove non-schema synced_at field from list_creatives response

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove storyboard YAMLs (brand_rights, capability_discovery) and brand
compliance track — these belong in #1985 which covers full storyboard
coverage and comply() migration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Import BuildCreativeResponse, ListCreativesResponse,
PreviewCreativeResponse, and CreativeManifest from @adcp/client and use
them as return types. The compiler now catches shape mismatches at build
time:

- Removed creative_id from CreativeManifest (not in schema)
- Changed multi-format response from { results } to { creative_manifests }
- buildHtmlAssets returns AdcpCreativeManifest['assets'] type

Previously, handlers returned untyped object literals — the MCP SDK
wraps them in content[0].text as opaque strings, so TypeScript couldn't
validate the domain payload shape.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant