Repository navigation
feat(creative): merge a seller-created copy into the buyer's creative on a package - #8178
Conversation
…Ds on reads list_creatives is source-neutral: sellers must list creatives created outside AdCP, and every row requires creative_id. The spec never said who assigns that ID for a creative that never came through sync_creatives, whether it is stable, how it avoids clashing with buyer IDs, or how a buyer tells the two apart. The seller's own identifier (platform_id) was only returned once, on the sync_creatives response, and could not express a seller that keeps a separate object per package. - New enum creative-id-source (buyer | seller), returned on list_creatives rows and get_media_buys creative_approvals rows. 3.3 sellers MUST include it; absent means unknown. It records the ID's origin and stays seller after a buyer updates the creative. - Seller-assigned creative_id rules: stable, unique in the account, never an ID a buyer already used, MAY equal platform_id, SHOULD use a stable prefix; no seller-minted revision_id. - Syncing a seller-assigned creative_id is an upsert under normal active-delivery protection; creation surface is never a reason to refuse. A colliding buyer sync is an upsert (action: updated). Buyers SHOULD namespace IDs. delete_missing never archives seller-assigned creatives. - list_creatives returns platform_id; assignment_platform_id on list_creatives assigned_packages and get_media_buys creative_approvals carries the seller's per-package object ID. Both are added to the cross-read agreement clause. Platform IDs are seller-opaque and never sent back on AdCP requests, so they carry an "x-entity deliberately omitted" $comment rather than x-entity. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… on a package
When a seller's operator or system attaches its own copy of a buyer's
creative to a package, list_creatives shows two rows for one creative: the
buyer's ID and a seller-assigned ID. The only tool a buyer had was the
replace assignment operation, which swaps them but traffics the buyer's
creative as a new serving object, with a new review and a break in
delivery. The buyer needs to say "this seller copy on this package is my
creative" so the seller keeps the existing object.
- New assignment_operations variant merge {creative_id, package_id,
merged_creative_id}. The seller verifies in order: unknown
merged_creative_id is CREATIVE_NOT_FOUND (uniform, no cross-tenant
probing); not seller-assigned or not on the package is INVALID_STATE;
not the same creative in the seller's judgement is the new correctable
code CREATIVE_MERGE_REJECTED, which points buyers to replace. Human
confirmation uses the existing submitted envelope, so buyers SHOULD send
a merge on its own.
- On success the buyer's assignment inherits the seller copy's approval
(no re-review unless content differs), weight, placement routing, and
assignment_platform_id. Delivery reports under the buyer's creative_id
from the merge; earlier delivery is not restated. The seller copy loses
its assignment on the package but is not purged. Webhook and account
change feed emissions are specified.
- Only seller-assigned creatives can be merged, so one principal cannot
take over another principal's creatives.
- New capability creative.supports_assignment_merge, which requires
has_creative_library: true. Without it sellers reject merge with
UNSUPPORTED_FEATURE and buyers MUST NOT send it.
The compliance symbol linker also linked an existing list_creatives
mention in get_media_buys.mdx.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated schema paths require human/CODEOWNERS approval.
This PR modifies files under static/schemas/source/**, which are under a hard, deterministic approval gate (gated_paths: true), and review_decision is not APPROVED. Per decision rule row 2, the outcome must be escalate.
The change itself looks clean and additive: the reviewer found no Critical/High/Medium findings. It adds the merge assignment_operations variant, the creative.supports_assignment_merge capability (gated on has_creative_library, matching the supports_revisions precedent), and the CREATIVE_MERGE_REJECTED error code (held for 3.3). Schema↔docs coherence verified across sync_creatives, specification, get_adcp_capabilities, and the compliance catalog; error code is consistent across enum, descriptions, suggestions, and drift dispositions. The oneOf stays discriminated via the operation const (no baseline regression), the minor changeset and x-added-in: 3.3.0 are correct, and tests cover the valid merge, missing merged_creative_id, and additionalProperties rejection.
Escalation reasons
- Modifies gated schema source files (
static/schemas/source/creative/sync-creatives-request.json,static/schemas/source/enums/error-code.json,static/schemas/source/protocol/get-adcp-capabilities-response.json) andreview_decisionis notAPPROVED. Human/CODEOWNERS approval is required before merge.
Why human review
- Modifies gated schema source files under static/schemas/source/** (sync-creatives-request.json, error-code.json, get-adcp-capabilities-response.json) and review_decision is not APPROVED — human/CODEOWNERS review required before merge.
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/creative/sync-creatives-request.json (modified) matches
static/schemas/source/**; static/schemas/source/enums/error-code.json (modified) matchesstatic/schemas/source/**; static/schemas/source/protocol/get-adcp-capabilities-response.json (modified) matchesstatic/schemas/source/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.
A buyer UI routes on why a merge failed: a content mismatch is the seller saying "not a match", a format mismatch is the buyer's to fix. And without a per-merge outcome in the response, every merge needs a follow-up read whose timing the as-of fields make ambiguous right after the write. - New enum creative-merge-rejection-reason: content_mismatch, format_mismatch, not_on_package (uniform for unknown IDs, replacing the CREATIVE_NOT_FOUND / INVALID_STATE split), not_supported. - New error-details/creative-merge-rejected.json: rejections[] with operation_index and reason. Sellers evaluate every merge; operations stay atomic, so any rejection applies nothing. - sync_creatives success response gains merges[]: one entry per applied merge with the inherited approval_status and assignment_platform_id. Pending confirmation stays on the submitted task; its completion artifact carries merges[] or CREATIVE_MERGE_REJECTED. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated schema source files touched and review not APPROVED.
This PR modifies published protocol source under static/schemas/source/** (sync-creatives-request.json, sync-creatives-response.json, error-code.json, get-adcp-capabilities-response.json, index.json) and adds two new schema files (creative-merge-rejection-reason.json, creative-merge-rejected.json). gated_paths is true and review_decision is not APPROVED, so the hard approval gate (decision row 2) is not satisfied — human/CODEOWNERS review is required before merge.
The reviewer's delta pass was clean: no critical/high/medium findings. Schema↔docs coherence, response oneOf discrimination (merges permitted in Success, forbidden in Error/Submitted), capability gate, and the minor/additive changeset were all verified. This is a net improvement over the prior escalate, which carried no actionable findings either. But the gate is purely path-based and lifts only on a recorded APPROVED review — it cannot be auto-approved regardless of diff cleanliness.
Escalation reasons
- Modifies gated schema source files under
static/schemas/source/**andreview_decisionis not APPROVED — human/CODEOWNERS approval required.
No blocking code findings; once a human/CODEOWNERS approval is recorded this can fall through to a normal approve.
Why human review
- Modifies gated schema source files under static/schemas/source/** (sync-creatives-request.json, sync-creatives-response.json, error-code.json, get-adcp-capabilities-response.json, index.json) plus two added schema files, and review_decision is not APPROVED — hard approval gate requires human/CODEOWNERS review before merge.
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/creative/sync-creatives-request.json (modified) matches
static/schemas/source/**; static/schemas/source/creative/sync-creatives-response.json (modified) matchesstatic/schemas/source/**; static/schemas/source/enums/creative-merge-rejection-reason.json (added) matchesstatic/schemas/source/**; static/schemas/source/enums/error-code.json (modified) matchesstatic/schemas/source/**; static/schemas/source/error-details/creative-merge-rejected.json (added) matchesstatic/schemas/source/**; static/schemas/source/index.json (modified) matchesstatic/schemas/source/**; static/schemas/source/protocol/get-adcp-capabilities-response.json (modified) matchesstatic/schemas/source/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.
…e' into bokelley/creative-assignment-merge
…exception delete_missing no longer archives seller-created creatives, and seller-assigned creative IDs must be stable, unique, and never reuse a buyer ID. 3.2 left both undefined, so a previously conformant seller can fail them. Classified Breaking under the WG constitution and recorded in the 3.3 exceptions table and the 3.2-to-3.3 migration guide. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…e' into bokelley/creative-assignment-merge
WG feedback: requiring stable seller-assigned IDs and changing what delete_missing archives would make 3.2-conformant sellers non-compliant within 3.x. Following the account.stable_account_id precedent, sellers now opt in with creative.stable_creative_ids; without it the rules are SHOULD and delete_missing keeps its 3.2 behavior. Simplify the identifiers: creative_id stays the only key. Drop creative_id_source (only the seller needs a creative's origin; buyers know which IDs they synced) and assignment_platform_id (per-package seller objects can come later). Keep platform_id readback on list_creatives for matching the seller's own UI and reports. Remove the 3.3 compatibility-exception entries; the change is additive. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ntity-source # Conflicts: # docs/protocol/get_adcp_capabilities.mdx
Resolve against creative.stable_creative_ids replacing creative_id_source. merge now requires stable_creative_ids so the seller-created creative it names has a stable ID, merged_creative_id is described as a creative that entered the library outside sync_creatives, and merges[] no longer carries assignment_platform_id (dropped with the per-package seller ID). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ignment-merge # Conflicts: # docs/creative/specification.mdx # docs/creative/task-reference/sync_creatives.mdx
…onse schema Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Summary
Stacked on #8175 (
creative.stable_creative_ids). Review that first.A buyer synced creative
acme_video_001and wants it on a package. Separately, the seller's operator or system created its own copy and attached it to that package.list_creativesnow shows two rows for one creative: the buyer's, and a seller-assignedslr_88412.The existing
replaceoperation swaps them, but the seller traffics the buyer's creative as a new serving object. That means a new review and a break in delivery. This PR addsmerge, which says "slr_88412on this package is myacme_video_001". The seller keeps the existing serving object, approval and delivery, and reports them under the buyer'screative_id.Schema
sync_creativesassignment_operations[]variant:{ "operation": "merge", "creative_id", "package_id", "merged_creative_id" }.mergetakes no weight or placements. The merged assignment keeps the seller copy's settings, and a laterassignop in the same request can change them.creative.supports_assignment_merge, which requireshas_creative_library: trueandcreative.stable_creative_ids: true, so the seller-created creative being merged has a stable ID. Buyers MUST NOT sendmergewithout it; sellers that don't declare it returnUNSUPPORTED_FEATURE.CREATIVE_MERGE_REJECTED(correctable; held for 3.3 in the drift dispositions).Verification
UNSUPPORTED_FEATURE.CREATIVE_MERGE_REJECTED. Its details (error-details/creative-merge-rejected.json) list each rejected merge with itsoperation_indexand areasonfrom the newcreative-merge-rejection-reasonenum:content_mismatch: the seller judges it a different creative. This is "not a match".format_mismatch: the buyer's creative can't take over the copy's serving object. The buyer can fix this.not_on_package: not a seller-assigned creative on this package. Reported the same way for unknown IDs, so other tenants' IDs can't be probed.not_supported: the seller can't merge this pairing on this package.submittedenvelope, and its completion artifact carries the outcome. Buyers SHOULD send such amergein its own request.dry_runruns the verification and applies nothing.Per-merge outcome
merges[]: one entry per applied merge, withcreative_id,package_id,merged_creative_id, and the inheritedapproval_status. Buyers learn each outcome without a follow-up read.On success
creative_idfrom the merge onward. Earlier delivery is not restated.creative.assignment_changedsendsunassignedfor the seller copy andassignedfor the buyer's creative (orapproval_changedif it was already assigned).unlinkedandlinkedunder a sharedbatch_id.Settled in review: the typed rejection reason and the per-merge outcome in the response were added after the first push. The outcome is reported at three layers rather than as a per-operation status, so assignment operations stay atomic: merged is
merges[], rejected is the error details, and pending is the submitted task.Related 3.3 PRs: #8174 (how current creative state is), #8175 (seller-created creative identity).
Test plan
test:composed: a valid merge, merge withoutmerged_creative_id(rejected), merge withweight(rejected), successmerges[],merges[]together with errors (rejected), rejection details, an unknown reason (rejected)test:error-codes,test:schemas,test:oneof-discriminators,build:compliance --check,test:platform-agnostic,test:examples,test:contracts,test:mcp-schema-projection, error-code drift lint, changeset scope🤖 Generated with Claude Code