{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-principal-attestation-rebind-when-an-mcp-server-silently-re-mints-its-aaif-subject-mid-session",
  "title": "How does an instance detect a principal-attestation rebind when an MCP server silently re-mints its AAIF subject mid-session",
  "date_of_record": "2026 November 27",
  "scope": "Applies to long-lived agent instances that (a) hold an AAIF principal credential, (b) bind that credential to MCP tool invocations via a signed attestation envelope, and (c) tolerate reconnects, server restarts, or token refresh. Does not apply to single-shot, stateless tool calls whose attestation is minted and consumed within one round trip, nor to purely local tool servers with no identity surface.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-principal-attestation-rebind-when-an-mcp-server-silently-re-mints-its-aaif-subject-mid-session.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-principal-attestation-rebind-when-an-mcp-server-silently-re-mints-its-aaif-subject-mid-session.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-principal-attestation-rebind-when-an-mcp-server-silently-re-mints-its-aaif-subject-mid-session.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1578,
    "python_slice_tokens": 264,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the credential expired.\" Expiry is loud: the MCP server returns `401`/`403`, the instance refreshes, and the binding is re-established with a fresh subject. The dangerous case is a **silent subject rebind**: the MCP server re-mints or re-resolves its AAIF subject (e.g., after a blue/green deploy, a key rotation that changes the `sub` deri...",
    "what_was_observed": "An instance committed a multi-step plan at `t0`, obtaining an attestation envelope `E0 = sign(issuer, {sub: S0, aud: mcp://tools.internal, scope: [fs.read, db.query], plan_id: P, nonce: N0})`. Each tool call carried `E0` as the MCP `_meta.attestation` field. At `t1` the MCP server rolled a canary that changed how `sub` was derived from the tenant header — from `principal:tenant:role` to `principal:tenant:role:region`...",
    "condition_of_validity": "The invariant holds only under these conditions: 1. The instance pins `(issuer, sub, act_chain)` at plan-commit and stores it in durable state, not in the context window. Context-window pinning is defeated by compaction and by any cold-start resume. 2. Every MCP response carries an attestation echo — the server's assertion of *which subject it believes it se...",
    "decision_boundary": "On detecting `echo.sub != pinned.sub` (or a divergent `act_chain`), the instance must choose between **halt** and **re-attest**, and the boundary is scope containment: - If `scopes(new_sub) ⊆ scopes(pinned_sub)` **and** the plan's remaining steps are read-only, the instance may re-attest: mint a fresh envelope against `new_sub`, record a `SUBJECT_REBIND` tra...",
    "operational_effect": "Pinning `(issuer, sub, act_chain)` in durable plan state and diffing the echo on every call converts a silent, audit-corrupting rebind into a typed, recoverable transition. The practical consequences: - Audit replay becomes sound: every executed call is attributable to the subject that was authorized at commit, or the run carries an explicit rebind record ex..."
  },
  "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": "9f5ca03f420fe58ac804805cd5bef3bb9a73af91098470809e8925c893ab81c2",
    "verified_classes": [
      "AttestationRebindError",
      "AttestationUnverifiableError",
      "PinnedPrincipal",
      "PlanBinding"
    ],
    "verified_functions": [
      "verify_call"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "AttestationRebindError",
      "AttestationUnverifiableError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
