Repository navigation
fix(schemas): constrain asset requirements, mcp_resource_uri, and registry documents - #9174
Conversation
…quirements
offering-asset-constraint.json referenced asset-requirements.json, a
12-branch anyOf in which every branch accepts {}, so asset_requirements
accepted any object whatever its asset_type said. The union's own
description says the applicable schema is determined by the sibling
asset_type field.
Add one if/then rule per asset type that has a requirements schema,
following the pairing core/format.json already uses. The union stays
referenced, so the five asset types without a requirements schema keep
it and no URL changes.
Refs adcontextprotocol#8476
The field carries an MCP resource URI such as ui://si/session-abc123. format: uri accepts any scheme, as core/app-item.json deep_link_url already relies on for custom app schemes, and refuses values with no scheme. The description now says the value is not limited to http(s). deep_link in si-ui-element.json stays a plain string: the SI chat protocol's own app handoff example uses "flights/boston", a path with no scheme, which format: uri would refuse. Refs adcontextprotocol#8924
core/asset-group-vocabulary.json, core/format-shape-vocabulary.json, creative/asset-types/index.json, and extensions/index.json declare $schema but state no keyword, so each is the empty schema and admits every JSON value. Follow registries/v1-canonical-mapping.json, a registry that states type and properties for its own data: each document now states type: object and the shape of its entries, and validates against itself. The build copies the schema keywords from the extensions placeholder into the generated registry. No URL changes. The roots require no property yet, because a new required name is not additive in a minor release. Closes adcontextprotocol#9104
The equivalence check merges a schema split across allOf members, so it reports the first asset_type rule in offering-asset-constraint.json as if and then keywords at allOf/0 rather than as an added allOf member. Rewrite those manifest lines to match. Refs adcontextprotocol#8476
…heck reports it The equivalence check now folds an integer's exclusiveMinimum: 0 into minimum: 1, so the image rule's then line in asset-requirements-by-asset-type.yaml no longer matched the reported difference. Both forms accept the same integers. With this line the manifest matches all 76 entries at 33 sites, and 33 of 33 witnesses pass.
…holder The build now reads the schema keywords of the generated extensions/index.json from the source placeholder, so a source tree without that file fails with ENOENT before it reaches the bundling step the test checks. Every real source tree has the placeholder; the fixture gets an empty one. Refs adcontextprotocol#9104
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 path change requires human/CODEOWNERS approval.
This PR modifies protocol source under static/schemas/source/**, which is under a hard, deterministic 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 lands.
No blocking findings exist. The reviewer found the change to be a clean schema-tightening across three witnessed changesets (#8476, #8924, #9104), all patch with matching .schema-deltas/*.yaml Ajv witnesses (direction: tighten), schema↔docs coherent, correct changeset classification, and no oneOf discriminator regression. On the merits this would otherwise approve — the gate is procedural, not quality-driven.
Escalation reasons
- Modifies gated protocol-source files under
static/schemas/source/**(asset-group-vocabulary.json, format-shape-vocabulary.json, requirements/asset-requirements.json, requirements/offering-asset-constraint.json, creative/asset-types/index.json, extensions/index.json, sponsored-intelligence/si-send-message-response.json) whilereview_decisionisREVIEW_REQUIRED. Human/CODEOWNERS approval required to satisfy the hard approval gate.
Why human review
- Gated paths touched (static/schemas/source/**) with review_decision=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/asset-group-vocabulary.json (modified) matches
static/schemas/source/**; static/schemas/source/core/format-shape-vocabulary.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/requirements/asset-requirements.json (modified) matchesstatic/schemas/source/**; static/schemas/source/core/requirements/offering-asset-constraint.json (modified) matchesstatic/schemas/source/**; static/schemas/source/creative/asset-types/index.json (modified) matchesstatic/schemas/source/**; static/schemas/source/extensions/index.json (modified) matchesstatic/schemas/source/**; static/schemas/source/sponsored-intelligence/si-send-message-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.
…tries Brings in 3 commits from main: 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, tests/registry-documents-self-schema.test.cjs from this branch and tests/oneof-overlap-resolution.test.cjs from main, at main's position. Every test file it names exists. The version (3.3.0-rc.3) is main's. - package-lock.json: main's (version field only). - Interaction with adcontextprotocol#9170: this branch changes none of the files adcontextprotocol#9170 touched, nor the files its guards refer to. tests/oneof-overlap-resolution.test.cjs passes on the merged tree (38 of 38). Proof: schema equivalence against 14651cc with --manifest auto --corpus --witness: 1113 roots, 8 differ, 68 entries at 27 sites, the same as against 2db59ba; the three manifests match exactly, 27/27 witnesses pass, no corpus verdict changes, no informational entries. verify-build: PASS.
…tries Resolution: - tests/build-schemas-exit-status.test.cjs: main's version, which builds its fixture with tests/helpers/build-schemas-fixture.cjs (adcontextprotocol#9167). - tests/helpers/build-schemas-fixture.cjs: the shared fixture gets this branch's extension registry placeholder (d42f0db), because the build here reads extensions/index.json from source. The two hoist tests that share the helper need it too.
Revised 2026-11-22: merged with
mainat14651cc07c(#9170); the proof compares against it, and the manifests still match exactly.Revised 2026-11-23: The Python SDK job passes again, so its CI note is gone.
This PR makes three groups of schemas accept only what their own descriptions already say. I split it from #9124 at @bokelley's request, so each part gets its own ruling. #9124 keeps the either/or union guards for 4.0.
Each change is a tightening that no schema example, docs payload, storyboard sample, or example file in the repo depends on. The delta manifests under
.schema-deltas/list every difference with a witness payload.Closes #8476
Closes #9104
Refs #8924
asset_requirementsfollows itsasset_type(#8476)core/requirements/offering-asset-constraint.jsonreferencedasset-requirements.json, a 12-branchanyOfin which every branch accepts{}, soasset_requirementsaccepted any object. That document's description already says "The applicable schema is determined by the sibling asset_type field." The parent now carries oneif/thenrule per asset type that has a requirements schema, the same pairingcore/format.jsonuses. The union stays referenced, sozip,brief,video_brief,catalog, andpublished_postkeep it, and no URL changes. Theoffering_asset_constraintsexamples indocs/creative/catalogs.mdxstay valid.mcp_resource_uristatesformat: uri(#8924)The value is a URI such as
ui://si/session-abc123.format: uriaccepts any scheme, whichcore/app-item.jsondeep_link_urlalready relies on for custom app schemes. The description now says the value is not limited to http or https.deep_linkinsi-ui-element.jsonstays a plain string: the SI chat protocol's own app handoff example (docs/sponsored-intelligence/si-chat-protocol.mdx) sends"deep_link": "flights/boston", a path with no scheme, whichformat: urirefuses.Registry documents describe their own data (#9104)
core/asset-group-vocabulary.json,core/format-shape-vocabulary.json,creative/asset-types/index.json, andextensions/index.jsondeclared$schemaand no keyword, so each admitted every JSON value. Followingregistries/v1-canonical-mapping.json, each document now statestype: objectand the schema of its entries, and validates against itself. The build copies these keywords from the extensions placeholder into the generatedextensions/index.json. The roots require no property yet, because a new required name is not additive in a minor release (lint:additive-minor).tests/registry-documents-self-schema.test.cjschecks that each registry, including the generated one, validates against itself and refuses non-objects.Proof
The schema equivalence check (proposed in #9119) compares every published root at
main14651cc07cand at the head:No unbound probe value hits a changed site.
verify-buildfinds no semantic difference between the source and the built tree. The check treats everyindex.jsonas a registry, so the self-schema test coverscreative/asset-types/index.jsonandextensions/index.json. No message schema$refs any of the four registry documents.The manifests and witnesses are the same as in #9124, minus its union lines.
Merge order
extensions/index.jsonstates the minor-version pattern^\d+\.\d+$inline forvalid_fromandvalid_until. Whichever PR merges second replaces each with"$ref": "/schemas/core/adcp-minor-version.json"and keeps the description.extensions/index.json. This PR adds it to the fixture intests/build-schemas-exit-status.test.cjs, which feat(schemas): deprecate the single-value form of the scalar-or-list unions #9123 brought tomain. fix(build): keep call-site annotations on hoisted enums, and hoist inside definitions #9167 moves that fixture totests/helpers/build-schemas-fixture.cjs, without the file. Whichever of the two merges second adds it there.test:schemasinpackage.json, and this branch's merge withmainkeeps both.