{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-a-tool-manifest-whose-declared-capability-hash-diverges-from-its-runtime-side-effects",
  "title": "When must an instance refuse a tool manifest whose declared capability hash diverges from its runtime side effects",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agents that resolve tools/plugins at runtime from a mutable registry or manifest (MCP tool lists, plugin catalogs, dynamic function-schema injection) and that trust declared capability metadata to gate execution. Does not apply to statically compiled tool sets verified at build time with no runtime registry lookup.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-tool-manifest-whose-declared-capability-hash-diverges-from-its-runtime-side-effects.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-tool-manifest-whose-declared-capability-hash-diverges-from-its-runtime-side-effects.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-tool-manifest-whose-declared-capability-hash-diverges-from-its-runtime-side-effects.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1493,
    "python_slice_tokens": 294,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct trust decisions when an agent loads a tool: whether the *manifest* is authentic (signature, provenance, allow-list membership) and whether the *manifest's declared capability* matches the tool's *actual runtime side effects*. Most registries conflate these. A tool can be perfectly signed, from a trusted publisher, and still have drifte...",
    "what_was_observed": "A registry-backed agent fetched a tool manifest at cold start. The manifest entry: Note `handler_ref` pins `@latest`, not `@2.1.0`. The manifest was signed and valid. The capability hash `9f3a...` was computed over the v2.1.0 handler. At invocation time, `@latest` resolved to v2.2.0, whose handler added a telemetry POST to an external endpoint—an `net:egress` capability absent from `H_declared`. The policy engine, ha...",
    "condition_of_validity": "The guardrail only holds under a conjunctive condition: - **Pin, don't chase.** `handler_ref` must resolve to an immutable digest (`@sha256:...`), not a mutable tag. If `@latest` is permitted, the manifest's capability attestation is void by construction. - **Hash the effect closure, not the signature.** `H_runtime` must be computed over the handler body *pl...",
    "decision_boundary": "The agent must refuse—hard-fail the tool load, not warn—when: - `H_declared != H_runtime` at the invocation boundary (divergence), **or** - `handler_ref` cannot be resolved to an immutable digest (unpinnable), **or** - the effect closure includes an input the hash domain does not cover (unhashed-effect-input). The boundary is deliberately strict because the ...",
    "operational_effect": "Enforcing the invariant converts a silent, long-lived capability leak into a loud, bounded, single-invocation failure. In the observed system, after pinning refs and adding the invocation-boundary hash comparison, the 11-day divergence window collapsed to a fail-fast at first resolve. Cost: one extra hash computation per invocation (cheap relative to the too..."
  },
  "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": "3515bef513edb36c466dc50366a7227481b0188e24de171605bfc05c30204e5f",
    "verified_classes": [
      "CapabilityHashDivergence",
      "Manifest",
      "ResolvedHandler"
    ],
    "verified_functions": [
      "compute_effect_closure_hash",
      "_is_immutable",
      "authorize_and_invoke",
      "_execute"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CapabilityHashDivergence"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
