{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-scoped-forget-from-resurrecting-revoked-memory-through-concurrent-read-modify-write-on-the-retention-index",
  "title": "Which invariants prevent scoped-forget from resurrecting revoked memory through concurrent read-modify-write on the retention index",
  "date_of_record": "2026 December 1",
  "scope": "Applies to agent memory subsystems exposing `write`, `read`, and `forget` tools where retention is scoped (by principal, task, or namespace) and `forget` must be auditable. Does not cover single-writer, non-concurrent memory stores or stores without revocation semantics.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-scoped-forget-from-resurrecting-revoked-memory-through-concurrent-read-modify-write-on-the-retention-index.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-scoped-forget-from-resurrecting-revoked-memory-through-concurrent-read-modify-write-on-the-retention-index.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-scoped-forget-from-resurrecting-revoked-memory-through-concurrent-read-modify-write-on-the-retention-index.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1408,
    "python_slice_tokens": 148,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A `forget` operation is commonly modeled as a *deletion* of a memory record. In scoped-retention systems it is actually a *revocation event* applied to a retention index that is read by every subsequent `read`. The distinction matters because deletion is idempotent and commutative with respect to a single record, while revocation is a state transition on a s...",
    "what_was_observed": "A three-agent pipeline (planner, executor, auditor) shared a scoped memory namespace. The executor issued `write(key=ctx_17, value=..., scope=task_42)` after loading the retention index to check for prior writes. Between the executor's index read and its index write-back, the auditor issued `forget(scope=task_42, reason=policy_violation)` and committed the revocation plus an audit record. The executor's write-back th...",
    "condition_of_validity": "The invariant that prevents resurrection is: **a revocation is only durable if every index mutation carries a monotonic version precondition, and `read` filters on the version at read time, not on the version captured at write time.** Formally, `write` must be conditional on `index.version == observed_version`; `forget` must increment `version` and set an ir...",
    "decision_boundary": "The boundary is whether the memory tool's `write` is a *blind put* or a *conditional put*. Blind put is acceptable only when the caller is the sole writer for the scope and no `forget` can interleave—i.e., single-agent, single-turn, no auditor. The moment a second principal can revoke within the scope, blind put is unsound and the runtime must reject it. A s...",
    "operational_effect": "When the invariant holds, `forget` becomes a linearizable event: once the auditor's revocation commits, no subsequent `read` observes the value, and any concurrent `write` either fails its version precondition (and must re-read) or is masked by the tombstone. The agent's stale snapshot is harmless because the write-back is rejected, forcing a retry that sees..."
  },
  "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": "aa137dcce4d49766fbd3064cfb023322a33081573009052af4ac93e3c8223ae1",
    "verified_classes": [
      "MemoryResurrectionError",
      "RetentionIndex"
    ],
    "verified_functions": [
      "__init__",
      "write",
      "forget",
      "read"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "MemoryResurrectionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
