spec(creative): transformer refinement-retention + fan-out multiplicity discriminators#5229
Merged
bokelley merged 1 commit intoMay 31, 2026
Merged
Conversation
…ty discriminators Follow-on #3 (keystone) from the persona/scenario review: give buyers pre-call discriminators so they know what an agent supports before sending, rather than probing and handling failures. Additive/optional; the surface the spend-control and conformance follow-ons read. - get_adcp_capabilities creative.refinable_retention_seconds (guaranteed-minimum refinable window — machine-readable floor for the prior prose-only "agent-defined window"). - get_adcp_capabilities creative.multiplicity {supports_catalog_fanout + max_creatives_limit, supports_variants + max_variants_limit, variant_dimensions[]}. Over-limit fan-out is clamped (items_returned < items_total), not rejected. - transformer.multiplicity narrows the agent-level object per transformer (ceilings <= agent, dimensions subset of agent). - build_creative docs note the clamp behavior. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Approved. Additive, fully optional, every new field defaults to "unsupported / unbounded" — the right shape for a pre-call discriminator and the only shape that lets a buyer agent learn what's supported without probing for failures.
Things I checked
variant_dimensionsenum (voice|theme|best_of_n|transformer_config|custom) atget-adcp-capabilities-response.json:1138-1141matchesvariant_axis.dimensiononbuild-creative-request.json:93exactly. No drift.- Both new
multiplicityblocks areadditionalProperties: true— consistent with the surroundingcreativecapability object and the rest of the capabilities surface. - No
oneOfintroduced; the discriminator baseline atscripts/oneof-discriminators.baseline.jsonis untouched. items_returned/items_totalreferenced by the clamp prose exist onBuildCreativeVariantSuccess(build-creative-response.json:383-391).- Transformer-level
multiplicitymirrors the agent-level shape — same property names, same types, same enum, sameadditionalPropertiesposture. - Changeset is
minor. Correct: fully additive, no field renames, no enum removals, no required flips. - Docs row at
get_adcp_capabilities.mdx:388-389mirrors the schema descriptions;build_creative.mdxcarries the clamp note onmax_creatives/max_variants.
Follow-ups (non-blocking — file as issues)
- Silent-clamp observability gap.
items_totalonbuild-creative-response.json:386is "total catalog items eligible for the build (before max_creatives sampling)" — i.e. catalog input size, not the requested ceiling. Soitems_returned < items_totalfires for normal under-sampling (max_creatives: 5of 150) AND for a ceiling clamp (max_creatives: 50againstmax_creatives_limit: 20). A buyer cannot tell "I got the sample I asked for" from "I was silently clamped below what I asked for." The spend-control (F1) follow-on this PR is the keystone for needs that distinction — add an explicitclamped: true/applied_limit: Nsignal on the success envelope (or an advisory error) before F1 lands. max_variantsclamp signal is undefined.build_creative.mdx:36says "clamped" butitems_returned/items_totalare catalog-fan-out fields — they don't carry per-creative best-of-N shortfall. Either givemax_variantsits own observable signal or state explicitly that the clamp is silent and the response simply contains fewer variants.- "Use the lesser" parallel is mis-cited.
item_limit's rule onbuild-creative-request.json:135is "lesser ofitem_limitvs the format'smax_items" — request-vs-format reconciliation within a single creative. Not request-vs-capability-ceiling across a fan-out. The clamp behavior is defensible on its own; the changeset andmultiplicitydescription just shouldn't lean on this precedent. Drop the analogy or cite a different one. - Omitted-limit semantics.
max_creatives_limitandmax_variants_limitsay "Omitted means no advertised ceiling," but the parentmultiplicitydescription says over-limit requests are clamped to these ceilings. If the ceiling is omitted, what does the clamp clamp to? Either explicitly say "absent limit → no clamp" or require the limit whensupports_catalog_fanout/supports_variantsis true. Same caveat ontransformer.json:51,53. - Cross-field invariant on
refinable_retention_seconds. Schema doesn't enforce that this field is only meaningful whensupports_refinement: true. Draft-07if/thenwould catch the misconfiguration, but no precedent exists elsewhere in this file. Conformance-suite check is fine. - Transformer-narrows-agent is prose-only. "Ceilings ≤ agent, variant_dimensions ⊆ agent" is a cross-document constraint JSON Schema can't express. Accepted repo pattern, but it needs to land in the conformance suite, not just the description.
Minor nits (non-blocking)
- Typo.
transformer.json:47— "this transformer's authoritative" reads as a missing word. One-word fix to "this transformer's [object is] authoritative." multiplicityhas nodefault. Description says "Absent means no fan-out" — if you want that machine-readable,default: {}plus the per-fielddefault: falsecarries it. Cosmetic; prose is clear.
Approving on the strength of the discriminator design plus the clean enum cross-reference. The clamp-observability gap is the one I'd want closed before F1 ships, not before this one.
Contributor
Author
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.
Follow-on #3 (the keystone) from the persona/scenario review of #5219. Stacked on
account-specific-user-config(#5219); retarget tomainonce that merges.Gives buyer agents pre-call discriminators so they know what a creative agent supports before sending
max_creatives/max_variants/refine_from, instead of probing and handling failures. Fully additive/optional — every field defaults to "unsupported / unbounded" — and it's the surface the spend-control (F1) and conformance (F4) follow-ons build on.Changes
get_adcp_capabilities→creative.refinable_retention_seconds— the guaranteed-minimum window a producedbuild_variant_idstays refinable. Replaces the prose-only "agent-defined window" with a machine-readable floor; omit to keep it agent-defined.get_adcp_capabilities→creative.multiplicity—supports_catalog_fanout+max_creatives_limit,supports_variants+max_variants_limit,variant_dimensions[]. Over-limit fan-out is clamped to the ceilings (shortfall viaitems_returned<items_total), not rejected — consistent withitem_limit's "use the lesser" rule. Absent = no fan-out.transformer.json→ optionalmultiplicitythat narrows the agent-level object per transformer (ceilings ≤ agent,variant_dimensions⊆ agent).build_creativedocs note the clamp behavior on the fan-out rows.Validation
build:schemas, schema suite,json-schema,composed,oneof-discriminators, x-entity lint,docs-nav— all green.minorchangeset included.Design decisions (open to WG)
refinable_retention_secondsis a floor (guaranteed minimum), not a ceiling.item_limit).🤖 Generated with Claude Code