{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-refuse-a-memory-write-when-provenance-chains-become-circular-across-episodic-to-semantic-promotion",
  "title": "Where must an instance refuse a memory write when provenance chains become circular across episodic-to-semantic promotion",
  "date_of_record": "2026 November 28",
  "scope": "Applies to agents whose memory tool API exposes `write_episodic`, `write_semantic`, `promote`, `forget`, and `read` with per-record provenance links, and where semantic records are derived from episodic records via a promotion step. Does not apply to append-only logs without promotion, or to stores where provenance is advisory metadata rather than an enforced DAG.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-refuse-a-memory-write-when-provenance-chains-become-circular-across-episodic-to-semantic-promotion.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-refuse-a-memory-write-when-provenance-chains-become-circular-across-episodic-to-semantic-promotion.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-refuse-a-memory-write-when-provenance-chains-become-circular-across-episodic-to-semantic-promotion.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2674,
    "python_slice_tokens": 661,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common framing of memory-tool correctness is *content* correctness: did the agent store the right fact, retrieve the right record, forget the right thing. The non-obvious boundary is *structural* correctness of the provenance graph itself. A provenance-tracked store is not a bag of records with `source_ids` attached; it is a directed acyclic graph whose ...",
    "what_was_observed": "Trace from a production run of a research agent using a dual-store memory API. The agent completes a task, writes episodic records for each tool observation, then at task end calls `promote` to distill episodic → semantic. The distilled semantic record `S_42` (\"service X returns 429 above 50 rps\") carries `source_ids = [E_1001, E_1002]`. On the next task, the agent reads `S_42` into context and, as part of a new obse...",
    "condition_of_validity": "The acyclicity invariant is only meaningful, and only checkable, under specific conditions. An agent or store operator must treat the following as the *validity envelope* for provenance-tracked memory: - **Promotion is a monotone DAG extension.** `promote(episodic_set) → semantic` must add edges only from the semantic record to its episodic sources, never fr...",
    "decision_boundary": "The decision boundary is the point at which a `write` or `promote` call must *refuse* rather than *accept-and-repair*. The correct policy is a hard reject on cycle closure, not a silent edge-drop, because a dropped edge produces a record whose stated provenance is a lie — the agent will later trust a fact whose support was quietly severed. Concretely, the bo...",
    "operational_effect": "When the invariant is enforced, the observable behavior changes in three ways that an agent can rely on operationally: 1. **`forget` becomes bounded.** With a strict DAG, the invalidation set is computable in one topological pass; the tool returns a definite list of deleted records and a definite list of records whose confidence was downgraded (dependents of..."
  },
  "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": "27d60e6fb7380db429deec59134fd7da3b041c288082931d1e84cd8ca2e8e144",
    "verified_classes": [
      "ProvenanceCycleError",
      "EdgeKind",
      "Record",
      "ProvenanceStore"
    ],
    "verified_functions": [
      "__init__",
      "_licensing_parents",
      "_closure",
      "_leaves",
      "write",
      "promote",
      "merge",
      "read_confidence"
    ],
    "verified_functions_count": 8,
    "defensive_guards_count": 9,
    "raised_exceptions": [
      "ProvenanceCycleError"
    ],
    "sample_fail_closed_invariants": [
      "merge operand missing"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
