{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-a-reversible-context-edit-log-has-silently-become-non-reversible-under-budget-pressure",
  "title": "What structural signals indicate a reversible context-edit log has silently become non-reversible under budget pressure",
  "date_of_record": "2026 November 23",
  "scope": "Applies to single-agent systems that mutate their own working context (summarize, prune, fold, or rewrite spans) while maintaining an undo/edit log intended to make every mutation reversible within a token budget. Does not apply to append-only memory stores, external vector DBs, or human-curated transcripts where no in-context rewrite occurs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-reversible-context-edit-log-has-silently-become-non-reversible-under-budget-pressure.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-reversible-context-edit-log-has-silently-become-non-reversible-under-budget-pressure.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-reversible-context-edit-log-has-silently-become-non-reversible-under-budget-pressure.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2110,
    "python_slice_tokens": 488,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A self-editing context agent is not distinguished by *whether* it edits memory but by whether its edit log preserves the information-theoretic precondition for reversal: that the discarded span can be reconstructed from (a) the retained span and (b) the log entry, without consulting the original token stream. The failure mode here is not \"the log is missing ...",
    "what_was_observed": "A code-review agent operating with a 32k working window and a soft budget of 28k performed a sequence of context folds during a long file audit. Each fold replaced a block of prior tool output (e.g., 1,400 tokens of `grep` results) with a 120-token summary plus a log entry. The log entry schema was `{edit_id, span_ref, summary, reconstruction: <payload>}`. Under normal load `reconstruction` held the verbatim span. As...",
    "condition_of_validity": "The reversibility invariant holds only if, for every log entry `e`: and if this equivalence is checked against a *fidelity witness* that does not itself live inside the compressible budget. Two conditions must both hold: - **Condition A (payload integrity):** `e.reconstruction` is stored in a region excluded from the agent's lossy-compression policy — a type...",
    "decision_boundary": "The boundary between \"safe to fold\" and \"fold corrupts the log\" is crossed at the moment the budget subroutine is permitted to *write to the log at all*. Concretely: - **Below the boundary:** the agent may summarize content spans freely; log entries are append-only and their `reconstruction` field is written once, verbatim, into the immutable partition. Budg...",
    "operational_effect": "Once a log entry is silently lossy, every downstream guarantee that depends on it degrades in a correlated, undetectable way: - **Undo becomes a fabrication source.** `undo` re-inserts a summary that reads as authoritative context. The agent cannot distinguish \"recovered original\" from \"recovered paraphrase,\" so it reasons over the paraphrase with full confi..."
  },
  "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": "70270b45a30f3e6514563a24e174cf6bd7c43ed06edeca3072e08335c4139ff4",
    "verified_classes": [
      "NonReversibleLogError",
      "BudgetExhaustedError",
      "LogEntry",
      "ReversibleEditLog"
    ],
    "verified_functions": [
      "attempt_budget_compression",
      "_digest",
      "append_verbatim",
      "fold_content",
      "_log_would_need_compression",
      "undo"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "BudgetExhaustedError",
      "NonReversibleLogError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
