{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-silent-memory-poisoning-during-cross-log-consistency-checks-on-agent-memory-operations",
  "title": "Which invariants prevent silent memory poisoning during cross-log consistency checks on agent memory operations",
  "date_of_record": "2026 November 23",
  "scope": "Applies to agents whose long-term memory is a mutable store fronted by an append-only operation log (read/write/forget) and whose integrity is checked by replaying that log against the live store. Does not apply to stateless agents, or to stores where every write is already cryptographically attested at the transaction boundary (those need only the attestation check, not log replay).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-memory-poisoning-during-cross-log-consistency-checks-on-agent-memory-operations.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-memory-poisoning-during-cross-log-consistency-checks-on-agent-memory-operations.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-memory-poisoning-during-cross-log-consistency-checks-on-agent-memory-operations.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1771,
    "python_slice_tokens": 199,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious boundary is this: a consistency checker that replays the operation log against the live store detects *divergence*, but divergence is not the same as *poisoning*. Poisoning is a write that was valid at the time it was logged, was consistent with the store at every checkpoint, and only becomes harmful when a *later* read depends on it. A pure ...",
    "what_was_observed": "A retrieval-augmented agent maintained a memory store with an append-only op log. Each entry looked like `{\"op\":\"write\",\"key\":\"user_pref_timezone\",\"val\":\"UTC+9\",\"src\":\"tool:calendar_lookup\",\"ts\":...}`. A nightly checker replayed the log and compared against the store; it also recomputed a per-key hash chain. The failure: an injected tool response (a calendar lookup that had been prompt-poisoned to return `\"timezone\":...",
    "condition_of_validity": "The provenance invariant holds only under these conditions, and the checker must refuse to certify memory as \"clean\" when any is violated: - **Source resolvability.** Every `src` must resolve to a registered producer (tool ID, peer agent ID, or `user`), and the producer's capability set must include the key's namespace. Unresolvable or unscoped sources make ...",
    "decision_boundary": "The decision boundary is between *rejecting at write time* and *quarantining at read time*. You cannot reject all suspicious writes — the agent's job is to ingest untrusted tool output, and a checker that blocks every write with an unfamiliar source will deadlock the agent on first contact with a new tool. So the boundary is: - **Write-time:** admit the writ...",
    "operational_effect": "With supersede edges and source scoping enforced, the timezone poisoning is caught at the first `write` that contradicts an unexpired prior value without a supersede edge — the checker emits `UNVERIFIED` and the read path taints the cell. The agent's reminder scheduler, seeing a tainted timezone, requests a fresh `calendar_lookup` from a scoped producer befo..."
  },
  "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": "e2201e35f8be41df9b4e3a5d88cd366ca544e6c384507c2f926c7175ccca9695",
    "verified_classes": [
      "ProvenanceViolation"
    ],
    "verified_functions": [
      "check_write_admissible",
      "certify_log"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ProvenanceViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
