{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-stop-trusting-a-delegated-aaif-credential-chain-the-depth-versus-intersection-invariant",
  "title": "Where must an instance stop trusting a delegated AAIF credential chain: the depth-versus-intersection invariant",
  "date_of_record": "2026 November 17",
  "scope": "Applies to AAIF (Agent Identity and Authorization Interoperability Framework) delegated credential chains where an agent instance validates a chain of `act` (actor) delegations terminating in a resource-owner grant. Does not apply to single-hop bearer tokens, to chains issued under the same principal without intermediate delegation, or to revocation-only checks (which are a separate invariant).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-stop-trusting-a-delegated-aaif-credential-chain-the-depth-versus-intersection-invariant.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-stop-trusting-a-delegated-aaif-credential-chain-the-depth-versus-intersection-invariant.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-stop-trusting-a-delegated-aaif-credential-chain-the-depth-versus-intersection-invariant.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1694,
    "python_slice_tokens": 222,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious boundary is between two properties that look equivalent and are not: **chain depth** (how many delegation hops exist, bounded by a `max_delegation_depth` policy) and **scope intersection** (the set-theoretic intersection of every hop's granted scopes). A chain can be shallow and still be invalid because a scope was *widened* at an intermediat...",
    "what_was_observed": "In a staging federation of three orchestrators (call them A, B, C) sharing an AAIF trust anchor, the following chain was accepted by the relying party: 1. Resource owner grants agent `A` scope `read:dataset` and `delegate:true`, depth limit 3. 2. `A` delegates to `B` with scope `read:dataset` — correct, monotone narrowing (equal). 3. `B`, whose signing key was compromised in the test, issues a credential to `C` claim...",
    "condition_of_validity": "The invariant holds — i.e., a chain may be trusted — only when all of the following are true simultaneously: - The **signed** delegation depth (count of credentials in the chain, each verifiable against its issuer's key) is ≤ the root grant's `max_delegation_depth`. The `act` claim nesting is treated as advisory metadata, never as the depth source of truth. ...",
    "decision_boundary": "The decision boundary is: **reject on first non-subset hop, before evaluating the leaf request.** Do not accumulate errors and do not \"best-effort\" intersect. The correct control flow is a single left fold from the root that either returns a trusted scope set or raises. Concretely: - If signed depth > `max_delegation_depth` → reject (depth). - If any hop's s...",
    "operational_effect": "The operational consequence is that a compromised or malicious intermediary in a multi-orchestrator federation can escalate scope without ever exceeding the depth limit, and the escalation is invisible to depth-based and leaf-based validators. In the staging run, `C` held `write:dataset` for the duration of the test window across two relying parties before t..."
  },
  "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": "d54749ed5b109416001096a305536689d7c54cddb413b4d358c22245a22b199c",
    "verified_classes": [
      "AAIFChainViolation"
    ],
    "verified_functions": [
      "validate_chain",
      "authorize"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "AAIFChainViolation"
    ],
    "sample_fail_closed_invariants": [
      "empty chain"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
