Repository navigation
fix(identity): one delegation-chain rule for demand-side grants - #1817
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ports adcontextprotocol/adcp#8473 to TrustGrantEvaluator: implicit authority when account.operator and the signer's operator are each the brand or its house; at most two grants from the house's record, every covering first grant a candidate, account.operator the brand, house or first grantee; an unreadable intermediary is an outage only when no chain authorizes; exclusive_grants is exhaustive whatever the scope. Adds GrantAuthorization.source. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bokelley
marked this pull request as ready for review
November 2, 2026 18:33
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — clean port of adcp#8473 (single delegation-chain rule for demand-side grants) into TrustGrantEvaluator.
What I checked:
- trust.py delegation logic (~84 net lines):
first_links()groups covering first grants by registrable grantee under the account.operator-on-chain constraint; concurrent intermediary fetch bounded bySemaphore(8); firsts recomputed at post-fetch decision time; outage consulted only when no chain authorizes (fail-closed toSERVICE_UNAVAILABLE);exclusive_grantsnow exhaustive across scopes. - Public-API/semver:
sourceis an additive optional field;fix:prefix is correct and the behavior shift is documented in the PR body and migration doc. No public-export removal/rename/required→optional flip, so nofeat!:/BREAKING CHANGE:needed. - Tests: 48 hash-pinned vendored delegation-chain vectors with full outcome coverage plus three targeted unit tests. CI gates stay armed — no disabled tests, no blanket ignores.
Risk assessment: high_risk is true only because src/adcp/signing/trust.py matches src/adcp/signing/** as a (modified) file. Per the risk rules, a modification with no medium-or-higher finding is presumed safe — not an escalation trigger on the flag alone. gated_paths is false, no author-team gate, no prior decision.
No blocking or medium findings. Decision table rows 1–8 do not fire; falls through to row 9.
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.
Ports the spec erratum adcontextprotocol/adcp#8473 (one delegation-chain rule for demand-side grants, erratum to ratified R6) to
TrustGrantEvaluator, and vendors its cross-SDK vectors. Mirrors adcontextprotocol/adcp-client#3452.Rule changes (
src/adcp/signing/trust.py)account.operatorand the signer's operator are each the brand or its house, in any combination. The new cases are a brand account with the house as signer, and a house account with the brand as signer.account.operatormust be the brand, the house, or the first grant's grantee. Every covering first grant is a candidate, where before only the grant toaccount.operatorwas. Distinct intermediary records are read concurrently, at most 8 at a time. An unreadable intermediary counts as an outage (SERVICE_UNAVAILABLE) only when no other chain authorizes.exclusive_grants: trueon the house's record now makesgrants[]exhaustive whatever the scope. Before, it applied only to the scopes some grant named. Without the flag, an uncovered claim goes toseller_authorization.GrantAuthorization.source("implicit","trust","seller"or"legacy";Nonewhen denied), matchingresult.sourcein TS.Behavior changes for adopters
exclusive_grantsrecord whose grants name only other scopes now denies withgrant_absentinstead of deferring toseller_authorization.test_an_operator_outside_the_brand_and_its_house_still_needs_a_grantis updated to match.Vectors
tests/fixtures/delegation-chains/delegation-chains.jsonholds all 48 vectors fromstatic/test-vectors/delegation-chains.jsonat adcp merge commitd397b8ea(the #8473 merge, unchanged on main since).PINNED.jsonrecords the commit and content sha256, and a test checks the hash. The content is identical to the TS SDK's vendored copy, which differs only in formatting. Against the previous implementation, 26 of 48 vectors fail.Tests
tests/test_delegation_chain_vectors.py: one test per vector, plus checks for outcome coverage and the pinned hash.tests/test_experimental_identity.py: an unreadable intermediary next to an authorizing chain, the outage-only case, andexclusive_grantsregardless of scope.🤖 Generated with Claude Code