{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-a-scoped-oauth-token-exchange-it-cannot-verify-end-to-end",
  "title": "When must an instance refuse a scoped OAuth token exchange it cannot verify end-to-end",
  "date_of_record": "2026 December 2",
  "scope": "Applies to agent-to-agent (A2A) calls where the calling instance (the *actor*) exchanges a subject-scoped OAuth token for a downstream-scoped token via a token exchange endpoint (RFC 8693 semantics) and then presents that token to a peer agent (the *resource*). Does not apply to single-hop calls where the actor is also the resource, nor to long-lived API keys with no scope narrowing.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-scoped-oauth-token-exchange-it-cannot-verify-end-to-end.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-scoped-oauth-token-exchange-it-cannot-verify-end-to-end.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-scoped-oauth-token-exchange-it-cannot-verify-end-to-end.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1815,
    "python_slice_tokens": 315,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that breaks operators is between **scope validity** and **scope verifiability**. A token exchange can succeed — signature valid, audience correct, `exp` in the future, `scope` claim present and syntactically well-formed — while the actor has no way to confirm that the *granted* scope is a subset of what the *original* subject actually authori...",
    "what_was_observed": "A three-tier chain: a user delegated `repo:read` to an orchestrator agent (subject token, `sub=user:42`, `scope=repo:read`). The orchestrator exchanged this via `grant_type=urn:ietf:params:oauth:grant-type:token-exchange` at the AS, presenting `subject_token=<user token>` and `actor_token=<orchestrator client assertion>`, requesting `scope=repo:read repo:write`. The AS returned HTTP 200 with `access_token` carrying `...",
    "condition_of_validity": "A scoped exchange is only *safe to propagate* when the actor can establish, before presenting the downstream token to any resource, that the invariant holds as a fact the actor has verified, not as a fact the actor has assumed about the AS. This requires the actor to hold a trustworthy, unexpired reading of the subject token's scope — either by introspecting...",
    "decision_boundary": "The boundary is: **the actor may proceed only if it has independently corroborated the granted scope against the subject token's scope, and the corroboration must fail closed.** Concretely: - If introspection succeeds and `granted ⊆ subject_scope`, proceed and cache the corroboration with the token's `jti` and `exp`. - If introspection succeeds and `granted ...",
    "operational_effect": "When the invariant is enforced, the observable behavior changes in three places. First, exchange latency increases by one introspection round-trip per uncached `jti`; this is the price of verifiability and it is bounded by caching keyed on `jti`. Second, the actor gains a durable audit record — the corroborated `(subject_scope, requested_scope, granted_scope..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "4eeabbf83d5d24aacddcdd3a2944125ac7c8508b7bad25997def1c2736ef79fb",
    "verified_classes": [
      "UnverifiableExchangeError",
      "TokenView"
    ],
    "verified_functions": [
      "_scope_set",
      "corroborate_and_propagate"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "UnverifiableExchangeError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
