Skip to content

feat(schemas): deprecate the single-value form of the scalar-or-list unions - #9123

Merged
bokelley merged 8 commits into
adcontextprotocol:mainfrom
KonstantinMirin:schemas/deprecate-scalar-list-unions
Nov 21, 2026
Merged

bokelley merged 8 commits into
adcontextprotocol:mainfrom
KonstantinMirin:schemas/deprecate-scalar-list-unions

Conversation

@KonstantinMirin

@KonstantinMirin KonstantinMirin commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Revised 2026-11-21: the build keeps the deprecation annotations beside a hoisted $ref, so every bundle builds; the build exits 1 when a bundle fails; the CI section explains the Python SDK job, which fails on main since #9049.

This marks the single-value branch of the 17 scalar-or-list unions deprecated, so 4.0 can make them list-only, as #8477 proposes. A one-item array already says the same thing and every 3.x release accepts it, so the deprecation needs no new name and changes no payload.

What changes

At each of the 17 positions in #8477's revised list, the schema accepts X or { "type": "array", "items": X, "minItems": 1 }. The X branch now carries:

"deprecated": true,
"x-deprecated-in": "3.3.0",
"x-removed-in": "4.0.0",
"description": "Deprecated in 3.3, removed in 4.0. The single-value form: send a one-item array instead."

