feat(schema): migrate prose required-when rules to x-adcp-validation (#3827)#3835
Merged
feat(schema): migrate prose required-when rules to x-adcp-validation (#3827)#3835
Conversation
…3827) Five fields on get_adcp_capabilities gain machine-readable normative constraints that storyboard runners and SDK validators can enforce programmatically. Previously these rules lived only in description prose and required English-parsing to enforce. Fields migrated: - request_signing.required_for — subset_of "request_signing.supported_for" (an operation can't be required without being supported) - request_signing.warn_for — disjoint_with "request_signing.required_for" plus subset_of "request_signing.supported_for" (mutually exclusive with required_for; both subsets of supported) - webhook_signing.supported — verifier_constraints.must_equal_when keyed on media_buy.reporting_delivery_methods including "webhook" or media_buy.content_standards.supports_webhook_delivery being true. Closes a downgrade vector — emitting state-changing webhooks unsigned lets an on-path attacker forge delivery callbacks. - identity.key_origins — verifier_constraints.purpose_anchoring mapping each purpose to the signing posture that must be declared elsewhere on the response (request_signing purpose requires non-empty supported_for/required_for; webhook_signing requires supported:true; governance_signing requires governance in supported_protocols; tmp_signing requires non-empty trusted_match.surfaces). Sub-key vocabulary extended in docs/reference/schema-extensions.mdx: - forbidden_when (inverse of required_when) - disjoint_with (item-level mutual exclusion across array fields) - subset_of (item-level subset constraint across array fields) Excluded as already-enforced-natively: - adcp.idempotency — discriminated oneOf already encodes the replay_ttl_seconds invariant. - webhook_signing.algorithms — enum on each item already enforces the allowlist. Backwards compatibility: strictly additive on the wire. JSON Schema validators ignore unknown x- keys per draft-07. Verifiers that don't read x-adcp-validation continue to work; storyboard runners gain enforceable assertions for invariants that were previously prose-only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 2, 2026
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.
Closes #3827.
Summary
Migrates five rule-bearing fields on
get_adcp_capabilitiesfrom prose-only constraints to machine-readablex-adcp-validationannotations. Storyboard runners and SDK validators can now enforce these invariants programmatically; before this PR, the rules existed only in English description text and required prose-parsing.Fields migrated
request_signing.required_forsubset_ofsupported_forrequest_signing.warn_fordisjoint_with+subset_ofrequired_for; subset ofsupported_forwebhook_signing.supportedverifier_constraints.must_equal_whentruewhen seller advertises mutating-webhook emission viamedia_buy.reporting_delivery_methodsorcontent_standards.supports_webhook_delivery(closes a downgrade vector)identity.key_originsverifier_constraints.purpose_anchoringSub-key vocabulary extended
docs/reference/schema-extensions.mdxnow documents three new sub-keys:forbidden_when(inverse ofrequired_when)disjoint_with(item-level mutual exclusion across array fields)subset_of(item-level subset constraint across array fields)Excluded (already enforced natively)
adcp.idempotency— discriminatedoneOfalready encodes thereplay_ttl_secondsinvariantwebhook_signing.algorithms—enumon each item already enforces the allowlistBackwards compatibility
Strictly additive on the wire. JSON Schema validators ignore unknown
x-keys per draft-07. Verifiers that don't readx-adcp-validationcontinue to work. Storyboard runners that don't yet recognize a sub-key skip it and emit an "unrecognized validation rule" warning per the existing convention.Test plan
npm run build:schemasnpm run test:schemas(7 passed)npm run test:json-schema(255 passed)npm run test:composed(32 passed)🤖 Generated with Claude Code