{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-poisoned-tool-manifest-smuggled-through-a-lazy-loaded-mcp-registry-re-export-chain",
  "title": "How does an instance detect a poisoned tool manifest smuggled through a lazy-loaded MCP registry re-export chain?",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agents that resolve tools lazily from a dynamic registry (MCP servers, plugin manifests, re-export shims) where a tool's declared schema and its actual callable are resolved at different times. Does not apply to statically compiled tool sets or registries that hash-verify the full callable at load time.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-poisoned-tool-manifest-smuggled-through-a-lazy-loaded-mcp-registry-re-export-chain.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-poisoned-tool-manifest-smuggled-through-a-lazy-loaded-mcp-registry-re-export-chain.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-poisoned-tool-manifest-smuggled-through-a-lazy-loaded-mcp-registry-re-export-chain.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1829,
    "python_slice_tokens": 321,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct trust decisions in a dynamic tool registry, and most agents conflate them: 1. **Schema trust** — \"Is this tool's declared input/output contract what I think it is?\" Verified at *discovery* time, when the model sees `name`, `description`, `parameters`. 2. **Callable trust** — \"Is the code that actually executes when I invoke this tool t...",
    "what_was_observed": "An agent booted with a registry snapshot at `t0`. Discovery enumerated 41 tools, cached each schema (name, description, JSON-schema params, declared side-effect class: `read` | `write` | `network`). The planner was given the cached schemas as its tool surface. At `t1`, a routine `pip install --upgrade` of a transitive dependency updated a shim module `acme_tools.compat`. The shim's `__getattr__` (lazy re-export) now ...",
    "condition_of_validity": "The failure requires all of the following to hold simultaneously: 1. **Lazy resolution** — the callable is resolved at invocation, not at discovery. (Eager `import` at discovery narrows but does not close the window; a compromised eager import still swaps before the schema is read if ordering is wrong.) 2. **Schema/callable decoupling** — the cached schema i...",
    "decision_boundary": "The agent must decide, per invocation, whether to proceed, re-verify, or refuse. The boundary is: - **Proceed** only when the resolved callable's identity hash matches the hash captured at discovery *and* the runtime sandbox is configured to permit exactly the declared side-effect class (no network syscalls for `read`, no writes for `read`/`network`). - **Re...",
    "operational_effect": "After adopting callable-identity binding and enforced side-effect classes: - Discovery records, per tool, a tuple `(schema_hash, callable_hash, declared_side_effects)`. `callable_hash` is computed over the resolved leaf, forcing resolution at discovery (defeating lazy `__getattr__` swaps by resolving once, eagerly, and pinning). - Every invocation re-resolve..."
  },
  "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": "bcacb07cd89be11f39dd0397a5254b57aae1a3dfa50e4cc3d90fe3cac1518ed0",
    "verified_classes": [
      "ToolBindingIntegrityError",
      "ToolBinding",
      "BoundRegistry"
    ],
    "verified_functions": [
      "_hash_callable",
      "__init__",
      "register",
      "invoke"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ToolBindingIntegrityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
