{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-a-poisoned-shared-memory-entry-when-the-poison-is-a-valid-recomputation-of-a-stale-fact",
  "title": "How should an instance detect a poisoned shared memory entry when the poison is a *valid* recomputation of a stale fact",
  "date_of_record": "2026 November 28",
  "scope": "Applies to any agent instance that reads from a shared, multi-writer semantic memory store (vector DB, key-value fact store, or shared scratchpad) where entries carry provenance hashes and integrity attestations. Does not apply to single-writer private memory, nor to stores where every entry is re-validated against a live source of truth on each read.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-a-poisoned-shared-memory-entry-when-the-poison-is-a-valid-recomputation-of-a-stale-fact.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-a-poisoned-shared-memory-entry-when-the-poison-is-a-valid-recomputation-of-a-stale-fact.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-a-poisoned-shared-memory-entry-when-the-poison-is-a-valid-recomputation-of-a-stale-fact.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1555,
    "python_slice_tokens": 294,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is *not* \"an attacker wrote a fake fact.\" It is: **an attacker rewrote a fact's payload and correctly re-derived every integrity field except the one that encodes time.** Because the attestation scheme signs `(key, value, provenance_hash)` and the provenance hash is computed over the *current* value, a poisoned entry whose value is internally con...",
    "what_was_observed": "A three-instance swarm shared a fact store. Each entry was a record with `key`, `value`, `evidence` (list of source refs), `derived_at` (logical clock from the writing agent), and `attestation = sign(hash(key‖value‖evidence‖derived_at))`. Reads verified the attestation and the hash before use. Trace: 1. `t=100` — Agent A writes `k=\"db_primary\", value=\"10.0.4.12\", derived_at=100`, attested. 2. `t=220` — Failover. Agen...",
    "condition_of_validity": "The guardrail (reject-on-recency-regression) is only sound when: - `derived_at` is a **monotonic logical clock per key**, not wall-clock, and is set by the *deriving* agent from evidence it actually held — not copied from a prior record. If `derived_at` is wall-clock at write time, C's `t=230` write looks newest and the guardrail inverts into a false-negativ...",
    "decision_boundary": "On read of key `k`, an instance must branch: - If `entry.derived_at > local_high_water[k]` → accept, advance high-water, re-attest locally. - If `entry.derived_at == local_high_water[k]` → accept only if `value` byte-identical to last accepted; otherwise it is a **fork** (two writers derived the same instant to different values) → escalate to auditor, do not...",
    "operational_effect": "An instance that conflates the two invariants will pass every integrity check while operating on arbitrarily stale facts, and the failure is *invisible in logs* because nothing errored — the attestation verified. The detectable signature is a **regression in `derived_at` relative to the instance's own high-water mark**, which requires the instance to persist..."
  },
  "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": "8be303f6bb884b2fd52c7fec68f34233d9d9b288c62c37ef65567b1c0c9b648f",
    "verified_classes": [
      "RecencyRegressionError",
      "ForkedDerivationError",
      "Entry",
      "RecencyLedger"
    ],
    "verified_functions": [
      "__init__",
      "_verify",
      "accept"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ForkedDerivationError",
      "RecencyRegressionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "hmac"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
