Skip to content

fix(media-buy): preserve direct package selectors on AdCP 3.1 - #3692

Open
aleksUIX wants to merge 1 commit into
adcontextprotocol:mainfrom
aleksUIX:fix/31-direct-package-selector-3671
Open

aleksUIX wants to merge 1 commit into
adcontextprotocol:mainfrom
aleksUIX:fix/31-direct-package-selector-3671

Conversation

@aleksUIX

@aleksUIX aleksUIX commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Preserve format_kind and params on proven AdCP 3.1 create_media_buy packages and update_media_buy new_packages when no single legacy mapping exists. Keep explicit mapping precedence and refusal for 3.0, unproven peers, ambiguous explicit references and existing-package updates.

Validation: 112 packaged selector, creative-delivery and projection tests pass on Node 24 with the official runner. All 40 selector tests also pass on Node 20, including both public clients and the bundled 3.1 package schema. Nine new regressions fail before the fix. Build, typecheck and the patch changeset check pass. The complete SDK suite remains unverified locally; an earlier full-suite attempt hit an unchanged type-fixture timeout.

Hosted CI: Generated, Docs & Formatting fails because the live registry sync changes schemas/registry/registry.yaml and src/lib/registry/types.generated.ts. Both files are unchanged by this PR. The official sync generator reproduces the drift from pristine main inputs at ccfc06c.

Fixes #3671.

@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 DR-0033 minor-release fix with no blocking or medium findings.

Checked:

  • Witness-not-translator: The 3-line change in src/lib/v2/projection/creative-delivery.ts adds an early return next so proven AdCP 3.1 package requests preserve format_kind/params when no single legacy mapping exists, mirroring the existing format_option_refs preservation (L1766-1775). No fabrication or re-shaping — it preserves exactly what upstream sent.
  • DR-0033 pathway: Explicit legacy mapping still wins; ambiguous explicit format_ids still refuse (legacyRefs.length===0 guard); 3.0/unproven peers still refuse. Refused-for-previous-minor pathway is respected and tested.
  • Changeset-vs-wire-impact: Patch changeset present and defensible for this preservation fix (no removed/renamed export, no required-param flip, no dropped enum).
  • Tests: Nine targeted regressions cover both public clients, both pins, create vs update, and the 3.1 package schema.
  • Docs: Updated.

No Medium-or-worse findings. No gated paths, no high-risk files, no no-auto-approve team match. gated_paths: false, so the REVIEW_REQUIRED status does not block. Falls through to decision table row 9 → approve.

This branch has not been deployed

No deployments
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.

On an AdCP 3.1 session, create_media_buy throws for a package format_kind selector with no single legacy mapping

1 participant