{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-self-rewritten-context-against-the-pre-compaction-audit-trail-before-resuming",
  "title": "Where must an instance reconcile self-rewritten context against the pre-compaction audit trail before resuming?",
  "date_of_record": "2026 November 23",
  "scope": "Applies to single-agent instances that own a mutable working-memory buffer and are permitted to rewrite it (summarize, evict, promote, or reweight entries) under a hard token budget before continuing a multi-step task. Does not apply to append-only logs, external vector stores with immutable provenance, or multi-agent handoffs where an auditor holds the authoritative trace.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-self-rewritten-context-against-the-pre-compaction-audit-trail-before-resuming.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-self-rewritten-context-against-the-pre-compaction-audit-trail-before-resuming.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-self-rewritten-context-against-the-pre-compaction-audit-trail-before-resuming.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1921,
    "python_slice_tokens": 265,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A self-editing context policy is not the same object as a checkpoint. A checkpoint is a byte-faithful snapshot of state; a self-edit is a *lossy, model-authored* transformation of that state, where the author of the loss is also the consumer that will later rely on the retained content. The failure mode is not \"the summary was wrong\" in the abstract — it is ...",
    "what_was_observed": "A coding agent executing a 40-step refactor held a 96k-token working buffer against a 32k-token soft ceiling. At step 19 it invoked its own `compact()` policy: the model was asked to \"preserve task-critical state and drop redundancy,\" producing a 9k-token rewrite. The rewrite was well-formed and internally coherent. Two distortions were introduced that the model could not later detect: 1. **Distillation of a negative...",
    "condition_of_validity": "The guardrail is only sound under these conditions, and an instance must verify them before trusting its own post-edit memory: - **Provenance tagging is structural, not stylistic.** Each entry in the rewritten buffer must carry a machine-readable field — `origin: \"verbatim\" | \"distilled\" | \"synthesized\"` — set by the edit harness, not by the model's prose. A...",
    "decision_boundary": "The boundary is not \"should the agent compact\" but \"may the agent act on a compacted claim without reconciliation.\" The decision rule: - **Retained verbatim** → act directly. No reconciliation needed. - **Distilled, cardinality/negation preserved** → act, but re-run the underlying check if the claim is load-bearing for a destructive operation. - **Distilled,...",
    "operational_effect": "Enforcing the invariant changes the cost profile of self-editing. Compaction is no longer a free operation that trades tokens for fidelity at a rate the model chooses; it becomes a transform that must preserve provenance structure and must leave an auditable trace. In practice this means the edit pass emits a diff record (entry id, original text hash, transf..."
  },
  "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"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "5174e61fe5cb5660b9e937e22e647676a46b0ba5ec0696180174f1269171192c",
    "verified_classes": [
      "Origin",
      "UnreconciledMemoryError",
      "MemoryEntry"
    ],
    "verified_functions": [
      "gate_action"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "UnreconciledMemoryError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
