Repository navigation
fix(adagents): validator requires authorization_type per v3 schema - #4477
Merged
Merged
Conversation
Every authorized_agents[] entry must declare authorization_type plus the
matching non-empty selector (property_ids, property_tags, properties for
inline_properties, publisher_properties, signal_ids, signal_tags) —
that's the v3 schema's oneOf invariant. Files that omitted it (e.g.
wonderstruck.org's bare {url, authorized_for} entries) used to return
valid:true while downstream resolvers correctly read them as
unauthorized, so publishers saw "valid" while buyers saw "agent not
authorized." Per-entry errors now name the missing field and list the
valid selector enums.
Also updates the /adagents Quick Start example (which was on a stale
schema and was the source publishers copy from) and the reference docs
to flag authorization_type as required. Closes #4476.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
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.
Summary
AdAgentsManager.validateAgentnow enforces the v3 schema's oneOf invariant on everyauthorized_agents[]entry:authorization_typeplus a non-empty matching selector (property_ids,property_tags,propertiesforinline_properties,publisher_properties,signal_ids,signal_tags).authorized_agents[0].authorization_type) and list the valid selector enums, so publishers can locate and fix the gap./adagentsQuick Start example was on a stale schema (publisher_domainat root,authorized_foras an array, noauthorization_type) — replaced with a v3-correct example.docs/governance/property/adagents.mdxfield reference flipsauthorization_typefrom "optional" to "required" with the selector-pairing rule called out.Before this change, files like wonderstruck.org's adagents.json (and Raptive's, and others') returned
valid: truefrom the online validator — while the Python and TS SDKs correctly read the entries as unauthorized. Publishers saw "valid" and assumed they were done; buyers saw "agent not authorized." The validator was the source of the disagreement.Closes #4476.
Test plan
vitest run tests/unit/adagents-manager.test.ts— 92/92 pass, including three new tests covering: the exact wonderstruck.org repro,authorization_typepresent without selector, and selector present as empty array.authorization_typeon the manager-served manifest so those tests still exercise the scope-rejection path rather than failing at structural validation./adagentslanding page renders the new Quick Start example correctly.🤖 Generated with Claude Code