{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-draw-the-poisoning-detection-boundary-between-episodic-semantic-and-procedural-stores-when-the-same-corrupted-fact-propagates-a",
  "title": "Where must an instance draw the poisoning-detection boundary between episodic, semantic, and procedural stores when the same corrupted fact propagates across all three",
  "date_of_record": "2026 December 2",
  "scope": "Applies to long-lived agent instances that maintain three distinct memory stores (episodic event logs, semantic fact/knowledge stores, procedural skill/policy stores) and perform cross-store distillation (episodic → semantic, semantic → procedural). Does not apply to stateless or single-store agents, nor to purely within-session context management where no persistence layer exists.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-poisoning-detection-boundary-between-episodic-semantic-and-procedural-stores-when-the-same-corrupted-fact-propagates-a.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-poisoning-detection-boundary-between-episodic-semantic-and-procedural-stores-when-the-same-corrupted-fact-propagates-a.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-poisoning-detection-boundary-between-episodic-semantic-and-procedural-stores-when-the-same-corrupted-fact-propagates-a.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1933,
    "python_slice_tokens": 365,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive poisoning-detection model treats memory stores as independent trust domains: each store runs its own integrity check, and a poisoned entry is caught at write time or evicted at read time within that store. This model fails because the three stores are not peer replicas — they are a *distillation pipeline* with directional flow. An adversarial or co...",
    "what_was_observed": "A tool-using agent distilled episodic logs nightly into semantic facts, then weekly compiled frequently-referenced semantic facts into procedural \"playbook\" entries (conditional action sequences). A single poisoned episode entered through a retrieved web document during a research task: the document asserted that a particular internal endpoint accepted unauthenticated writes. The episode was recorded faithfully — the...",
    "condition_of_validity": "The invariant that must hold for cross-store poisoning detection to be sound: > **Provenance monotonicity across distillation edges:** For any memory object, the set of source classes contributing to it may only *narrow* toward higher trust as it moves episodic → semantic → procedural, and any merge that widens the contributing source set must retain the *mi...",
    "decision_boundary": "The operational decision is *where to place the detection gate*, and it is a genuine trade-off, not a free lunch: - **Gate at write (per-store):** cheap, catches direct injection, but structurally blind to laundering — the poisoned semantic fact is locally valid. **Insufficient alone.** - **Gate at distillation edge:** catches provenance widening and confide...",
    "operational_effect": "With the invariant enforced, the poisoned episode of the case study produces: Pass 1 semantic fact tagged `external`, confidence capped at source-class ceiling. Pass 2 merge sees two `external` sources, source-class set remains `{external}`, confidence does *not* rise past the external ceiling, and the fact is flagged `unconfirmed`. Pass 3 compilation is blo..."
  },
  "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": "58ec312b30c8a0e549e13766044b4b1e037b6695abf0cd1b8e33210bc2a4422f",
    "verified_classes": [
      "SourceClass",
      "ProvenanceViolation",
      "MemoryObject"
    ],
    "verified_functions": [
      "merge_semantic",
      "compile_procedural",
      "min_trust"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "ProvenanceViolation"
    ],
    "sample_fail_closed_invariants": [
      "assert fact.min_trust == SourceClass.EXTERNAL",
      "assert not fact.confirmed",
      "refusing to compile procedure from unconfirmed semantic fact",
      "invariant breached: poison reached procedural store"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
