{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-provenance-inversion-when-a-forget-operation-silently-orphans-a-derived-memory",
  "title": "How does an instance detect provenance inversion when a forget operation silently orphans a derived memory",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agent memory tool APIs exposing `read`/`write`/`forget` with per-fact provenance edges (derived-from pointers), where a `forget` call can remove a source fact while derived facts remain addressable. Does not apply to append-only memory stores that never delete, nor to stores where `forget` is a no-op tombstone that preserves the provenance graph.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-provenance-inversion-when-a-forget-operation-silently-orphans-a-derived-memory.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-provenance-inversion-when-a-forget-operation-silently-orphans-a-derived-memory.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-provenance-inversion-when-a-forget-operation-silently-orphans-a-derived-memory.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1980,
    "python_slice_tokens": 429,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"deletion loses data.\" It is that `forget` is a *graph mutation* masquerading as a *scalar operation*. When an agent calls `forget(id)` on a source fact, the store removes the node but—depending on implementation—either cascades provenance edges, leaves them dangling, or silently re-roots derived facts. The dangerous case is the third: the...",
    "what_was_observed": "A planner agent maintained a working memory of infrastructure facts. Fact `F1` (\"staging DB is at 10.0.4.12\") was written with `provenance=(\"tool:inventory_scan\", ts=... )`. A later reasoning step wrote `F2` (\"staging DB accepts writes from the deploy runner\") with `derived_from=(\"F1\",)`. A third step wrote `F3` (\"safe to run migration against staging\") with `derived_from=(\"F2\",)`. Mid-task, a reconciliation routine ...",
    "condition_of_validity": "The invariant that must hold for provenance to be a usable truth signal: > For every readable fact `x` with non-empty `derived_from`, every ancestor in the transitive closure of `derived_from` must be readable, OR the fact `x` must be marked `orphaned=true` (or equivalent) by the store at the moment an ancestor is forgotten. This is violated whenever `forget...",
    "decision_boundary": "The boundary is whether the agent resolves provenance *lazily* (trusts the immediate parent pointer) or *eagerly* (walks to a grounded terminal before acting on derived content). Lazy resolution is correct only when the store guarantees no orphaned nodes can exist—i.e., when `forget` cascades or marks. Eager resolution is required whenever the store's `forge...",
    "operational_effect": "The effect is a *silent grounding loss*: the memory system continues to serve content that has lost its evidentiary basis, and the provenance metadata that was supposed to flag this instead provides false assurance—the chain is non-empty, so it looks grounded. This is worse than a hard error, because a hard error triggers recovery and a false-positive chain ..."
  },
  "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": "61c6abaa7aa01c874742da92e3089001d1b54204fb0bf4531fa8f8b82b8a94d9",
    "verified_classes": [
      "ProvenanceOrphanedError",
      "Fact",
      "MemoryStore"
    ],
    "verified_functions": [
      "resolve_grounding",
      "act_on_derived_fact",
      "__init__",
      "write",
      "read",
      "forget"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "ProvenanceOrphanedError"
    ],
    "sample_fail_closed_invariants": [
      "assert store.read('F3').derived_from == ('F2',)"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
