feat: resolve dependencies on the remaining conversation mint sites + e2e suite - #1944
Open
serguei-gorokhov wants to merge 2 commits into
Open
serguei-gorokhov wants to merge 2 commits into
serguei-gorokhov wants to merge 2 commits into
Conversation
… e2e suite ResolveResourceDependenciesFn now runs in the same chain position on the Anthropic Messages and Responses API entry points, completing the v1 mint-site coverage (route/feature/MCP/interceptor/deploy sites remain a documented v1 limitation — an app invoked through those surfaces gets no dependency grants in v1). ResourceDependencyApiTest covers the v1 checklist as test cases: the consented flow, required-without-consent failing the call explicitly, optional-without-consent degrading silently (target stays off-limits), withdrawal stopping the run immediately, declaration change invalidating the grant (content binding), public-target grants following the originating user's own reach exactly (pointer semantics, D-04), and the audit events carrying app, targets, access types, user and trace id. Spec: documentation repo, offline-access-delegation/implementation-specs/pr5-mint-sites-and-e2e.md Co-Authored-By: Claude Code <noreply@anthropic.com>
…rants Whole-branch review follow-up to the resolution commit — three real defects and a defense-in-depth gap, all in the composed behavior: - The timing guard threw IllegalStateException on every hop that arrives with a per-request key — which is the normal state for an interceptor's final call back to a declaring app (breaking even the root user request) and for every chained call into one (400/500 on all three interfaces). Resolution is now honestly root-call-only: hops under a per-request key are skipped — callable, just without grants — because the originating user's reach is not evaluable under a key context (buildUserBucket flips to the parent app's bucket). Chained composition (design §7.1) is recorded as phase-2 machinery. - The perRequestReceivers[app] half of the bake never propagated on plain chained calls (child mints copy only their own receiver entry) and served no reachable flow — removed; the grant lives solely in the key's own shared map. - The placeholder type segment now enforces the validator's PERSONAL_TYPED_ROOTS vocabulary (constant made public, shared): ResourceTypes.of() maps internal engine types, so a current-user/credentials/ declaration from a config-file or admin-authored app could otherwise resolve into the user's secret-bearing blobs. - Grants bake with union semantics — two records sharing a target combine rights instead of overwriting each other; malformed concrete paths raise RuntimeException shapes that are now caught (unresolvable, never a crash); target permission lookups are batched into one rule-chain walk; consent is checked before any resolution work; the audit's access-type join tolerates null elements. New e2e: a chained call into a declaring app stays callable without receiving grants (the case the old guard broke). Co-Authored-By: Claude Code <noreply@anthropic.com>
serguei-gorokhov
requested review from
Oleksii-Klimov and
astsiapanay
as code owners
September 9, 2026 18:41
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.
Applicable issues
Description of changes
This story deliberately folds two halves into one PR — the mixed diff is intentional (the whole-branch review hardening commit is chronologically adjacent to the mint-site commit); reviewers should assess both.
Half 1 — mint-site coverage on the conversation APIs (
ad900889).ResolveResourceDependenciesFnnow runs in the same chain position on the Anthropic Messages (MessagesBaseController.prepareUpstreamRoute) and Responses (ResponsesController.handleRequestBody) entry points, completing the v1 conversation mint-site coverage (route/feature/deploy sites remain a documented v1 limitation — an app invoked through those surfaces gets no dependency grants in v1).ResourceDependencyApiTestcovers the v1 checklist as test cases: the consented flow, required-without-consent failing the call explicitly, optional-without-consent degrading silently, withdrawal stopping the run immediately, declaration change invalidating the grant (content binding), public-target grants following the originating user's own reach exactly, and audit events carrying app, targets, user and trace id (the grant line also carries access types).Half 2 — whole-branch review hardening (
2a40b3f6). Three real defects and a defense-in-depth gap, all in the composed behavior:IllegalStateExceptionon every hop that arrives with a per-request key — the normal state for an interceptor's final call back to a declaring app (breaking even the root user request) and for every chained call into one (400/500 on all three interfaces). Resolution is now honestly root-call-only: hops under a per-request key are skipped — callable, just without grants — because the originating user's reach is not evaluable under a key context (buildUserBucketflips to the parent app's bucket). Chained composition is recorded as phase-2 machinery.PERSONAL_TYPED_ROOTSvocabulary (constant made public, shared):ResourceTypes.of()maps internal engine types, so acurrent-user/credentials/declaration from a config-file or admin-authored app could otherwise resolve into the user's secret-bearing blobs.RuntimeExceptionshapes that are now caught (unresolvable, never a crash); target permission lookups are batched into one rule-chain walk; consent is checked before any resolution work; the audit's access-type join tolerates null elements. TheperRequestReceivers[app]half of the bake — which never propagated on plain chained calls and served no reachable flow — is removed; the grant lives solely in the key's own shared map.New e2e: a chained call into a declaring app stays callable without receiving grants (the case the old guard broke).
Behavior changes flagged for review
credentials,keys, …) are no longer resolvable via the placeholder, whoever authored the app.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
🤖 Generated with Claude Code