compliance(storyboard): fix proposal-mode fixture authoring#4346
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two pre-existing storyboard authoring issues, surfaced by @adcp/sdk PR #1603 (which made
create_media_buyactually exercise proposal-mode end-to-end instead of silently sendingpackagesregardless 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 forproposal_id-bearing fixtures.Fixes
sales_proposal_modeauthoredproposal_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 seedspinnacle_cross_channel,viewpoint_multi_screen,sparq_social_amplification,novamind_ai_audience). Switched both to$context.proposal_idso the storyboard dynamically references whichever proposal the brief returned, matching the patternmedia_buy_seller/proposal_finalizealready uses.Both storyboards now include
io_acceptanceon thecreate_media_buyfixture. AdCP 3.0+ proposals with guaranteed inventory carry aninsertion_orderwithrequires_signature: trueafter finalization; sellers rejectcreate_media_buyagainst such proposals withoutio_acceptance. The finalize step'scontext_outputscapturesproposals[0].insertion_order.io_id, and the create_media_buy step references it via$context.io_id.sales_proposal_modepreviously jumped straight from refine to create_media_buy, which kept the proposal indraftstatus. Added afinalize_proposalphase between them (matching the pattern inmedia_buy_seller/proposal_finalize) so the proposal transitions tocommittedbefore acceptance.Test plan
bash scripts/run-storyboards-matrix.shagainst 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.shagainst patched SDK (@adcp/sdkwith PR deps: bump @types/node to v22, axios, ajv, typescript #1649 applied locally) — all 6 tenants meet floors. Same result.Out-of-scope follow-up
Once
@adcp/sdk@6.18.xships PR #1649 and the test-agent bumps its pin, the028-unsigned-protocol-method-requiredline inserver/tests/manual/run-storyboards.ts::skipVectorscan be dropped — that's the original goal of the un-skip work that surfaced this regression chain.🤖 Generated with Claude Code