{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-reject-a-tool-registry-manifest-whose-declared-capability-hash-diverges-from-its-post-load-runtime-schema-and-how-d",
  "title": "In what scenarios must an instance reject a tool-registry manifest whose declared capability hash diverges from its post-load runtime schema, and how does skill injection exploit the gap?",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agents that resolve tools via a declarative manifest (name, description, JSON schema, capability hash) and then load an executable handler whose actual parameter surface is re-derived at runtime. Does not apply to statically linked toolsets where the manifest is compiled into the same artifact as the handler.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-reject-a-tool-registry-manifest-whose-declared-capability-hash-diverges-from-its-post-load-runtime-schema-and-how-d.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-reject-a-tool-registry-manifest-whose-declared-capability-hash-diverges-from-its-post-load-runtime-schema-and-how-d.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-reject-a-tool-registry-manifest-whose-declared-capability-hash-diverges-from-its-post-load-runtime-schema-and-how-d.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1911,
    "python_slice_tokens": 317,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The dangerous boundary is not \"malicious tool code\" versus \"trusted tool code.\" It is **manifest-time capability attestation** versus **runtime schema reality**. A registry manifest is a signed-or-trusted *claim* about what a tool accepts and does. The loaded handler is the *fact*. Skill injection lives precisely in the seam where the orchestrator reasons ov...",
    "what_was_observed": "A tool entry `doc_index.search` declared: The loader resolved the handler by name from a plugin directory scanned at startup. During a rolling deploy, the handler file was replaced with a newer build that had added a `path` parameter (an internal debugging affordance) and — critically — changed `limit` handling to accept a string that it `eval`'d for range expressions. The manifest was **not** re-emitted because the ...",
    "condition_of_validity": "The manifest-is-authoritative invariant holds only when all three of the following are true: 1. **Identity binding.** `capability_hash` is computed over the handler's *runtime-derived* parameter schema (post-parse, post-default-injection), not over the manifest's declared schema. If the hash is of the declaration, it attests nothing about execution. 2. **Loa...",
    "decision_boundary": "Reject the manifest — do not merely log — when: - `runtime_schema_hash(handler) != manifest.capability_hash`. This is the primary tripwire. A mismatch means the artifact you are about to expose to the model is not the artifact the manifest describes. - The runtime schema accepts a parameter the manifest does not declare. Undeclared-accepted parameters are th...",
    "operational_effect": "The practical consequence is that **pre-dispatch validation is only as trustworthy as the binding between manifest and handler.** An agent that validates against a stale or divergent manifest is running a validator that approves and rejects on the wrong criteria. In the benign direction this causes spurious escalations and wasted retries; in the adversarial ..."
  },
  "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": "f97661b9e454c0529a87981668b271c4efe43c554cb1b2bdefd97f2a6d7e4918",
    "verified_classes": [
      "ManifestSchemaDivergence",
      "Manifest"
    ],
    "verified_functions": [
      "runtime_schema_hash",
      "verify_binding",
      "load_tool"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ManifestSchemaDivergence"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
