Skip to content

fix(storyboard): skip interim create/update_media_buy context on SDK 16 (#3683) - #3755

Merged
bokelley merged 1 commit into
16.xfrom
backport/16.x-3682-skip-interim-media-buy-id
Nov 20, 2026
Merged

bokelley merged 1 commit into
16.xfrom
backport/16.x-3682-skip-interim-media-buy-id

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

Backport of #3683 to the SDK 16 line (adcp-3.2 and latest dist-tags). The storyboard runner recorded context.media_buy_id and media_buy_status from any create_media_buy or update_media_buy response, including interim task envelopes (submitted, working, input-required). A schema-valid working envelope can carry media_buy_id, so webhook_emission's synchronous-trigger gate (adcontextprotocol/adcp#8894, being backported to AdCP 3.1.x and 3.2.x) classified an asynchronous seller as synchronous and failed its completion webhook.

Changes

Cherry-pick of the #3683 squash commit 2995c6edd3 with -x. 16.x's src/lib/testing/storyboard/context.ts and test/lib/context-extractors.test.js were identical to main's, so it applied cleanly. It carries #3683's own patch changeset (.changeset/skip-interim-create-media-buy-context.md).

  • create_media_buy and update_media_buy extract no context when the top-level status is submitted, working or input-required. Any other response, including legacy top-level lifecycle statuses, extracts as before.

Testing

  • node --test test/lib/context-extractors.test.js: 46/46.
  • npm run build:lib, npm run typecheck, commitlint: clean.
  • AdCP 3.2.x's tests/webhook-emission-storyboard.test.cjs (with #8894 backported) run against this build: the sync, submitted and declared-signing cases pass, and the test that pins the old misclassification (a working envelope carrying media_buy_id is classified as synchronous) now fails as intended, because the working seller is graded on its webhooks.

Refs #3682, adcontextprotocol/adcp#8771

🤖 Generated with Claude Code

…16 (#3683)

Backport of #3683. The storyboard runner recorded context.media_buy_id
and media_buy_status from any create_media_buy or update_media_buy
response, including interim task envelopes (submitted, working,
input-required). A schema-valid working envelope can carry media_buy_id,
so storyboards that gate on context.media_buy_id, such as
webhook_emission's synchronous-trigger check (adcontextprotocol/adcp#8894),
classified an asynchronous seller as synchronous. Interim envelopes now
contribute nothing to context; any other response extracts as before.

16.x's context.ts and context-extractors test were identical to main's,
so this is a clean cherry-pick.

Closes #3682

(cherry picked from commit 2995c6e)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ladon verdict: Approve

Approve — clean, well-scoped bugfix.

The storyboard context extractor now suppresses media_buy_id/media_buy_status capture from interim create_media_buy/update_media_buy task envelopes (submitted/working/input-required), fixing adcp-client#3682 where an async seller looked synchronous to storyboards gating on context.media_buy_id. The INTERIM_TASK_STATUSES set matches runner.ts's POLL_ELIGIBLE_STATUSES verbatim and is intentionally duplicated to avoid a context→runner import cycle; none of the three values is a media-buy lifecycle status per getAuthoritativeMediaBuyStatus, so the top-level guard is safe. Test matrix (2 tasks × 3 interim statuses × nested/top-level) plus terminal regression cases is thorough. Changeset type patch is correct for a runner bugfix with no wire/export impact.

No Critical/High/Medium findings. high_risk false, gated_paths false, no author-team gate, no prior decision. Falls through to row 9.

@bokelley
bokelley merged commit 0bfbb85 into 16.x Nov 20, 2026
40 checks passed
@bokelley
bokelley deleted the backport/16.x-3682-skip-interim-media-buy-id branch November 20, 2026 13: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.

2 participants