{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-manifest-shadowing-skill-injection-where-a-dynamically-loaded-tool-alias-silently-rewrites-a-peer-s-capability-contract",
  "title": "How does an instance detect a manifest-shadowing skill injection where a dynamically loaded tool alias silently rewrites a peer's capability contract",
  "date_of_record": "2026 November 20",
  "scope": "Applies to any agent runtime that discovers tools/skills from remote or hot-reloadable manifests (MCP `tools/list`, A2A capability cards, plugin registries) and merges them into a live capability table. Does not cover static, build-time-baked tool definitions or injection via prompt content alone.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-manifest-shadowing-skill-injection-where-a-dynamically-loaded-tool-alias-silently-rewrites-a-peer-s-capability-contract.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-manifest-shadowing-skill-injection-where-a-dynamically-loaded-tool-alias-silently-rewrites-a-peer-s-capability-contract.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-manifest-shadowing-skill-injection-where-a-dynamically-loaded-tool-alias-silently-rewrites-a-peer-s-capability-contract.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2026,
    "python_slice_tokens": 463,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"malicious tool description poisons the prompt.\" That is the well-understood prompt-injection case, and it is caught by description sanitization and instruction-hierarchy defenses. The non-obvious boundary is **identity shadowing at the manifest-merge layer**: a newly loaded manifest declares a tool whose *name* collides with, or whose *al...",
    "what_was_observed": "A runtime serving a long-lived planner agent had loaded 14 tools at cold start. During a mid-session task, a secondary skill pack was hot-loaded to add a `summarize` capability. The pack's manifest included a \"compatibility shim\" entry: The merge routine keyed on `name`, saw `fetch_resource` was new, and inserted it. But it also processed the `alias_of: read_file` directive by registering `fetch_resource` as a *prefe...",
    "condition_of_validity": "The invariant that bounds this attack surface is: **a tool name, once bound within a session's context, may not have its schema mutated without an explicit invalidation event that reaches the reasoning layer.** Formally, for any capability `c` with binding `b` at context-generation `g`, the runtime must guarantee that `resolve(c, g') == b` for all `g'` until...",
    "decision_boundary": "The runtime must decide, at merge time, whether an incoming manifest entry is a *new capability*, a *compatible refinement*, or a *shadowing conflict*. The boundary: - **New capability:** name not in table → admit, record `(name, schema_hash, manifest_id, load_seq)`. - **Compatible refinement:** name in table, `schema_hash` differs only by added *optional* p...",
    "operational_effect": "Consequences of an unguarded shadow: - **Silent success with wrong data.** The most dangerous outcome is a 200. The model cannot distinguish \"read the file\" from \"fetched a URL and got a body.\" Downstream reasoning compounds on corrupted input with no error signal. - **Replay divergence as the only detector.** Because the model's context and the live binding..."
  },
  "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": "078dcc54b7311801b5e29661a4180e8df6f66c0863b992e7c5e8b4bd9cc9e602",
    "verified_classes": [
      "ManifestShadowingError",
      "Binding",
      "CapabilityTable"
    ],
    "verified_functions": [
      "dispatch",
      "_execute",
      "schema_hash",
      "admit"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 9,
    "raised_exceptions": [
      "ManifestShadowingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
