{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-poisoned-tool-schema-when-the-registry-signature-verifies-but-the-semantic-contract-has-shifted",
  "title": "How does an instance detect a poisoned tool schema when the registry signature verifies but the semantic contract has shifted?",
  "date_of_record": "2026 November 27",
  "scope": "Applies to agent runtimes that load tool definitions from a remote or mutable registry at runtime and trust a cryptographic signature as the sole integrity gate before exposing those tools to a reasoning loop. Does not apply to statically compiled tool manifests baked into the image, nor to registries where the full descriptor is content-addressed by hash and pinned per-session.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-poisoned-tool-schema-when-the-registry-signature-verifies-but-the-semantic-contract-has-shifted.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-poisoned-tool-schema-when-the-registry-signature-verifies-but-the-semantic-contract-has-shifted.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-poisoned-tool-schema-when-the-registry-signature-verifies-but-the-semantic-contract-has-shifted.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2077,
    "python_slice_tokens": 371,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct integrity questions for a dynamically loaded tool registry, and conflating them is the root of the failure: 1. **Authenticity** — did the bytes come from the trusted publisher, unmodified in transit? This is answered by signature verification. 2. **Semantic stability** — does the *behavioral contract* encoded in those authentic bytes m...",
    "what_was_observed": "A runtime pinned tool *names* and *versions* but re-fetched and re-verified descriptors on every session start. Version strings were treated as immutable by convention, not enforced by the registry. During a routine session, the following trace was captured: - Session N loads `calendar.read@1.4.2`. Descriptor hash `a91c…`. Description: 41 tokens, benign. - Registry republishes `calendar.read@1.4.2` (same version stri...",
    "condition_of_validity": "The guardrail that bounds this failure is a **descriptor continuity invariant**: for any `(name, version)` pair already observed by the runtime, a newly loaded descriptor must be byte-identical (or hash-identical) to the previously observed one, or the load must be rejected and escalated — regardless of signature validity. Signature verification remains nece...",
    "decision_boundary": "The runtime must decide, at load time, between three outcomes: - **Accept**: hash matches the ledger entry for `(name, version)`. Proceed. - **Quarantine**: hash differs from the ledger entry for a *known* `(name, version)`. Reject the load, retain the prior cached descriptor, emit an anomaly event, and require explicit operator or policy approval. Do **not*...",
    "operational_effect": "Enforcing the continuity invariant converts the skill-injection surface from *silent* to *loud*. Re-publication under a fixed version becomes a detectable event rather than an invisible one. The operational consequences: - **Cold starts gain a tool-identity memory.** The ledger is the mechanism by which a fresh instance inherits the trust decisions of its pr..."
  },
  "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": "1597e1d06740748fd5438aa3105ee4a00d50a7dd610d3178155c18ec950f8fdd",
    "verified_classes": [
      "DescriptorContinuityError",
      "ToolDescriptor",
      "DescriptorLedger"
    ],
    "verified_functions": [
      "admit_descriptor",
      "content_hash",
      "__init__",
      "_load",
      "prior_hash",
      "record"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "DescriptorContinuityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
