fix(server): route update media buy handoffs through task registry#2387
Merged
Conversation
bokelley
marked this pull request as ready for review
July 23, 2026 00:01
bokelley
enabled auto-merge (squash)
July 23, 2026 00:01
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — routes update_media_buy task handoffs through the same routeIfHandoff seam as create_media_buy, widening SalesPlatform.updateMediaBuy to Promise<UpdateMediaBuyPayload | TaskHandoff>.
What I checked:
- Not spec drift: the SDK already ships UpdateMediaBuyAsyncSubmittedSchema and lists update_media_buy in SPEC_WEBHOOK_TASK_TYPES, so the submitted wire arm and completion webhooks are legitimate.
- Witness-not-translator preserved — no fabricated/normalized shapes at the seam.
- Sync-success, typed-error, and caller-scoped polling paths covered by new tests.
- Changeset present (
.changeset/fix-update-media-buy-task-handoff.md).
Medium findings: None.
The only finding is Low (changeset typed patch for an additive capability), which is omitted from blocking consideration. No critical/high/medium findings, gated_paths is false, high_risk is false, no author-team gate. Rows 1–8 do not fire → row 9 approve.
Note (non-blocking): the changeset is typed patch for what is an additive async-handoff capability; a minor bump would be more accurate, though the change itself is sound.
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
updateMediaBuytask handoffs through the same framework registry path ascreateMediaBuyTaskHandoff<UpdateMediaBuyPayload>on the publicSalesPlatformhandler typeRoot cause
createAdcpServerFromPlatformprojectedupdateMediaBuywithprojectSynconly. A handler could construct
ctx.handoffToTask(...), but the runtime neverrecognized the marker, registered its task, or assigned the framework-computed
owner scope. Polling then failed even though async
update_media_buyis a legalprotocol path.
Upgrade warning
Adopters that manually called
taskRegistry.create(...)as a workaround mustremove that code before upgrading. Running the workaround alongside the new
framework-owned handoff path can double-register work and emit duplicate
completion webhooks; there is no automatic deduplication between those paths.
Validation
npm run build:libnpm run typechecknode --test-timeout=60000 --test-force-exit --test test/server-decisioning-from-platform.test.js(139 passed)npx prettier --checkon all changed source/test/changeset filesnpx changeset status --since=origin/mainFixes adcontextprotocol/adcp#5974.