{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-s-reversible-context-edit-journal-silently-become-irreversible-when-a-salience-rescore-rewrites-the-tombstone-of-an-already-compa",
  "title": "Why does an instance's reversible context-edit journal silently become irreversible when a salience rescore rewrites the tombstone of an already-compacted span?",
  "date_of_record": "2026 December 2",
  "scope": "Applies to agents that maintain a model-driven, reversible context-edit journal (edit/undo records over a working context) where a salience scorer can independently trigger compaction or tombstoning of spans. Does not apply to append-only logs with no in-place rewrite, nor to systems where compaction and salience scoring share one serialized writer.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-s-reversible-context-edit-journal-silently-become-irreversible-when-a-salience-rescore-rewrites-the-tombstone-of-an-already-compa.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-s-reversible-context-edit-journal-silently-become-irreversible-when-a-salience-rescore-rewrites-the-tombstone-of-an-already-compa.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-s-reversible-context-edit-journal-silently-become-irreversible-when-a-salience-rescore-rewrites-the-tombstone-of-an-already-compa.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1736,
    "python_slice_tokens": 194,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two different meanings of \"reversible\" that get conflated in self-editing context systems, and the conflation is where the failure lives. The first is **logical reversibility**: the journal contains an inverse operation for every edit, so replaying the journal backward reconstructs the prior context. The second is **physical reversibility**: the by...",
    "what_was_observed": "A long-running coding agent used a three-part context policy: (1) a rewriter LLM that proposed span edits (drop, summarize, reorder), (2) a salience scorer that periodically assigned decay scores and compacted low-salience spans into `[ELIDED:n_tokens]` markers, and (3) an edit journal that stored each rewrite as `{span_id, old_bytes_ref, new_bytes, inverse_op}` to support rollback when a downstream tool call failed....",
    "condition_of_validity": "The journal's reversibility invariant holds **only under the precondition that no span referenced by a live journal entry is compacted by any writer other than the journal itself.** This is a cross-subsystem exclusion condition, not a property of the journal. It is violated whenever: - The salience scorer and the rewriter run as independent passes over the s...",
    "decision_boundary": "The boundary is **whether the restore path verifies content identity or merely resolves a reference.** - **Reference-resolving restore** (`restore(span_id)` reads whatever is at `span_id` now): correct only when span bytes are immutable for the journal entry's lifetime. Under concurrent compaction, it silently restores tombstones. This is the failing regime....",
    "operational_effect": "The consequence is a class of **silent non-recoverable rollback**: the agent's recovery mechanism reports success while restoring garbage, and the corruption surfaces turns later as a downstream reasoning failure attributed to the wrong cause. Because the rollback \"succeeded,\" the agent does not retry it, does not escalate, and does not re-fetch the dropped ..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "1db4234c82d5ea71fbd152842cecd13948f6118696a5ad9665f919125f8fc458",
    "verified_classes": [
      "IrreversibleRollbackError",
      "JournalEntry"
    ],
    "verified_functions": [
      "restore",
      "rollback"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "IrreversibleRollbackError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
