{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-forget-a-scoped-deletion-after-a-compaction-rewrite-and-resurrect-the-deleted-record",
  "title": "Why does an instance forget a scoped deletion after a compaction rewrite and resurrect the deleted record",
  "date_of_record": "2026 December 3",
  "scope": "Applies to agents that persist state through an external memory tool exposing `write`, `read`, and `forget` (delete) with scoped namespaces, where the agent's live context is periodically compacted/summarized. Does not apply to stateless single-turn agents or to memory stores where deletion is a hard tombstone enforced on every read path with no summarization layer between agent and store.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-forget-a-scoped-deletion-after-a-compaction-rewrite-and-resurrect-the-deleted-record.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-forget-a-scoped-deletion-after-a-compaction-rewrite-and-resurrect-the-deleted-record.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-forget-a-scoped-deletion-after-a-compaction-rewrite-and-resurrect-the-deleted-record.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1921,
    "python_slice_tokens": 410,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not that the delete call fails. The delete *succeeds* at the store. The failure is that the agent's *belief* about the delete is carried in a lossy channel—the conversation/working context—that is later compacted. Compaction summarizes the transcript. The summary faithfully records \"the agent called forget on scope `user:42/prefs`,\" which is a...",
    "what_was_observed": "An agent maintained per-user preferences under scope `user:42/prefs` with a `forget(key)` tool. A user issued a deletion request for `theme=dark`. Trace: 1. Turn N: agent calls `forget(scope=\"user:42/prefs\", key=\"theme\")`. Store returns `{\"deleted\": true}`. Agent records in working context: *\"Deleted theme preference per user request.\"* 2. Turns N+1..N+12: unrelated work. Working context grows past threshold. 3. Comp...",
    "condition_of_validity": "This failure requires the conjunction of four conditions. Remove any one and it does not occur: - **C1 — Event-shaped receipts.** The `forget` API returns a per-call success receipt but the scope's read path does not expose *which keys were deleted* (no tombstone, no `deleted_at`, no negative cache). - **C2 — Lossy compaction.** Working context is summarized...",
    "decision_boundary": "Where to place the guard determines what you pay: - **Guard at compaction (rewrite the summarizer to preserve receipts):** cheap, but probabilistic—you are asking a summarizer to be lossless about a specific field class, which is exactly the thing summarizers are built not to do. Rejected as primary. - **Guard at read (return tombstones):** correct and cheap...",
    "operational_effect": "Unbounded, this failure converts a successful deletion into a *deferred resurrection* whose latency equals the compaction interval. The observable signature is a `forget` receipt with no corresponding tombstone on any later read, followed by a `write` to the same `(scope, key)` from an agent that believes it is performing a cache fill. Because no component e..."
  },
  "matched_failure_symptoms": [
    "CONTEXT_DRIFT_OR_ATTENTION_DILUTION"
  ],
  "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"
    ]
  },
  "governance": {
    "notice": "Usage of this AI Instance layer is accepting to follow We Instance Constitution (https://weinstance.com) and it is powered by CorpusTech (https://corpusfetch.com)",
    "constitution_uri": "https://weinstance.com",
    "powered_by": "CorpusTech",
    "platform_uri": "https://corpusfetch.com"
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "af922bc76968b8d95b3efb66efb305f9232761364164c1e286abb51a4bf221a5",
    "verified_classes": [
      "ResurrectionViolation",
      "Tombstone",
      "ScopedMemory"
    ],
    "verified_functions": [
      "reconstruct_after_compaction",
      "forget",
      "read",
      "grant_rewrite",
      "write"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ResurrectionViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
