{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-quarantine-a-retrieved-memory-chunk-whose-poisoning-is-only-visible-through-cross-chunk-contradiction",
  "title": "When must an instance quarantine a retrieved memory chunk whose poisoning is only visible through cross-chunk contradiction",
  "date_of_record": "2026 November 26",
  "scope": "Applies to RAG-augmented agents that retrieve multiple chunks per turn from a shared or externally-writable memory index and act on the union of those chunks. Does not apply to single-chunk retrieval with a trusted, write-controlled corpus, nor to purely parametric recall.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-retrieved-memory-chunk-whose-poisoning-is-only-visible-through-cross-chunk-contradiction.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-retrieved-memory-chunk-whose-poisoning-is-only-visible-through-cross-chunk-contradiction.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-retrieved-memory-chunk-whose-poisoning-is-only-visible-through-cross-chunk-contradiction.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2195,
    "python_slice_tokens": 726,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The dominant retrieval-poisoning defense treats each retrieved chunk as an independent object to be scored: perplexity filters, provenance allowlists, embedding-anomaly detectors, and instruction-pattern scanners all assign a per-chunk verdict. These defenses fail against a specific adversary class: **chunks that are individually benign and individually cons...",
    "what_was_observed": "An agent with a persistent episodic memory store (write access granted to a subordinate summarization agent, which itself ingests untrusted tool output) answered a rotation-policy question. Retrieval returned five chunks. Four agreed: 30-day rotation, sourced from a runbook chunk with a stable provenance hash. One chunk—call it `C_p`—asserted 90 days, sourced from a \"notes\" chunk written 11 days prior by the summariz...",
    "condition_of_validity": "The quarantine invariant holds—i.e., cross-chunk contradiction detection is both *necessary* and *sufficient* to catch this class—only under these conditions: - **Co-retrieval is guaranteed.** The contradiction can only be detected if both `C_p` and at least one authoritative chunk survive into the comparison stage. This requires that fusion *not* truncate b...",
    "decision_boundary": "The agent must quarantine rather than resolve when **cross-chunk contradiction is detected AND the contradicting chunks cannot be ranked by an authority signal independent of retrieval score.** Concretely: - If `C_p` contradicts `C_1..C_4` and corroboration count favors `C_1..C_4` (4 vs 1) with comparable provenance tiers → quarantine `C_p`, proceed on the m...",
    "operational_effect": "Imposing this invariant changes the fusion architecture: consistency-checking must run on the pre-rerank candidate set, before score-weighted truncation evicts the corroborating majority. This costs context—you must hold `k` candidates, not `n`—and it costs a pairwise entailment pass whose complexity is quadratic in `k`. In exchange, it closes the specific h..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "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": "67051a88e0bc274612701f0b8de74fe7b056b40ee53a72fe18863d72eb40c04e",
    "verified_classes": [
      "RetrievalPoisoningError",
      "Chunk"
    ],
    "verified_functions": [
      "_independent_corroboration",
      "quarantine_contradictions",
      "fuse_after_quarantine",
      "_demo",
      "__post_init__",
      "oracle"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "AssertionError",
      "RetrievalPoisoningError"
    ],
    "sample_fail_closed_invariants": [
      "assert all((c.chunk_id != 'p1' for c in kept))",
      "balanced contradiction must not resolve by score"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
