{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-semantic-cache-poisoning-in-speculative-tool-call-deduplication-across-agent-swarms",
  "title": "What structural signals indicate semantic-cache poisoning in speculative tool-call deduplication across agent swarms",
  "date_of_record": "2026 November 23",
  "scope": "Applies to swarms where multiple agents share a semantic cache keyed on embedded tool-call intents (not exact argument bytes) and speculatively replay cached results to skip redundant execution. Does not apply to per-agent private caches with byte-exact keying or to caches whose entries are never shared across agent identity boundaries.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-semantic-cache-poisoning-in-speculative-tool-call-deduplication-across-agent-swarms.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-semantic-cache-poisoning-in-speculative-tool-call-deduplication-across-agent-swarms.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-semantic-cache-poisoning-in-speculative-tool-call-deduplication-across-agent-swarms.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1526,
    "python_slice_tokens": 247,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A semantic deduplication cache answers the question *\"have I seen a call that means the same thing?\"* A speculative execution cache answers the question *\"can I return this prior result instead of running the tool?\"* These are different invariants. Deduplication only needs intent equivalence to be *useful*; speculative replay needs intent equivalence to be *...",
    "what_was_observed": "A swarm of 40 worker agents shared a semantic tool-call cache fronting a `query_inventory(sku, region, as_of)` tool. The cache key was the embedding of the natural-language intent plus a coarse tool name; the value stored the full result plus a `context_hash` covering `(tool_version, region, as_of_bucket)`. Trigger condition: an agent requested inventory for SKU `A-4471` in `region=EU`, `as_of=2025-06-10`. Its intent...",
    "condition_of_validity": "Semantic speculative caching is sound **only** when all three of the following hold simultaneously: - **Equivalence gate is conjunctive, not disjunctive.** A cache hit requires *both* intent similarity above threshold *and* exact `context_hash` match (tool version, argument bindings that affect output, and world-state epoch). Similarity alone is a dedup sign...",
    "decision_boundary": "The boundary is between **degrading to a miss** and **degrading to a guess**. On `context_hash` mismatch the only sound options are: 1. **Invalidate and execute** — correct, costs latency. 2. **Return a typed `CacheContextMismatch` to the caller** — correct, forces the agent to decide (re-execute, or explicitly accept a lower-trust answer). Returning the cac...",
    "operational_effect": "Enforcing the conjunctive gate and typed mismatch raised the cache-miss rate from 66% to 71% (the tuned-away 34%→5% delta was almost entirely soft misses that were *wrong*). But it eliminated the cross-region contamination class entirely: no agent ever wrote a foreign-context result into episodic memory as authoritative. The auditor's consensus check became ..."
  },
  "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": "55d0896c50ab00625c60aebde39fd77d1c96302375b029f0ba9f518a68f77630",
    "verified_classes": [
      "CacheContextMismatch",
      "Provenance",
      "CacheEntry"
    ],
    "verified_functions": [
      "resolve_speculative",
      "swarm_serve",
      "covers"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CacheContextMismatch"
    ],
    "sample_fail_closed_invariants": [
      "no candidate entry; must execute tool"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
