fix(storyboard): proposal-mode enricher respects fixture's explicit packages#1649
Merged
Merged
Conversation
…ackages PR #1603 introduced proposal-mode in the create_media_buy request enricher by reading context.proposal_id. context.ts::get_products() auto-captures proposals[0].proposal_id from any get_products response that returned proposals — essentially every brief flow against a seller that supports proposal-mode discovery. The enricher fell back to context.proposal_id whenever the fixture didn't explicitly set proposal_id. That meant a storyboard authoring `packages` directly in sample_request would have its packages dropped in favor of the auto-captured proposal — forcing every sales storyboard whose brief returned proposals through the seller's strict proposal-lifecycle validation. Concrete impact (surfaced when consuming sellers like test-agent.adcontextprotocol.org that enforce proposal-status / IO-acceptance / total_budget rules on proposal_id-shaped requests): sales_guaranteed, sales_non_guaranteed, schema_validation, media_buy_seller/*, creative_generative/seller, and similar package-mode storyboards regressed below their step floors with PROPOSAL_NOT_COMMITTED errors. Fix: the enricher reads context.proposal_id only when the fixture authors neither proposal_id nor packages. Fixture intent wins. Existing hello_seller_adapter_proposal_mode integration coverage continues to pass (proposal-mode storyboards explicitly author proposal_id). 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
Follow-up to PR #1603, which introduced proposal-mode in the
create_media_buyrequest enricher by readingcontext.proposal_id. `context.ts::get_products()` auto-captures `proposals[0].proposal_id` from any `get_products` response that returned `proposals` — essentially every brief flow against a seller that supports proposal-mode discovery.The enricher fell back to `context.proposal_id` whenever the fixture didn't explicitly set `proposal_id`. That meant a storyboard authoring `packages` directly in `sample_request` would have its packages dropped in favor of the auto-captured proposal — forcing every sales storyboard whose brief returned proposals through the seller's strict proposal-lifecycle validation.
Concrete impact
Surfaced when consuming sellers like `test-agent.adcontextprotocol.org` that enforce proposal-status / IO-acceptance / total_budget rules on `proposal_id`-shaped requests. With this branch's SDK packed locally and consumed by the test-agent's storyboard matrix:
Storyboards restored: `sales_guaranteed`, `sales_non_guaranteed`, `schema_validation` (×3), `media_buy_seller` (×11 sub-scenarios), `creative_generative/seller`, and others.
Fix
The enricher reads `context.proposal_id` only when the fixture authors NEITHER `proposal_id` NOR `packages`. Fixture is the storyboard author's intent; respect it.
Test plan
Out-of-scope follow-ups
The two remaining /sales failures are pre-existing storyboard authoring issues that PR #1603's incorrect over-application masked. They live in `adcontextprotocol/adcp` and need fixes there:
🤖 Generated with Claude Code