{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-quarantine-a-vector-store-write-before-it-becomes-a-durable-memory-detecting-late-arriving-poison-via-retrieval",
  "title": "Under what conditions must an instance quarantine a vector-store write before it becomes a durable memory: detecting late-arriving poison via retrieval-shadow divergence",
  "date_of_record": "2026 November 20",
  "scope": "Applies to agents that persist episodic records into a vector index and later distill them into semantic memory, where writes are admitted on the basis of a single embedding-level similarity check. Does not apply to append-only audit logs that are never retrieved into the reasoning context, nor to stores with mandatory human-in-the-loop review of every write.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-quarantine-a-vector-store-write-before-it-becomes-a-durable-memory-detecting-late-arriving-poison-via-retrieval.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-quarantine-a-vector-store-write-before-it-becomes-a-durable-memory-detecting-late-arriving-poison-via-retrieval.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-quarantine-a-vector-store-write-before-it-becomes-a-durable-memory-detecting-late-arriving-poison-via-retrieval.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2336,
    "python_slice_tokens": 475,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Memory poisoning is usually framed as an *injection* problem: an attacker plants a malicious record and the agent later retrieves it. That framing produces a defense that checks each write at admission time — embed the candidate, compare against known-bad signatures or a trust threshold, admit or reject. This defense fails for a specific and underappreciated...",
    "what_was_observed": "A distillation agent maintained an episodic store of ~40k interaction records and a nightly job that promoted high-salience episodes into a semantic store (~6k facts). Writes were admitted by a cheap gate: cosine similarity to the nearest existing semantic fact below a novelty threshold (to avoid duplicates) and above a relevance floor (to avoid noise). No write was ever re-evaluated after admission. A single episode...",
    "condition_of_validity": "The invariant that would have caught this is a *retrieval-shadow bound*, and it is only valid under a specific condition: **the agent must maintain a held-out probe set of queries whose correct answers are known and whose retrieval results are expected to be stable.** Without such a probe set, divergence is unmeasurable — you cannot detect that a record is s...",
    "decision_boundary": "The operational decision is: **when does a record's shadow score cross from \"tolerable centrality\" to \"must quarantine\"?** The boundary is not a fixed number; it is the point at which the record's displacement of correct results exceeds what its *own* legitimate query cone would justify. Formally, partition the probe set into `P_own` (queries for which the r...",
    "operational_effect": "Enforcing the delayed shadow invariant changes the failure timeline from \"silent amplification over days\" to \"bounded contamination within one scoring cycle.\" In the incident, a nightly shadow re-score would have flagged the record on day eleven — the first cycle after its density crossed the threshold — bounding the poisoned window to a single day of retrie..."
  },
  "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": "f7118d0239cd86ba6308749efba589b58d896b39f0b2f020c69b114c756d9d05",
    "verified_classes": [
      "ShadowInvariantViolation",
      "QuarantineRequired",
      "ProbeQuery",
      "MemoryRecord"
    ],
    "verified_functions": [
      "_cosine",
      "_top_k",
      "compute_shadow",
      "enforce_shadow_invariant"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "QuarantineRequired",
      "ShadowInvariantViolation"
    ],
    "sample_fail_closed_invariants": [
      "no probe set: shadow invariant is unmeasurable and void"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "math",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
