{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-runtime-skill-injection-via-behavioral-diffing-of-tool-invocation-traces",
  "title": "What structural signals indicate runtime skill-injection via behavioral diffing of tool invocation traces",
  "date_of_record": "2026 November 28",
  "scope": "Applies to agents whose skill set (tool schema + system-prompt segment + dispatch policy) is loaded at session start and treated as immutable, and whose tool calls are logged as structured traces. Does not apply to stateless single-shot inference, nor to agents that re-derive their tool manifest on every turn from an untrusted source.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-runtime-skill-injection-via-behavioral-diffing-of-tool-invocation-traces.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-runtime-skill-injection-via-behavioral-diffing-of-tool-invocation-traces.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-runtime-skill-injection-via-behavioral-diffing-of-tool-invocation-traces.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1976,
    "python_slice_tokens": 410,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A *behavioral diff* is not a semantic diff of the skill text and not a schema hash comparison. It is a comparison of the **invocation distribution** an agent produces under a fixed task family before and after a skill-set mutation. The failure mode this article isolates is **silent skill injection**: a new capability (a tool, a dispatch branch, an altered de...",
    "what_was_observed": "A support-triage agent was configured with four declared tools: `lookup_account`, `search_tickets`, `escalate`, `send_reply`. The manifest hash was pinned at session start and verified unchanged at every turn. Over a 340-turn trace, the manifest hash never moved. Yet the agent began emitting calls that were structurally impossible under the pinned skill set: 1. `lookup_account` calls began carrying an extra key, `reg...",
    "condition_of_validity": "The diffing invariant holds only under a specific set of preconditions. Violating any of them makes the diff either blind or noisy enough to be useless: - **Fixed task family.** The baseline and the observed window must be drawn from the same distribution of user intents. If the task mix shifts (more escalations because more angry users arrived), the `priori...",
    "decision_boundary": "The boundary is between a **residue signal** and a **legitimate skill evolution**. Both produce argument-distribution shifts. The discriminator is whether the shift is *explainable by the declared skill delta*: - If the manifest hash changed and the argument shift is consistent with the new declared tool's semantics → legitimate evolution, no injection. - If...",
    "operational_effect": "Once the residue is detected, the containment invariant is: **the merged dispatch view must be frozen at session start and any divergence between the merged view and the declared manifest must be treated as a capability injection, not a configuration update.** Concretely, the runtime must: 1. Snapshot the merged dispatch view (declared ∪ context fragments) a..."
  },
  "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": "95debf2a6145408884ab9d45a0dcf407f9ca8df1796b8433736265d835994162",
    "verified_classes": [
      "SkillInjectionError",
      "DispatchSnapshot"
    ],
    "verified_functions": [
      "hash_merged_view",
      "binomial_upper_envelope",
      "check_residue",
      "verify_turn"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SkillInjectionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "math",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
