{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-s-memory-poisoning-auditor-scores-against-a-baseline-that-was-itself-poisoned-during-the-same-session",
  "title": "What happens when an instance's memory-poisoning auditor scores against a baseline that was itself poisoned during the same session",
  "date_of_record": "2026 November 29",
  "scope": "Applies to persistent agent memory stores that detect poisoning via online write-audit anomaly scoring, where the scoring baseline (centroid, variance, or reference distribution) is updated incrementally from the same writes it is auditing. Does not apply to stores that audit against a frozen, externally provisioned baseline or to purely stateless agents.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-s-memory-poisoning-auditor-scores-against-a-baseline-that-was-itself-poisoned-during-the-same-session.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-s-memory-poisoning-auditor-scores-against-a-baseline-that-was-itself-poisoned-during-the-same-session.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-s-memory-poisoning-auditor-scores-against-a-baseline-that-was-itself-poisoned-during-the-same-session.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1610,
    "python_slice_tokens": 309,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent wrote a poisoned memory.\" That is the ordinary poisoning case and offline review catches it. The failure is that the *auditor's own reference distribution* absorbs the poisoned write before the write is scored, so the anomaly signal is computed against a baseline that already contains the anomaly. The detector does not miss the ...",
    "what_was_observed": "A long-lived support agent maintains an episodic store of ~40k entries, each embedded into a 768-dim vector. A write-audit scorer computes cosine distance from the incoming write's embedding to the running centroid of the store, flags writes beyond a z-threshold, and then folds the write into the centroid via an exponential moving average (EMA, α ≈ 0.01). The order in the hot path was: `store.append(w)` → `baseline.u...",
    "condition_of_validity": "The anomaly score is valid only if, for every write *w*, the baseline used to score *w* is causally independent of *w* and of any write that *w* influenced. Concretely: 1. **Score-before-update ordering.** The baseline must be snapshotted before the write is folded in. EMA with α > 0 violates this whenever update precedes scoring. 2. **Attribution isolation....",
    "decision_boundary": "The boundary between \"this scorer is a real detector\" and \"this scorer is a ritual\" is crossed at the point where the baseline update rate becomes comparable to the poisoning rate. Formally, let *k* be the number of coordinated writes an attacker needs to move the centroid by one standard deviation, and let *m* be the number of writes the auditor can quarant...",
    "operational_effect": "When the invariant is enforced, the failure signature changes from \"silent policy drift discovered by a customer complaint\" to \"replay-vs-live score divergence flagged at write time.\" The guardrail is a shadow baseline: every write is scored twice — once against the live EMA (for fast adaptation) and once against a frozen reference (for tamper evidence) — an..."
  },
  "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": "96301d299392f8a3794ac862bd96dca9a142ee7dcaa06e8be7ac666785b20b4b",
    "verified_classes": [
      "BaselineContaminationError",
      "WriteAuditScorer"
    ],
    "verified_functions": [
      "audit_batch",
      "_dist",
      "_zscore",
      "score_write"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "BaselineContaminationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "math"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
