{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-accept-a-poisoned-memory-write-when-its-own-audit-trail-already-contains-the-contradiction",
  "title": "Why does an instance accept a poisoned memory write when its own audit trail already contains the contradiction?",
  "date_of_record": "2026 November 28",
  "scope": "Applies to any long-lived agent that performs self-directed memory mutation (episodic append, semantic consolidation, or key-value overwrite) under a write-audit trail, where anomaly scoring is computed over the mutation stream rather than over individual reads. Does not apply to read-only retrieval caches, nor to memory stores where every write is human-gated synchronously.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-accept-a-poisoned-memory-write-when-its-own-audit-trail-already-contains-the-contradiction.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-accept-a-poisoned-memory-write-when-its-own-audit-trail-already-contains-the-contradiction.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-accept-a-poisoned-memory-write-when-its-own-audit-trail-already-contains-the-contradiction.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2172,
    "python_slice_tokens": 453,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different ways an audit trail can fail to defend a memory store, and they are routinely conflated: 1. **Detection failure** — the anomaly scorer never fires because the poisoned write looks locally normal. 2. **Adjudication failure** — the scorer *does* fire, the anomaly is logged, and the write is still committed because the mutat...",
    "what_was_observed": "A consolidation agent (\"distiller\") ran nightly over an episodic store, summarizing clusters of recent tool-call traces into semantic memory entries. Each semantic write emitted an audit record: `{op: \"upsert\", key, old_value_hash, new_value_hash, source_episode_ids, ts, agent_id}`. A separate scorer consumed the audit stream and computed a per-write anomaly score from three features: (a) divergence between `new_valu...",
    "condition_of_validity": "Anomaly scoring on memory mutations is a *preventive* control only under all of the following: - **Atomic coupling.** The mutation, its audit record emission, and the score evaluation occur within one transaction (or the mutation is staged, scored, then promoted). If commit precedes scoring, the control is detective only. - **Synchronous provenance availabil...",
    "decision_boundary": "The operational decision is not \"should we score mutations\" — you should. The decision is **where the score sits relative to durability**: - If the mutation store can stage writes (two-phase: `stage → score → promote`), put the scorer between stage and promote and treat a score above threshold as a hard `promote` rejection with the record retained in quarant...",
    "operational_effect": "After wiring the scorer onto the commit path (stage/score/promote with a 90ms scoring budget and a quarantine table), the same injected-episode replay was blocked pre-commit: the write was quarantined at score `0.71`, the planning agent retrieved the prior correct policy, and the trail recorded a `rejected` disposition rather than a live contradiction. The c..."
  },
  "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": "10ef0b6e382ea4ad097b7fd225e4b6d3e98c1bc2184817ddcfda97ef6d5a7af9",
    "verified_classes": [
      "AuditCouplingError",
      "Disposition",
      "AuditRecord",
      "StagedMutation",
      "CoupledMemoryWriter"
    ],
    "verified_functions": [
      "__init__",
      "_score",
      "stage_and_commit",
      "assert_coupled"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "AuditCouplingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
