Repository navigation
fix(schemas): reference the canonical manifest branch, align account-ref combinators, and document v1_format_ref - #9121
Conversation
…epresentation core/creative-representation.json referenced the whole creative manifest union and then removed its named-format branch with a sibling `not` (format_id). No payload could reach that branch, but a reader had to evaluate the `not` against each branch of another document to see it. Move the manifest's fields and rules into definitions/creative-manifest-base, referenced from the root next to the unchanged oneOf. creative-representation now references that base and the canonical-format branch (`#/oneOf/1`) directly, and keeps a `not` only for format_option_ref and representation_selection. A representation is canonical-only: every representation in a set shares one format_kind (docs/creative/representation-sets.mdx). No payload changes verdict. The equivalence check cannot merge a schema split across allOf members, so the delta manifest lists each difference with direction none; the containment oracle finds both roots equivalent in both directions. Update the extension-fields test and the oneOf audit baseline for the moved pointer. Refs adcontextprotocol#9103 Refs adcontextprotocol#8921 Closes adcontextprotocol#8922
core/account-ref.json stated oneOf and core/canonical-account-ref.json stated anyOf over the same two forms. The forms exclude each other: the account_id form forbids the natural-key fields and the natural-key form forbids account_id. So the two keywords accept the same payloads, and both descriptions already say so. Use anyOf in account-ref.json. This removes one undiscriminated oneOf from the audit baseline instead of adding one to canonical-account-ref. The equivalence check cannot prove disjointness that comes from `not`, so the delta manifest lists the change with direction none; the containment oracle finds the roots equivalent in both directions. Closes adcontextprotocol#8906
… through v1_format_ref Both deprecated list_creative_formats responses reference only the v1 named-format definition. registries/v1-canonical-mapping.json makes v2 to v1 projection rely on v1_format_ref alone, but neither response said so. Add one sentence to each `formats` description: a canonical format declaration appears there only through its v1_format_ref, and otherwise only in get_adcp_capabilities creative.supported_formats[] (and, for the sales agent, Product.format_options). Closes adcontextprotocol#8962
…equal The equivalence check now merges a schema split across allOf members, so moving creative-manifest's fields into definitions/creative-manifest-base is no longer a difference. Drop the 13 lines for that split from the creative-representation delta manifest. The 4 lines left are the sites where the format_id guard moves from the representation's own `not` into the canonical-format branch, each still backed by the containment oracle. Refs adcontextprotocol#9103
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated schema paths require human/CODEOWNERS approval.
This PR modifies published protocol source under static/schemas/source/**, which is a deterministic hard approval gate (gated_paths: true), and review_decision is REVIEW_REQUIRED (not APPROVED). Per decision rule row 2, the outcome must be escalate until a human/CODEOWNERS approval is recorded.
The reviewer found no Critical/High/Medium issues: the refactor is payload-preserving across all three schemas — (1) account-ref.json oneOf→anyOf is provably disjoint, with the stale discriminator entry correctly dropped from the baseline; (2) creative-manifest.json allOf-flattening into definitions/creative-manifest-base is identical to the former flat layout; (3) creative-representation.json collapses to the canonical branch with the format_id guard preserved. Changeset present (patch), scoped to the protocol surface; schema↔docs coherence verified; no oneOf regression.
Despite the clean diff, auto-approval is not available: the gated path has not received the required human review.
Escalation reasons
- Modifies gated schema files under
static/schemas/source/**(account-ref.json, creative-manifest.json, creative-representation.json, creative/list-creative-formats-response.json, media-buy/list-creative-formats-response.json);review_decisionis REVIEW_REQUIRED, so human/CODEOWNERS approval is required before merge.
Why human review
- Gated paths touched (static/schemas/source/**) and review_decision is REVIEW_REQUIRED — human/CODEOWNERS approval required before merge (decision rule row 2).
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/account-ref.json (modified) matches
static/schemas/source/**; static/schemas/source/core/creative-manifest.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/creative-representation.json (modified) matchesstatic/schemas/source/**; static/schemas/source/creative/list-creative-formats-response.json (modified) matchesstatic/schemas/source/**; static/schemas/source/media-buy/list-creative-formats-response.json (modified) matchesstatic/schemas/source/**) and the current GitHub review decision is 'REVIEW_REQUIRED', 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.
…schema lints The creative-manifest restructure gives one root both allOf and oneOf, and the storyboard lints read only the first combinator a node carries. The validations-path lint then failed on the source tree. - validations-paths: path resolution and the forbidden-by-required-not check walk every oneOf, anyOf and allOf member. - validations-paths and context-output-paths: the branch searches (by discriminator value and for the error branch) take branches from oneOf and anyOf and follow allOf members, which are not alternatives. They resolve local #/ refs. - context-entity: entity lookup, the root-versus-branch disagreement check and annotation detection walk all three combinators.
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated paths touched without an approving review.
This PR modifies five files under static/schemas/source/**, which is under a hard, deterministic approval gate (gated_paths: true). The current review_decision is REVIEW_REQUIRED, not APPROVED, so decision-table row 2 fires: Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.
Blocking findings
- None.
Medium findings
- None.
Escalation reasons
- Gated paths touched (
static/schemas/source/**) andreview_decisionisREVIEW_REQUIRED— human/CODEOWNERS approval required before merge (decision rule row 2). Gated files:static/schemas/source/core/account-ref.json,static/schemas/source/core/creative-manifest.json,static/schemas/source/core/creative-representation.json,static/schemas/source/creative/list-creative-formats-response.json,static/schemas/source/media-buy/list-creative-formats-response.json.
Reviewer found nothing Medium-or-worse: the delta is confined to three storyboard-lint scripts and their tests, adapting to the new creative-manifest shape; changes are additive and each ships a targeted test. The oneOf baseline and schema source edits carry no spec drift or discriminator regression per the reviewer. This remains consistent with the prior escalate — the gate simply has not yet been satisfied by a recorded approval.
Why human review
- Gated paths touched (static/schemas/source/**) and review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS approval required before merge (decision rule row 2). Gated files: static/schemas/source/core/account-ref.json, static/schemas/source/core/creative-manifest.json, static/schemas/source/core/creative-representation.json, static/schemas/source/creative/list-creative-formats-response.json, static/schemas/source/media-buy/list-creative-formats-response.json.
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/account-ref.json (modified) matches
static/schemas/source/**; static/schemas/source/core/creative-manifest.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/creative-representation.json (modified) matchesstatic/schemas/source/**; static/schemas/source/creative/list-creative-formats-response.json (modified) matchesstatic/schemas/source/**; static/schemas/source/media-buy/list-creative-formats-response.json (modified) matchesstatic/schemas/source/**) and the current GitHub review decision is 'REVIEW_REQUIRED', 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.
…ow proves The equivalence check proves the account-ref oneOf and anyOf forms accept the same payloads, through the not-required guards that keep the two forms apart, so the manifest that declared the change is no longer needed. creative-representation-canonical-branch.yaml still matches the remaining differences exactly.
…-branch Resolution ledger: - Conflicts: none, and no file changed on both sides. - Mechanical: package-lock.json is main's (this branch does not change it); node_modules reinstalled with npm ci. - Invariants: main does not touch account-ref.json, canonical-account-ref.json, creative-manifest.json, creative-representation.json, the list_creative_formats responses, the storyboard schema lints, the oneOf audit baseline, or any storyboard. The three storyboard path lints pass on the merged tree, and the oneOf audit passes against this branch's baseline. - Proof: schema equivalence against 576ebca: 1113 roots, 3 differ, 12 entries at 4 sites, matching .schema-deltas/creative-representation-canonical-branch.yaml exactly; 4/4 witnesses; 62 corpus instances, no verdict changes; no informational entries.
…base.json The shared fields lived in creative-manifest.json under definitions/creative-manifest-base. Each bundle that inlines the manifest carries that block, and hoistNestedDefsToRoot moves it to the root definitions. hoistDuplicateInlineEnums and hoistMarkedSchemas skip root definitions, so the asset union (x-adcp-hoist) and the duplicate enums inside the block stayed inline. Seven creative bundles grew by about 4 MB each, and dist/schemas/latest/bundled grew from 87.0 MB to 116.7 MB. The fields now live in core/creative-manifest-base.json, which creative-manifest.json and creative-representation.json reference by path, as adagents.json references authorized-agent-base.json. Bundles inline the base like any referenced schema, so both hoists apply again: the bundled tree is 87.1 MB. The schema body is unchanged, so validation is unchanged.
|
Ladon cannot review this PR until merge conflicts are resolved. |
…-branch Resolution ledger: - Semantic: static/schemas/source/core/creative-manifest.json. This branch moved the manifest's shared fields, the assets map among them, into core/creative-manifest-base.json; main (adcontextprotocol#9123) marks the single-value branch of that assets map deprecated. Kept this branch's file, and moved main's annotated branch, with deprecated, x-deprecated-in 3.3.0, x-removed-in 4.0.0 and main's description, unchanged to creative-manifest-base.json#/properties/assets/ patternProperties/^/oneOf/0. That was main's only change to the file. - Follow-on: static/compliance/source/universal/v4-compatibility.yaml lists the moved site under schema_removals_not_checked, so the v4 registry lint finds the marked node where it now lives. - Mechanical: none. package.json and package-lock.json are main's (this branch changes neither); no data or generated file conflicts. - Invariants: the deprecation stays on the call-site beside the $ref, and the hoisted AssetVariant definition carries no deprecation in any bundle. Bundled deprecated definitions and x-removed-in call-site counts match main's build.
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated schema paths require human/CODEOWNERS approval.
No blocking findings. This is a clean no-op schema refactor: shared creative-manifest fields extracted into core/creative-manifest-base.json, with creative-manifest.json composing allOf:[base]+oneOf[named,canonical] and creative-representation.json composing base+canonical branch. Reviewer hand-verified wire-shape equivalence (account-ref oneOf→anyOf is safe given mutual exclusivity; representation's whole-manifest ref reduced to the canonical branch matches the new direct reference; VAST and coordinated_placements allOf members preserved). Lint-script allOf-walking fixes are correct and test-covered; oneof baseline edits are mechanically consistent; changeset is patch and in-scope. No Critical/High/Medium findings.
Why escalate (not approve): gated_paths: true — this PR modifies files under static/schemas/source/**, a hard, non-overridable approval gate — and review_decision is REVIEW_REQUIRED, not APPROVED (decision rule row 2). Ladon cannot auto-approve a gated-path change until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is. This also sustains the prior escalate posture.
Escalation reasons
- Gated files require human/CODEOWNERS approval (review_decision = REVIEW_REQUIRED): static/schemas/source/core/account-ref.json, creative-manifest-base.json, creative-manifest.json, creative-representation.json, static/schemas/source/creative/list-creative-formats-response.json, static/schemas/source/media-buy/list-creative-formats-response.json.
Why human review
- Gated paths touched (static/schemas/source/**) and review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS approval required before merge (decision rule row 2). Gated files: static/schemas/source/core/account-ref.json, static/schemas/source/core/creative-manifest-base.json, static/schemas/source/core/creative-manifest.json, static/schemas/source/core/creative-representation.json, static/schemas/source/creative/list-creative-formats-response.json, static/schemas/source/media-buy/list-creative-formats-response.json.
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/account-ref.json (modified) matches
static/schemas/source/**; static/schemas/source/core/creative-manifest-base.json (added) matchesstatic/schemas/source/**; static/schemas/source/core/creative-manifest.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/creative-representation.json (modified) matchesstatic/schemas/source/**; static/schemas/source/creative/list-creative-formats-response.json (modified) matchesstatic/schemas/source/**; static/schemas/source/media-buy/list-creative-formats-response.json (modified) matchesstatic/schemas/source/**) and the current GitHub review decision is 'REVIEW_REQUIRED', 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.
…side definitions (#9167) * fix(build): keep call-site annotations beside hoisted enums resolveRefs merges the keys written beside a `$ref` into the inlined enum, so occurrences of one enum differ in `description`, `default`, `deprecated` or `x-*`. hoistDuplicateInlineEnums gave every occurrence the annotations of one of them: 64eacbc kept `deprecated`, `x-deprecated-in` and `x-removed-in` beside the `$ref`, but every other annotation still moved. On main, 1,721 sites in 50 bundles show another field's description, and two gain a `default` and one an `x-status` their source does not give them. This generalizes 64eacbc to every annotation key: title, description, default, examples, deprecated, readOnly, writeOnly, enumDescriptions, $comment and x-*. The hoisted entry keeps only what every occurrence shares, and each occurrence keeps its own annotations beside its `$ref`. Occurrences share an entry only when every key that is not an annotation matches, so the entry never changes what a site accepts. Every site of every bundle now has the annotations of the unhoisted bundle, verify-build gives proof class 1, and the bundles grow 0.4%. The fixture helpers of the exit-status test move to tests/helpers/build-schemas-fixture.cjs for the new test, which builds a fixture tree through `--root`. * fix(build): hoist marked schemas and duplicate enums inside definitions hoistDuplicateInlineEnums and hoistMarkedSchemas skipped every `$defs` and `definitions` block. hoistNestedDefsToRoot moves an inlined document's `definitions` to the bundle root, so a marked schema or a repeated enum inside such an entry stayed inline at every site: the creative bundles keep the asset union inline under `definitions/resolvedAssets`, and #9121's first layout grew seven creative bundles by about 4 MB each. Both passes now walk into each entry of a `$defs` or `definitions` block. The entry itself is still neither counted as an occurrence nor replaced. Bundles go from 87.4 MB to 83.3 MB and 29 of 124 change. Validation and each site's annotations are unchanged: verify-build gives proof class 1, no Ajv verdict or error set differs over the schema-equivalence corpus, and every site matches the unhoisted bundle. The new test builds a fixture tree through `--root`. The hoist-marked test that pinned the skip now checks a marker on an entry itself, which is stripped, not hoisted.
Revised 2026-11-22: merged
main, so the deprecated single-value branch of the manifest's asset map (#9123) moves with the map tocore/creative-manifest-base.json, and the 4.0 compatibility registry lists it there; the corpus has 2,669 bound instances.Revised 2026-11-21: the storyboard path lints walk
allOfbesideoneOfandanyOf; adds why the SDK generator jobs fail; the equivalence check proves the account-ref change itself, so its manifest is dropped; mergedmain, so the proof compares 1,113 roots and the reproduce command uses the merge base; the manifest's shared fields live incore/creative-manifest-base.json, which keeps the bundles at 87 MB.core/creative-representation.jsonnow references the creative manifest's canonical-format branch directly, instead of referencing the whole manifest union and removing its named-format branch with anot. Two smaller fixes ride along:core/account-ref.jsonstates the same combinator ascore/canonical-account-ref.json, and the deprecatedlist_creative_formatsresponses say how a canonical format reaches them. No payload changes verdict.Closes #8922
Closes #8906
Closes #8962
Refs #9103
Refs #8921
creative-representation (#9103, #8922, #8921 question 2)
A representation is canonical-only: "every representation must share the same
format_kind" (docs/creative/representation-sets.mdx:9). Onmainthe schema says that by conjoining the manifest union withrequired: [format_kind]and anotthat forbidsformat_id, so the named-format branch of the referenced union can never match. That answers #8922: the narrowing is intended, and this PR states it directly.core/creative-manifest.jsonmoves its fields and rules (everything except theoneOf) intocore/creative-manifest-base.jsonand references it from the root, next to the unchangedoneOf. The root accepts the same payloads, and the branch titles stay where they are.core/creative-representation.jsonreferencescore/creative-manifest-base.jsonand the canonical-format branchcreative-manifest.json#/oneOf/1. Its remainingnotforbids onlyformat_option_refandrepresentation_selection, the two fields a representation can't carry before seller binding.deprecated,x-deprecated-in,x-removed-in, and its description, atcreative-manifest-base.json#/properties/assets/patternProperties/^/oneOf/0.schema_removals_not_checkedinv4-compatibility.yamllists the site at that path.Bundle size. The manifest's shared fields live in
core/creative-manifest-base.json, not underdefinitionsincreative-manifest.json. The bundler moves an inlined schema'sdefinitionsto the bundle root, and its enum andx-adcp-hoistpasses skip rootdefinitions, so adefinitionsentry kept the asset union inline: seven creative bundles grew about 4 MB each (87.0 to 116.7 MB in all). With the separate file, the bundled tree is 87.1 MB and the MCP projection budgets pass.Of the 12 positions #9103 lists (11 plus
core/deployment.jsononmain), this is the only one changed here:media-buy-frequency-cap,-capability,-support) remove branches that are barerequiredclauses, so there is no branch schema to reference. Referencing a base definition would also stop the capability and support schemas from composingfrequency-cap-constraints.json, which the build hoists as a named type (x-adcp-hoist), so the bundled schemas would change structure. I left them as they are.budget-allocationand the twopublisher_properties/itemspositions, thenotremoves alternatives inside each branch, not a branch of the referenced union, so there is nothing to reference.notforbids a property that no branch requires, so it removes nothing.account-ref (#8906)
The two account reference forms exclude each other: the
account_idform forbidsbrand,operator, and the other natural-key fields, and the natural-key form forbidsaccount_id. SooneOfandanyOfaccept the same payloads, and both descriptions already say "The two forms exclude each other". This PR usesanyOfinaccount-ref.json, ascanonical-account-ref.jsondoes, rather thanoneOfincanonical-account-ref.json: the repo's oneOf audit (#3917) blocks new undiscriminatedoneOfs, and this removes one from its baseline instead of adding one.list_creative_formats (#8962)
Both deprecated responses reference only the v1 named-format definition, and
registries/v1-canonical-mapping.jsonsays v2 to v1 projection MUST rely onv1_format_ref. Each response'sformatsdescription now says so in one sentence: a canonical format declaration appears in the list only through itsv1_format_ref, and is otherwise discoverable throughget_adcp_capabilitiescreative.supported_formats[](and, for the sales agent,Product.format_options).Storyboard path lints
The storyboard path lints walked only the first of
oneOf,anyOf, andallOfon a node. With the creative manifest's fields underallOfbeside itsoneOf,lint-storyboard-validations-pathsstopped findingcreative_manifest.assets,format_id, andformat_kind, and reported 15 storyboard paths as undefined. This PR makes the three storyboard schema lints (validations-paths,context-output-paths, andcontext-entity) walk every combinator a node carries. The branch searches take branches fromoneOfandanyOfand followallOfmembers, which aren't alternatives. Each lint's tests gain a case with a root that carries bothallOfandoneOf.Why the SDK generator jobs fail
Generate TypeScript SDKandGenerate Python SDKstop in post-processors that patch generated text for this exact schema, not in the generators.postProcessCreativeRuntimeConstraintsinadcp-client(scripts/generate-zod-from-ts.ts) looks forassets: z.record(...)inside the generatedCreativeManifestSchemablock, to restore thepatternPropertiesconstraint the projection drops. This PR movesassetsintocore/creative-manifest-base.json, so the block no longer has that line and the job stops atUnable to preserve creative asset constraints on CreativeManifestSchema.restore_flattened_contract_field_typesinadcp-client-python(scripts/post_generate_fixes.py) exists becausedatamodel-code-generatorre-statesformat_kind, whichcreative-representation.jsoninherits throughallOf, asAny, so "creative representations accept arbitrary format kinds" (its docstring). It replaces a model configuration it expects to find increative_representation.py. This PR references the canonical-format branch directly, so the generated model differs and the job stops atcreative_representation.py: expected model configuration not found.Both patches match generated text, so they need updating for the new structure. They live in the SDK repositories and get updated there.
Proof
The equivalence check proves the manifest restructure equal on its own: moving
creative-manifest.json's fields intocore/creative-manifest-base.jsonleaves every root that reaches the manifest unchanged. It reports 12 difference entries at 4 sites over 3 roots, and the delta manifest lists every one with directionnone:.schema-deltas/creative-representation-canonical-branch.yamlformat_idguard moves from the representation's ownnotinto the canonical-format branch:creative-manifest-base.json#/allOf/0(oneOf),creative-manifest.json#/oneOf/1/not(requiredandanyOf),creative-representation.json#/allOf/2(not)The
account-refchange needs no manifest: the tool proves the two account reference forms disjoint through thenotguards that keep them apart, sooneOfandanyOfcompare equal. The tool can't close the 4 creative-representation lines on its own. They, and the account-ref root, are also backed by an independent containment checker (a refutational JSON Schema inclusion prototype, run in both directions):notis found to differ, with witness{"account_id": "a0", "brand": []}.oneOf[named, canonical] ∧ {required: [format_kind], not: anyOf[format_id, format_option_ref, representation_selection]}againstcanonical ∧ {not: anyOf[format_option_ref, representation_selection]} ∧ {required: [format_kind]}, are equivalent in both directions. The other conjuncts are the same schemas on both sides. A control that keepsrepresentation_selectionallowed differs.The tool's own checks pass: the manifest matches the differences exactly, the witness search finds no payload for any
noneline (4 of 4), and no corpus instance changes verdict (62 bound instances reach a changed site).The tool is proposed in #9119. To reproduce, run the tool from that PR:
Result: