Skip to content

feat(creative): merge a seller-created copy into the buyer's creative on a package - #8178

Merged
bokelley merged 13 commits into
mainfrom
bokelley/creative-assignment-merge
Oct 15, 2026
Merged

bokelley merged 13 commits into
mainfrom
bokelley/creative-assignment-merge

Conversation

@bokelley

@bokelley bokelley commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Stacked on #8175 (creative.stable_creative_ids). Review that first.

A buyer synced creative acme_video_001 and wants it on a package. Separately, the seller's operator or system created its own copy and attached it to that package. list_creatives now shows two rows for one creative: the buyer's, and a seller-assigned slr_88412.

The existing replace operation 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 adds merge, which says "slr_88412 on this package is my acme_video_001". The seller keeps the existing serving object, approval and delivery, and reports them under the buyer's creative_id.

Schema

  • New sync_creatives assignment_operations[] variant: { "operation": "merge", "creative_id", "package_id", "merged_creative_id" }.
  • merge takes no weight or placements. The merged assignment keeps the seller copy's settings, and a later assign op in the same request can change them.
  • New capability creative.supports_assignment_merge, which requires has_creative_library: true and creative.stable_creative_ids: true, so the seller-created creative being merged has a stable ID. Buyers MUST NOT send merge without it; sellers that don't declare it return UNSUPPORTED_FEATURE.
  • New error code CREATIVE_MERGE_REJECTED (correctable; held for 3.3 in the drift dispositions).

Verification

  • Capability not declared: UNSUPPORTED_FEATURE.
  • The seller verifies every merge in the request. Operations stay atomic, so any rejection applies nothing and returns CREATIVE_MERGE_REJECTED. Its details (error-details/creative-merge-rejected.json) list each rejected merge with its operation_index and a reason from the new creative-merge-rejection-reason enum:
    • 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.
  • If a person must confirm the match, the seller returns the submitted envelope, and its completion artifact carries the outcome. Buyers SHOULD send such a merge in its own request. dry_run runs the verification and applies nothing.

Per-merge outcome

  • The success response gains merges[]: one entry per applied merge, with creative_id, package_id, merged_creative_id, and the inherited approval_status. Buyers learn each outcome without a follow-up read.

On success

  • Approval: the buyer's assignment inherits the seller copy's approval, with no re-review unless the content differs.
  • The seller copy: loses its assignment on the package and is not purged. If the seller's source of truth no longer holds it, it is archived.
  • Delivery: reported under the buyer's creative_id from the merge onward. Earlier delivery is not restated.
  • Notifications:
    • creative.assignment_changed sends unassigned for the seller copy and assigned for the buyer's creative (or approval_changed if it was already assigned).
    • The account change feed records unlinked and linked under a shared batch_id.
  • Scope: only seller-assigned creatives can be merged, so one principal can't take over another's creatives.

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 without merged_creative_id (rejected), merge with weight (rejected), success merges[], 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
  • pre-commit hook passed in full

🤖 Generated with Claude Code

bokelley and others added 3 commits October 13, 2026 10:25
…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>

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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) and review_decision is not APPROVED. 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) matches static/schemas/source/**; static/schemas/source/protocol/get-adcp-capabilities-response.json (modified) matches static/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.

@aao-secretariat aao-secretariat Bot added the ladon/needs-human-review Ladon has escalated this PR for human review. label Oct 13, 2026
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>

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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/** and review_decision is 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) matches static/schemas/source/**; static/schemas/source/enums/creative-merge-rejection-reason.json (added) matches static/schemas/source/**; static/schemas/source/enums/error-code.json (modified) matches static/schemas/source/**; static/schemas/source/error-details/creative-merge-rejected.json (added) matches static/schemas/source/**; static/schemas/source/index.json (modified) matches static/schemas/source/**; static/schemas/source/protocol/get-adcp-capabilities-response.json (modified) matches static/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.

bokelley and others added 4 commits October 13, 2026 19:51
…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>
bokelley and others added 3 commits October 15, 2026 17:38
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>
Base automatically changed from bokelley/creative-identity-source to main October 15, 2026 20:26
bokelley and others added 2 commits October 15, 2026 20:30
…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>
@bokelley
bokelley merged commit c86bc5f into main Oct 15, 2026
64 checks passed
@bokelley
bokelley deleted the bokelley/creative-assignment-merge branch October 15, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ladon/needs-human-review Ladon has escalated this PR for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant