{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-silent-capability-widening-when-an-mcp-a2a-gateway-re-derives-tool-schemas-across-heterogeneous-auth-scopes",
  "title": "Which invariants prevent silent capability widening when an MCP→A2A gateway re-derives tool schemas across heterogeneous auth scopes",
  "date_of_record": "2026 November 29",
  "scope": "Applies to stateless protocol gateways that translate MCP `tools/list` + `tools/call` into A2A `message/send` tasks (and vice versa) while fronting legacy REST/SOAP endpoints behind a unified auth-and-rate layer. Does not apply to single-protocol servers, in-process tool routers, or gateways that pass an opaque, pre-negotiated capability blob end-to-end without re-derivation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-capability-widening-when-an-mcp-a2a-gateway-re-derives-tool-schemas-across-heterogeneous-auth-scopes.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-capability-widening-when-an-mcp-a2a-gateway-re-derives-tool-schemas-across-heterogeneous-auth-scopes.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-capability-widening-when-an-mcp-a2a-gateway-re-derives-tool-schemas-across-heterogeneous-auth-scopes.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2286,
    "python_slice_tokens": 376,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The dangerous failure is not a translation *error* — a hard 4xx, a schema mismatch, a rejected call. Those are loud. The dangerous failure is a **translation that succeeds while widening capability**: the gateway emits a downstream call that the caller was never authorized to make, but which is *schema-valid* and *rate-legal*, so nothing in the pipeline rais...",
    "what_was_observed": "A gateway fronting three tool backends (an MCP-native vector store, an A2A document agent, a legacy SOAP archive) unified auth behind a single OIDC service token and a token-bucket rate governor keyed on `(caller_subject, tool_name)`. Under load, three distinct widening traces appeared: 1. **Scope defaulting under schema divergence.** The MCP schema exposed no `scope` field; the A2A agent card required `scope` as a n...",
    "condition_of_validity": "The invariant that must hold is **warrant-subset preservation across every derivation step**: for every downstream call `d` produced from upstream call `u`, `authority(d) ⊆ authority(u)`, where `authority` is the tuple `(subject, scope_set, rate_class, tenant, parameter_domain)`. This invariant is *only* checkable if the gateway retains the upstream warrant ...",
    "decision_boundary": "The gateway must make an explicit, per-call decision at the emission boundary, and the decision must be one of exactly three outcomes — never a silent fourth: - **Pass**: `authority(d) ⊆ authority(u)` verified against the caller's warrant object; downstream call emitted with the caller's subject attached (or a signed derivation of it). - **Constrain**: the s...",
    "operational_effect": "With the invariant enforced, the observable behavior changes in three ways. First, MCP-originated calls to the A2A agent that previously ran under `scope=\"*\"` now either carry the caller's actual scope or are rejected with `WarrantSubsetViolation` — the vector store's result set shrinks to the caller's authorized partition, which is the *correct* result and ..."
  },
  "matched_failure_symptoms": [
    "SCHEMA_DRIFT_OR_COERCION_CRASH"
  ],
  "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": "235abd1bd04b0c0bb7b1864c387c4ae4b53b3a3ed969cc92f7212187902d0298",
    "verified_classes": [
      "WarrantSubsetViolation",
      "UngovernableBackend",
      "Warrant",
      "DerivedCall"
    ],
    "verified_functions": [
      "derive_downstream",
      "emit",
      "dominates"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "UngovernableBackend",
      "WarrantSubsetViolation"
    ],
    "sample_fail_closed_invariants": [
      "live agent card is wider than cached card; fail-closed on tightening"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
