Skip to content

compliance(storyboard): fix proposal-mode fixture authoring#4346

Merged
bokelley merged 1 commit into
mainfrom
bokelley/proposal-mode-storyboard-fixes
May 10, 2026
Merged

compliance(storyboard): fix proposal-mode fixture authoring#4346
bokelley merged 1 commit into
mainfrom
bokelley/proposal-mode-storyboard-fixes

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

Summary

Two pre-existing storyboard authoring issues, surfaced by @adcp/sdk PR #1603 (which made create_media_buy actually exercise proposal-mode end-to-end instead of silently sending packages regardless of the storyboard's intent). Independently fixed in @adcp/sdk PR #1649 which narrowed the over-application; the storyboard fixes here are needed regardless once any SDK consumer respects proposal-mode for proposal_id-bearing fixtures.

Fixes

  1. sales_proposal_mode authored proposal_id: "balanced_reach_q2" as a literal in two places (refine step + create_media_buy step). The training-agent's seed proposals don't include that id (it seeds pinnacle_cross_channel, viewpoint_multi_screen, sparq_social_amplification, novamind_ai_audience). Switched both to $context.proposal_id so the storyboard dynamically references whichever proposal the brief returned, matching the pattern media_buy_seller/proposal_finalize already uses.

  2. Both storyboards now include io_acceptance on the create_media_buy fixture. AdCP 3.0+ proposals with guaranteed inventory carry an insertion_order with requires_signature: true after finalization; sellers reject create_media_buy against such proposals without io_acceptance. The finalize step's context_outputs captures proposals[0].insertion_order.io_id, and the create_media_buy step references it via $context.io_id.

  3. sales_proposal_mode previously jumped straight from refine to create_media_buy, which kept the proposal in draft status. Added a finalize_proposal phase between them (matching the pattern in media_buy_seller/proposal_finalize) so the proposal transitions to committed before acceptance.

Test plan

  • bash scripts/run-storyboards-matrix.sh against current pinned SDK (@adcp/sdk@^6.13.0) — all 6 tenants meet floors. /sales: 67 clean / 259 steps (was 258, +1 from new finalize step).
  • bash scripts/run-storyboards-matrix.sh against patched SDK (@adcp/sdk with PR deps: bump @types/node to v22, axios, ajv, typescript #1649 applied locally) — all 6 tenants meet floors. Same result.
  • Forward-compatible: storyboard fixes are SDK-version-independent.

Out-of-scope follow-up

Once @adcp/sdk@6.18.x ships PR #1649 and the test-agent bumps its pin, the 028-unsigned-protocol-method-required line in server/tests/manual/run-storyboards.ts::skipVectors can be dropped — that's the original goal of the un-skip work that surfaced this regression chain.

🤖 Generated with Claude Code

…oposal_mode, proposal_finalize)

Surfaced by @adcp/sdk PR #1603 which made create_media_buy actually
exercise proposal-mode end-to-end instead of silently sending `packages`
regardless of the storyboard's intent.

Three fixes:

1. sales_proposal_mode authored `proposal_id: "balanced_reach_q2"` as a
   literal in two places. Training-agent's seed proposals don't include
   that id. Switched to `$context.proposal_id` so the storyboard follows
   whichever proposal the brief returned — matches the pattern
   media_buy_seller/proposal_finalize already uses.

2. Both storyboards now include `io_acceptance` on create_media_buy.
   AdCP 3.0+ proposals with guaranteed inventory carry an insertion_order
   with `requires_signature: true` after finalization; sellers reject
   create_media_buy without `io_acceptance`. The finalize step captures
   `proposals[0].insertion_order.io_id` via context_outputs, and the
   create_media_buy step references `$context.io_id`.

3. sales_proposal_mode previously jumped straight from refine to
   create_media_buy, leaving the proposal in `draft` status. Added a
   `finalize_proposal` phase mirroring media_buy_seller/proposal_finalize.

Forward-compatible with both pre-#1603 and post-#1603 SDK behavior — all
six tenant matrix runs pass against both. /sales lifts from 258 → 259
steps (the new finalize step counts).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bokelley bokelley merged commit 579d205 into main May 10, 2026
19 checks passed
@bokelley bokelley deleted the bokelley/proposal-mode-storyboard-fixes branch May 10, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant