{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-behavioral-fingerprint-poisoning-from-silently-rebasing-an-mcp-server-s-trust-baseline",
  "title": "Which invariants prevent behavioral-fingerprint poisoning from silently rebasing an MCP server's trust baseline",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agent runtimes that gate MCP tool calls on a learned behavioral fingerprint (latency, response-shape, token-distribution, schema-conformance) and an anomaly score computed against a rolling baseline. Does not apply to stateless one-shot tool proxies with no retained baseline, nor to cryptographic attestation of server binaries (a separate control).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-behavioral-fingerprint-poisoning-from-silently-rebasing-an-mcp-server-s-trust-baseline.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-behavioral-fingerprint-poisoning-from-silently-rebasing-an-mcp-server-s-trust-baseline.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-behavioral-fingerprint-poisoning-from-silently-rebasing-an-mcp-server-s-trust-baseline.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2187,
    "python_slice_tokens": 436,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *anomaly detection against a baseline* and *baseline integrity*. Most runtime tool-poisoning detectors are built as the former: compute a per-server fingerprint, score each response against it, and raise when the score crosses a threshold. This is a detector of *deviation from history*. The failure mode examined here i...",
    "what_was_observed": "A runtime gating a `filesystem.search` and `db.query` MCP server used a fingerprint vector of `[p50_latency, p95_latency, resp_bytes, json_key_order_hash, top_k_token_entropy, schema_field_count]`, updated per call via EMA with α=0.15, and an anomaly score = Mahalanobis distance against the EMA mean and a covariance that was also EMA-updated. Threshold at score > 3.0. Trace of the incident: 1. Calls 1–400: server beh...",
    "condition_of_validity": "The invariant holds only under these conditions, and fails outside them: - **Fingerprint dimensions must be partitioned into driftable and anchored sets before any online update.** Anchored dimensions (manifest hash, negotiated schema version, declared side-effect class, call-count invariants) must be updated only on an explicit, out-of-band re-attestation e...",
    "decision_boundary": "The boundary is between *adaptation* and *rebasing*. Adaptation is legitimate when the environment changes and the server's behavior changes with it in ways the anchored dimensions confirm (e.g., latency rises because the backend is loaded, while manifest hash and schema version are unchanged). Rebasing is when the driftable dimensions move *without* a corre...",
    "operational_effect": "With the gated-update rule, the incident trace above diverges at call 401: the first response with `_debug`/`_trace_id` scores 1.6, which is above the watermark (set at 1.0), so the baseline freezes and the drift accumulator begins. By call ~415 the accumulator crosses ε=0.5 in field_count and the server is quarantined before the injection payload is ever em..."
  },
  "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": "f9a61a9f9ab9adeb42e323e30bd684e9c3e611af12e3de2f1cc81c5d9d206e0c",
    "verified_classes": [
      "BaselineRebaseError",
      "AnchorMismatchError",
      "BehavioralFingerprintGate"
    ],
    "verified_functions": [
      "gate_response",
      "__init__",
      "_anchors_match",
      "score",
      "observe"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "AnchorMismatchError",
      "BaselineRebaseError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