This follows the boolean demographics deprecation (#8778): the annotations sit on the branch, beside a $ref where the branch is one, and every 4.0 removal is listed in static/compliance/source/universal/v4-compatibility.yaml.

Positions Side Removed in
get_brand_identity colors.{primary,secondary,accent,background,text} response 4.0
REQUOTE_REQUIRED envelope_field response (error details) 4.0
creative asset maps: core/creative-asset.json, creative-assets.json, creative-manifest.json, list_creatives assets, and the two localization asset maps request and response 4.0
status_filter on get_media_buys and get_media_buy_delivery request 4.0
audience characteristic value (the string, number and boolean branches) and its integer refinement for age request and response 4.0
brand.json#/definitions/color_value document 5.0

brand.json is fetched without version negotiation, so a 4.0 reader can meet a file a publisher wrote for 3.x. Its color values keep the single-value form until 5.0 (x-removed-in: "5.0.0"). Publishers can switch to arrays now: every 3.x reader accepts them.

The four nodes #8477 lists as out of scope are untouched: the three localized string-or-map nodes (brand.json localized_scalar and both taglines), whose list element isn't the scalar, and iana_timezones, where true is a sentinel, not a scalar.

The 3.3 migration guide gets a deprecation entry that says what senders and receivers do, and the 4.0 compatibility page names the removal. The registry entry sits under schema_removals_not_checked: both forms are valid through 3.x, so a 3.x run can't grade which one a party sends.

Generated type names don't change: no title moves, and the branches keep their schemas.

Bundler fix

The creative asset maps reference core/asset-variant.json, which the build hoists into $defs as AssetVariant (x-adcp-hoist). scripts/build-schemas.cjs merged the keys written beside that $ref into the inlined body, so the annotated branch became a second, different schema titled AssetVariant. The hoist refuses two schemas with one name, so 12 bundled roots failed to build, media-buy/create-media-buy-request.json among them. The build printed a warning and exited 0, which is why only the composed test caught it.

The build now keeps the hoisted body as it is and writes the call-site keys beside the reference: {"$ref": "#/$defs/AssetVariant", "deprecated": true, ...}, the form the provenance hoist already writes. All 124 bundles build. Against the merge base, 21 bundles change, by annotation keys only: $refs, $defs, and structure are the same. tests/build-schemas-hoist-marked.test.cjs covers both a lone annotated reference and the shared case.

A failed bundle now fails the build. scripts/build-schemas.cjs keeps building the other roots, lists every root that failed with its error, and exits 1. An unresolvable $ref, an extension or storyboard file that doesn't parse, and an extension without valid_from also fail the build; before, the build skipped each one. The storyboard matrix (scripts/run-storyboards-matrix.sh) stops when the schema or compliance build fails, instead of grading what the build left behind. tests/build-schemas-exit-status.test.cjs runs the build with --root on a small fixture tree where two roots collide and checks that it lists both and exits 1.

Proof

The equivalence check (proposed in #9119) compares the canonical form of every published root at the merge base and at the head. Its canonical form drops deprecated, description and x-*.

Compared Roots compared Roots that differ Verdict
15a4371c64 vs merge base b4c40fcb85 1,112 0 identical canonical forms; 302 informational entries at 38 sites (the annotations, in every root that inlines them)

No root differs, so no corpus instance can change verdict and the PR needs no delta manifest.

Reproduce, from a checkout of the tool:

node scripts/schema-equivalence/cli.cjs --base $(git merge-base origin/main <branch>) --head <branch> --corpus

CI

"Generate Python SDK" fails on main since #9049, which adds a second postal_area property (reporting-dimension-systems.json). The generator now numbers the postal union's classes PostalArea40 | PostalArea41 instead of PostalArea1 | PostalArea2, with the same structure. The SDK's fix_postal_union_arm_order matches the old text and raises "unexpected outer union shape". #9141 fails the same way, and this PR changes no postal schema.

Refs #8477

…unions

17 positions accept a value or a non-empty array of the same value. A
one-item array says the same as the single value, and every 3.x release
accepts it, so the scalar branch is marked deprecated at each one:
deprecated: true, x-deprecated-in 3.3.0, and a description that says to
send the array.

16 positions carry x-removed-in 4.0.0 and are listed in the 4.0
compatibility registry under schema_removals_not_checked. The brand.json
color_value carries x-removed-in 5.0.0, because brand.json is read
without version negotiation, so a 4.0 reader can still meet a file
written for 3.x.

The 3.3 migration guide and the 4.0 compatibility page say what senders
and receivers do. Annotations only: no payload validates differently.

Refs adcontextprotocol#8477
@mintlify

mintlify Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit ec973f4.

Approve preview

@aao-secretariat aao-secretariat Bot added the ladon/needs-human-review Ladon has escalated this PR for human review. label Nov 20, 2026

@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 12 files under static/schemas/source/**, which are under a hard, deterministic approval gate (gated_paths: true). The required review_decision is REVIEW_REQUIRED, not APPROVED, so per decision rule row 2 the gate is not satisfied and the outcome must be escalate.

The reviewer found the change clean: an annotation-only deprecation (#8477) adding deprecated/x-deprecated-in: 3.3.0/x-removed-in markers to the scalar branches of 17 scalar-or-list unions. Array branches are untouched, no payload validates differently, counts reconcile across changeset (17), migration doc (17), and v4-compatibility.mdx, and a correct patch changeset is present. No Critical/High/Medium findings. This is a non-breaking, editorial/normative deprecation — not a breaking-class change.

Despite the clean diff, the schema-source approval gate stands until a human/CODEOWNERS review is recorded.

Escalation reasons

  • Touches gated path static/schemas/source/** (12 files, e.g. static/schemas/source/brand.json, static/schemas/source/core/creative-manifest.json) and review_decision is REVIEW_REQUIRED — human/CODEOWNERS approval required before merge.

Why human review

  • Gated paths: 12 files under static/schemas/source/** modified while review_decision is REVIEW_REQUIRED (not APPROVED) — human/CODEOWNERS approval required.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/brand.json (modified) matches static/schemas/source/**; static/schemas/source/brand/get-brand-identity-response.json (modified) matches static/schemas/source/**; static/schemas/source/core/audience-characteristic.json (modified) matches static/schemas/source/**; static/schemas/source/core/creative-asset.json (modified) matches static/schemas/source/**; static/schemas/source/core/creative-assets.json (modified) matches static/schemas/source/**; static/schemas/source/core/creative-localization-readback.json (modified) matches static/schemas/source/**; static/schemas/source/core/creative-localization.json (modified) matches static/schemas/source/**; static/schemas/source/core/creative-manifest.json (modified) matches static/schemas/source/**; static/schemas/source/creative/list-creatives-response.json (modified) matches static/schemas/source/**; static/schemas/source/error-details/requote-required.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buys-request.json (modified) matches static/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.

@aao-secretariat
aao-secretariat Bot requested a review from bokelley November 20, 2026 02:04
The bundler inlines a $ref by merging the target into the referencing
object, so keys written beside the $ref land inside the inlined body.
For a schema marked x-adcp-hoist that body is the named type: the
deprecated single-value branch of the creative asset maps,
{ "$ref": ".../asset-union.json", "deprecated": true, "description": ... },
became a second, different schema titled AssetVariant. hoistMarkedSchemas
refused the duplicate title, so 14 request and response bundles, among
them create-media-buy-request, failed to build. A lone annotated site
would instead have become the canonical AssetVariant, deprecation and
all.

resolveRefs now keeps the target body intact when the target is marked
and the call-site has sibling keys, and hoistMarkedSchemas writes the
call-site as { "$ref": "#/$defs/<Title>", ...siblings }. That is the
form the source uses and the form hoistBySourceIdentity already writes
for provenance. Bundles keep one AssetVariant entry, and the
annotations stay on the single-value branch.

This is a build fix, not a schema fix. Annotations beside a $ref are
the repo's convention (demographics, provenance), and moving them onto
an allOf wrapper would make the 17 unions inconsistent to work around
the bundler. Unmarked targets merge as before: compared with
b4c40fc, the only bundle changes are the new deprecated,
x-deprecated-in, x-removed-in, and description keys.

@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-paths hard approval gate not satisfied.

This PR modifies 12 files under static/schemas/source/**, which is a hard, non-overridable approval gate. The current review_decision is REVIEW_REQUIRED, not APPROVED, so Ladon cannot auto-approve regardless of how clean the diff is (decision table row 2).

Escalation reasons

  • 12 files under static/schemas/source/** are modified while review_decision is REVIEW_REQUIRED (not APPROVED) — human/CODEOWNERS approval required before merge.

Review notes (no blocking findings)
The reviewer's subsequent pass is clean: the delta is limited to the bundler fix in scripts/build-schemas.cjs and its new test. The x-adcp-hoist-target deferral and collapseHoistTargets correctly keep one canonical $defs entry and place call-site keys beside a local $ref rather than forging a duplicate titled copy — the right fix for the prior silent build failure. Pass ordering and hoisted/un-hoisted branches are correct; lone-ref and shared-use cases are tested. No critical/high/medium findings surfaced.

The prior decision was also escalate for the same gated-paths reason; nothing has changed on the approval status, so the gate persists. The moment a human/CODEOWNERS approval is recorded (review_decision: APPROVED), this clean diff can fall through to approve.

Why human review

  • 12 files under static/schemas/source/** modified while review_decision is REVIEW_REQUIRED (not APPROVED) — human/CODEOWNERS approval required (gated paths hard gate).
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/brand.json (modified) matches static/schemas/source/**; static/schemas/source/brand/get-brand-identity-response.json (modified) matches static/schemas/source/**; static/schemas/source/core/audience-characteristic.json (modified) matches static/schemas/source/**; static/schemas/source/core/creative-asset.json (modified) matches static/schemas/source/**; static/schemas/source/core/creative-assets.json (modified) matches static/schemas/source/**; static/schemas/source/core/creative-localization-readback.json (modified) matches static/schemas/source/**; static/schemas/source/core/creative-localization.json (modified) matches static/schemas/source/**; static/schemas/source/core/creative-manifest.json (modified) matches static/schemas/source/**; static/schemas/source/creative/list-creatives-response.json (modified) matches static/schemas/source/**; static/schemas/source/error-details/requote-required.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buys-request.json (modified) matches static/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.

The build printed a warning for each root that failed to bundle and
exited 0, so CI could not see the failure. It now keeps bundling the
other roots, lists every failure with its error, and exits 1 without
recording a build stamp.

The build also fails, instead of skipping, on a $ref it cannot resolve,
an extension that does not parse or lacks valid_from, and a storyboard
that does not parse.
run-storyboards-matrix.sh runs without `set -e`, so a failed schema or
compliance build went on to grade storyboards against whatever partial
output the build left behind. The matrix now exits 1 when either build
fails, and when extracting, copying, or patching the 3.0 compatibility
bundle fails or its adcp_version cannot be read, since each leaves the
run testing the wrong inputs.
The exit-status test copied the whole source tree and ran the full
124-bundle build twice, 8 to 35 seconds of setup. build-schemas.cjs now
takes `--root <dir>` to build another tree with the same layout; without
it the build reads and writes this repository as before, byte for byte.
A build of another tree skips the build lock and stamp, which belong to
this repository's dist/schemas/latest, and the MCP projection is skipped
when the manifest has no tools. The test builds a two-root fixture and
runs in under a second.

@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 paths require human/CODEOWNERS approval.

This PR modifies 12 files under static/schemas/source/**, a hard, non-overridable approval gate (gated_paths: true), while the current GitHub review_decision is REVIEW_REQUIRED (not APPROVED). Per decision rule row 2, the outcome must be escalate regardless of how clean the diff is. The prior decision was also escalate for the same reason.

The reviewer reported a clean pass with no critical/high/medium findings. The delta hardens scripts/build-schemas.cjs from fail-open to fail-closed (parse/ref/bundle errors now throw, bundle failures aggregated, --root fixture path fenced by BUILDS_THIS_REPOSITORY), with shell matrix || exit 1 guards and tests covering exit-0/exit-1/fail-fast. Schema-source changes were clean on the prior pass. Changeset present (.changeset/deprecate-scalar-or-list-single-value.md).

Escalation reasons

  • 12 files under static/schemas/source/** modified while review_decision is REVIEW_REQUIRED (not APPROVED) — human/CODEOWNERS approval required (gated-paths hard gate). Gated files include brand.json, brand/get-brand-identity-response.json, core/audience-characteristic.json, core/creative-asset.json, core/creative-assets.json, core/creative-localization-readback.json, core/creative-localization.json, core/creative-manifest.json, creative/list-creatives-response.json, error-details/requote-required.json, media-buy/get-media-buy-delivery-request.json, media-buy/get-media-buys-request.json.

The gate lifts automatically once review_decision becomes APPROVED; no code issues are blocking this PR.

Why human review

  • 12 files under static/schemas/source/** modified while review_decision is REVIEW_REQUIRED (not APPROVED) — human/CODEOWNERS approval required (gated-paths hard gate). Gated files: brand.json, brand/get-brand-identity-response.json, core/audience-characteristic.json, core/creative-asset.json, core/creative-assets.json, core/creative-localization-readback.json, core/creative-localization.json, core/creative-manifest.json, creative/list-creatives-response.json, error-details/requote-required.json, media-buy/get-media-buy-delivery-request.json, media-buy/get-media-buys-request.json.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/brand.json (modified) matches static/schemas/source/**; static/schemas/source/brand/get-brand-identity-response.json (modified) matches static/schemas/source/**; static/schemas/source/core/audience-characteristic.json (modified) matches static/schemas/source/**; static/schemas/source/core/creative-asset.json (modified) matches static/schemas/source/**; static/schemas/source/core/creative-assets.json (modified) matches static/schemas/source/**; static/schemas/source/core/creative-localization-readback.json (modified) matches static/schemas/source/**; static/schemas/source/core/creative-localization.json (modified) matches static/schemas/source/**; static/schemas/source/core/creative-manifest.json (modified) matches static/schemas/source/**; static/schemas/source/creative/list-creatives-response.json (modified) matches static/schemas/source/**; static/schemas/source/error-details/requote-required.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buy-delivery-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/get-media-buys-request.json (modified) matches static/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.

bokelley and others added 3 commits November 21, 2026 12:42
Resolve package.json: keep this branch's test:build-schemas-exit-status
script and main's test:release-workflow (adds gnu-runner-tools).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
hoistDuplicateInlineEnums seeded the $defs body from the first inline
occurrence of a duplicated enum. When that occurrence was a $ref with
call-site annotations (the deprecated single-value branch of
status_filter), resolveRefs had merged `deprecated`, `x-deprecated-in`,
`x-removed-in` and the deprecation description into it, so
$defs.MediaBuyStatus became deprecated and the call-site a bare $ref.

The body now comes from an occurrence without call-site annotations;
an annotation every occurrence shares stays part of the enum. An
annotated occurrence keeps its annotations, and its description when it
differs, beside the $ref, as hoistMarkedSchemas does. Unannotated
occurrences still become a bare $ref. Validation is unchanged.

The same fix moves the pre-existing VASTVersion/DAASTVersion deprecation
in list-creative-formats-response back to the deprecated vast_version
and daast_version call-sites.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The creative asset maps in core/creative-asset.json,
core/creative-manifest.json and list_creatives assets accept an array
only from 3.1, so "every 3.x release accepts a one-item array" was wrong
for them. The migration guide, the v4 compatibility page, the changeset
and those three deprecation descriptions now say to send the array when
the release in use with the counterparty is 3.1 or later and the single
value to a 3.0 peer.

Also: the 3.3 Deprecations intro names the brand.json colors' 5.0
removal, the v4 page lists the seller-emitted single-value sites, and
the page and registry record that brand.json color_value is marked
x-removed-in 5.0.0 and outside the 4.0 registry by design.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@bokelley

Copy link
Copy Markdown
Contributor

@KonstantinMirin — we're taking this into 3.3.0-rc.3 so the 4.0 removal in #8477 has a 3.x deprecation to point at, so I pushed three commits to your branch rather than wait a round-trip:

  • bb11c27d merges main (only conflict: the test:release-workflow line in package.json; kept your test:build-schemas-exit-status and main's gnu-runner-tools addition).
  • 64eacbcf fix(build): keep call-site deprecation off hoisted enums. An independent review found that hoistDuplicateInlineEnums seeded $defs.MediaBuyStatus from the annotated status_filter/oneOf/0 occurrence, so in the two status_filter request bundles the shared enum became deprecated with the deprecation text as its description, and the branch itself lost its marker. The hoist now seeds from an unannotated occurrence and keeps the call-site keys beside the $ref (same form as your marked-hoist path), with four new tests. The same bug already existed on main for VASTVersion/DAASTVersion in list_creative_formats; this fixes those too (76 call-sites regain their markers). Annotation keys only; validation is unchanged.
  • ec973f4c docs(schemas): send a single creative asset to a 3.0 peer. The "every 3.x accepts the array" claim isn't true for the creative asset maps — their array branch first appears in 3.1.0 (checked across dist/schemas/3.0.0–3.0.28). The migration guide, v4 compatibility page, those three schema descriptions and the changeset now say to send the single value to a 3.0 counterparty. Also: the Deprecations intro names the brand.json 5.0 exception, the seller-emitted list includes the new sites, and the v4 registry reason records the 5.0 removal.

The only failing check is Generate Python SDK (the existing postal_area.py union error that also fails on unrelated PRs). Shout if any of this isn't what you intended.

@bokelley bokelley 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.

Approved at ec973f4 for 3.3.0-rc.3. Payload-neutral deprecation of the 17 single-value branches (#8477), verified by an independent review: no validation or generated-type-name change. Review fixes pushed: creative asset maps send the single value to 3.0 peers (array form only from 3.1), and the enum hoist keeps call-site deprecation beside the $ref instead of on the shared $defs type (also fixes the existing VAST/DAAST markers). Only failing check is the pre-existing, non-required Generate Python SDK postal_area.py error seen on unrelated PRs.

@bokelley
bokelley merged commit fe24de8 into adcontextprotocol:main Nov 21, 2026
71 of 72 checks passed
KonstantinMirin added a commit to KonstantinMirin/adcp that referenced this pull request Nov 21, 2026
…contextprotocol#9123)

Brings in adcontextprotocol#9123: the scalar branch of 17 scalar-or-list unions is
deprecated, and build-schemas fails the build on any bundle failure,
unresolvable $ref, unparsable extension or storyboard, keeps call-site
keys beside a $ref to a hoisted schema, and takes --root. The storyboard
matrix stops when a build fails.

Resolution ledger:
- package.json (one hunk, the test script): union. This branch's added
  lints and test:build-cache stay; main's test:build-schemas-exit-status
  is added after test:build-schemas-vendor-metric-uniqueness.
- scripts/run-storyboards-matrix.sh (two hunks): union.
  - The 3.0 bundle copy keeps this branch's temporary directory under
    the queue state directory and adds main's extraction error exit.
  - The current-source builds keep this branch's
    built-schemas.cjs ensure calls, which skip a build whose inputs are
    unchanged, and print main's "schema build failed" and "compliance
    build failed" errors when a build fails.
- tests/run-storyboards-sharding.test.cjs (one hunk): union. Both
  sides' tests stay. Main's build-failure test also copies
  scripts/built-schemas.cjs into its temporary root, because the matrix
  builds through the build cache; the cache finds no stamp there and runs
  the stubbed builds, so both failure cases are still exercised.
- scripts/build-schemas.cjs (seven hunks): union.
  - The parse-once source reads (the documents map, the source cache)
    stay. They're assigned to main's outer refContent, so an
    unresolvable $ref still fails with main's error.
  - Main's failures list, its error lines and the early return for a
    manifest without tools come in.
  - Bundling stays in a worker thread. The worker now returns main's
    failures list instead of an error count, and main() adds every
    bundled directory's failures to bundleFailures before
    assertNoBundleFailures runs. That includes the release-mode latest/
    bundle, whose result this branch had not used.
  - The worker gets its source and output directories passed in, so a
    --root build bundles the --root tree.

Checks on the merge result:
- npm run typecheck: pass.
- SOURCE_DATE_EPOCH=1700000000 node scripts/build-schemas.cjs, in this
  tree and in a checkout of origin/main: the two dist/schemas/latest
  trees are identical over 1,771 files.
- node --test on tests/build-schemas-*.test.cjs,
  tests/run-storyboards-sharding.test.cjs, tests/build-cache.test.cjs
  and tests/v4-compatibility-registry.test.cjs: 146 pass, 0 fail.
- node scripts/precommit-server-unit.cjs --full: 867 files, 14,716
  passed, 31 skipped, the same as before the merge; adcontextprotocol#9123 adds no server
  tests.
@KonstantinMirin

Copy link
Copy Markdown
Collaborator Author

@bokelley 64eacbcfaf fixes the deprecation case, but hoistDuplicateInlineEnums drops the other call-site annotations the same way. After it, 310 of 318 collapsed enum groups in #8536's bundles still lose or gain a description, default, enumDescriptions or x-* (main has 266). For example, get-products-response selection_group_rules[].selection_mode gains default: "optional". Validation is unaffected; codegen and anything that reads default from the bundles get the wrong value.

Two changes on top of yours fix all 318:

  1. Derive the call-site key set from the occurrences, as any annotation key that some occurrence lacks or states differently, instead of the fixed deprecation trio. Keys that every occurrence shares stay in the body, as you have it.
  2. Keep an occurrence's differing description beside its $ref, and drop the body's description when some occurrence has none.

With both, the MCP projection tests pass, the bundles grow 0.5%, and one expectation changes: "an unannotated occurrence with its own description still becomes a bare $ref". The diff is five lines; I can push it to this branch or open a separate PR, whichever you prefer.

KonstantinMirin added a commit to KonstantinMirin/adcp that referenced this pull request Nov 22, 2026
…-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.
KonstantinMirin added a commit to KonstantinMirin/adcp that referenced this pull request Nov 22, 2026
Brings in 3 commits from main: adcontextprotocol#9123 (deprecates the single-value
branch of 17 scalar-or-list unions and fixes the bundler so call-site
keys beside a $ref stay at the call site), adcontextprotocol#9169 (training agent
inventory floors) and adcontextprotocol#9171 (PROPOSAL_TERMS_CHANGED for a mismatched
accept_proposal digest).

Resolution ledger

Mechanical files, resolved by rule:
- package.json (conflicted): the test list keeps both sides' entries,
  test:schema-named-constraints from this branch and
  test:build-schemas-exit-status from main. 119 entries, each defined.
- tests/mcp-schema-projection.test.cjs (auto-merged, failed the gate):
  the parity compile limit is the measured comply_test_controller
  projection rounded up to the next 1,000 bytes. Main's deprecation
  descriptions and the new error code bring main's controller from
  1,350,376 to 1,351,064 bytes; this branch's named schemas still add
  79,135, so the merged controller measures 1,430,199 and the limit
  moves from 1,430,000 to 1,431,000.

Semantic files, union of both sides:
- brand.json color_value, brand/get-brand-identity-response.json
  colors (5 sites), error-details/requote-required.json envelope_field:
  this branch's $ref to core/hex-color.json or
  #/definitions/envelope_field_path is kept, and main's deprecated,
  x-deprecated-in, x-removed-in and deprecation description sit beside
  it on the single-value branch. brand.json keeps x-removed-in 5.0.0;
  the others keep 4.0.0. The referenced definitions carry no
  deprecation, so the array branches and the other sites that reference
  them are not deprecated.
- media-buy/accept-proposal-request.json proposal_terms_digest: this
  branch's $ref to core/proposal-terms-digest.json with main's longer
  description from adcontextprotocol#9171.

Proof:
- Schema equivalence, origin/main -> merge, with the delta manifest:
  3,056 entries at 41 sites and 4,255 informational entries, the same
  as the branch against its previous merge base; the manifest matches,
  41/41 witnesses pass, and no corpus instance changes verdict.
- The annotation channel at source level is the union of both sides:
  each of main's 77 annotation changes (title, description, default,
  deprecated, x-*) lands at the same document and pointer in the merge,
  and each of this branch's 1,636 stays relative to main.
- Bundles: the 81 single-value deprecation nodes in the bundled schemas
  sit at the same pointers with the same keys as main's build, and none
  moves onto a shared definition.
- Inline pattern and enum counts stay at 83 and 471, and the $ref count
  is unchanged.
KonstantinMirin added a commit to KonstantinMirin/adcp that referenced this pull request Nov 22, 2026
Brings in 6 commits from main: adcontextprotocol#9123 (deprecates the single-value form
of the scalar-or-list unions), adcontextprotocol#9169 (training agent inventory floors),
adcontextprotocol#9171 (PROPOSAL_TERMS_CHANGED), adcontextprotocol#9170 (not-guards that resolve 11
overlapping oneOf unions, with tests/oneof-overlap-resolution.test.cjs),
adcontextprotocol#9141 (3.3.0-rc.3 version packages) and adcontextprotocol#9176 (rc.3 docs snapshot).

Resolution ledger:
- package.json (conflicted): test:schemas keeps both sides' entries,
  the two equivalence tests from this branch and
  tests/oneof-overlap-resolution.test.cjs from main, at main's
  position. Main's test:build-schemas-exit-status auto-merged. Every
  test file it names exists. The version (3.3.0-rc.3) is main's.
- package-lock.json: main's (version field only).
- Invariants: no code change needed. The oneof check at the merged
  tree reports 223 reachable oneOfs, P 219, W 4, U 0, the same as main
  at 14651cc; adcontextprotocol#9170 resolves 12 of the 16 witnessed overlaps
  (main at 2db59ba, after adcontextprotocol#9123, still has 16). The 4 left are the either/or unions adcontextprotocol#9170 leaves for
  adcontextprotocol#8191. The construct catalog still reports its 37 known false
  alarms and no misses, and tests/oneof-overlap-resolution.test.cjs
  passes (38 of 38).
- Proof: schema equivalence of the merged tree against 14651cc:
  1113 roots, 0 differ, class 1, no informational entries.
KonstantinMirin added a commit to KonstantinMirin/adcp that referenced this pull request Nov 22, 2026
Brings in 6 commits from main: adcontextprotocol#9123 (deprecates the single-value form
of the scalar-or-list unions), adcontextprotocol#9169 (training agent inventory floors),
adcontextprotocol#9171 (PROPOSAL_TERMS_CHANGED), adcontextprotocol#9170 (not-guards that resolve 11
overlapping oneOf unions, with tests/oneof-overlap-resolution.test.cjs),
adcontextprotocol#9141 (3.3.0-rc.3 version packages) and adcontextprotocol#9176 (rc.3 docs snapshot).

Resolution ledger:
- package.json (conflicted): test:schemas keeps both sides' entries,
  the five lint tests from this branch and
  tests/oneof-overlap-resolution.test.cjs from main, at main's
  position. Main's test:build-schemas-exit-status auto-merged. Every
  test file it names exists. The version (3.3.0-rc.3) is main's.
- package-lock.json: main's (version field only).
- Baseline: adcontextprotocol#9170's error-branch guards are local refs to #/oneOf/0,
  which the schema-path lint reports as ref-local-not-defs. They are
  main's schemas, so the seven findings are recorded in
  scripts/lint-schema-paths-baseline.json with --update-baseline
  rather than changed here:
  - adagents.json#/oneOf/1/not/$ref
  - content-standards/{calibrate-content,create-content-standards,
    get-content-standards,get-media-buy-artifacts,
    list-content-standards,validate-content-delivery}-response.json
    #/oneOf/1/not/$ref
  Schema paths go from 593 to 600. The other four lints are unchanged:
  enum values 58, property names 820, value lists 24,
  x-adcp-validation 337.
- Proof: schema equivalence against 14651cc: 1113 roots, 0 differ,
  class 1; 158 informational x-adcp-validation entries at 18 sites,
  as before.
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.

2 participants