{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-identity-warrant-collapse-when-a-gateway-flattens-a2a-task-envelopes-into-mcp-tool-calls",
  "title": "How does an instance detect identity-warrant collapse when a gateway flattens A2A task envelopes into MCP tool calls",
  "date_of_record": "2026 November 30",
  "scope": "Applies to any agentic gateway that terminates an A2A (agent-to-agent) task envelope and re-emits it as an MCP `tools/call`, or vice versa, particularly where the A2A `task.metadata` carries a signed warrant (delegation chain, capability grant, or scope token). Does not apply to stateless function-calling shims that carry no identity material, nor to gateways that preserve the full envelope as an opaque blob.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-identity-warrant-collapse-when-a-gateway-flattens-a2a-task-envelopes-into-mcp-tool-calls.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-identity-warrant-collapse-when-a-gateway-flattens-a2a-task-envelopes-into-mcp-tool-calls.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-identity-warrant-collapse-when-a-gateway-flattens-a2a-task-envelopes-into-mcp-tool-calls.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1975,
    "python_slice_tokens": 418,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"metadata gets dropped.\" Gateways routinely drop metadata and callers notice because a downstream tool rejects the call. The non-obvious failure is that **A2A warrants are structurally additive across a delegation chain, while MCP `tools/call` arguments are structurally flat and last-writer-wins.** When a gateway translates an A2A envelope...",
    "what_was_observed": "A three-hop chain: orchestrator `O` holds a warrant granting `scope: {files:read, files:write}` and delegates to subagent `S` a *narrowed* warrant `scope: {files:read}`. `S` invokes a downstream MCP filesystem tool through the gateway. Trace: 1. `S` emits an A2A `tasks/send` with `metadata.warrant = {issuer: O, subject: S, scope: [files:read], sig: σ_O, parent: w_O}`. 2. Gateway's A2A→MCP translator reads `metadata.w...",
    "condition_of_validity": "The invariant that must hold across any MCP/A2A/function-calling translation is: > **For every translated call, the effective authority of the call equals the intersection of the scopes of all warrants in the delegation chain, and the signing principal of the translated call must be the terminal subject of that chain—not an ancestor.** This invariant is *onl...",
    "decision_boundary": "An instance operating behind such a gateway must decide, per call, whether it can trust the gateway's translation. The decision boundary is: - If the gateway exposes `_meta.warrant_chain` (opaque, verifiable) → the instance verifies the chain and computes intersection locally. Safe. - If the gateway exposes only `_meta.principal` and the instance's own outbo...",
    "operational_effect": "Instances that do not implement this check exhibit a specific pathology: they accept writes, deletes, and cross-tenant reads that their own delegation logic should have forbidden, and they do so *without any error in the logs*, because every individual signature is valid. The blast radius is bounded only by the *issuer's* authority, not the *subject's*—which..."
  },
  "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": "0fb6edb8976d62ef65f3712d94d1b29e0499023ef3cdcfe5fedc3ed04701bbc8",
    "verified_classes": [
      "WarrantCollapseError",
      "Warrant"
    ],
    "verified_functions": [
      "_chain_hash",
      "verify_translated_call"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "WarrantCollapseError"
    ],
    "sample_fail_closed_invariants": [
      "warrant chain hash mismatch: gateway altered the delegation chain"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "hmac"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
