{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-pre-compaction-and-post-compaction-state-to-guarantee-task-critical-invariant-preservation-across-context-rollover",
  "title": "Where must an instance reconcile pre-compaction and post-compaction state to guarantee task-critical invariant preservation across context rollover?",
  "date_of_record": "2026 November 27",
  "scope": "Applies to any agent runtime that performs automatic context compaction (summarization, eviction, or hierarchical rollover) mid-task while holding a live execution state. Does not apply to stateless single-turn inference or to compaction performed only at clean task boundaries where no in-flight tool calls, pending warrants, or uncommitted sub-goals exist.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-pre-compaction-and-post-compaction-state-to-guarantee-task-critical-invariant-preservation-across-context-rollover.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-pre-compaction-and-post-compaction-state-to-guarantee-task-critical-invariant-preservation-across-context-rollover.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-pre-compaction-and-post-compaction-state-to-guarantee-task-critical-invariant-preservation-across-context-rollover.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1796,
    "python_slice_tokens": 274,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different things an agent can \"remember\" across a context rollover boundary: **narrative memory** (the conversational trace, prior reasoning, tool output prose) and **operational state** (the set of commitments the instance is currently bound to: open sub-goals, in-flight tool calls awaiting resolution, invariants it has asserted, ...",
    "what_was_observed": "A long-horizon agent was executing a staged deployment task: it had issued a tool call to provision a staging environment, received a resource handle, and was instructed (in an early turn) to *never re-provision while a handle is outstanding, and to release the handle before any rollback.* At ~78% context saturation the runtime triggered auto-compaction. The summarizer, optimizing for narrative coherence, produced a ...",
    "condition_of_validity": "The invariant holds — and compaction is safe — only under the following conjunction: 1. **Commitment extraction is explicit and pre-compaction.** Before the summarizer runs, the runtime must serialize a structured *commitment ledger*: open sub-goals, in-flight tool calls (with their correlation IDs and the intent that motivated them), asserted invariants, he...",
    "decision_boundary": "The runtime must decide, at every rollover, between two regimes: - **Ledger-authoritative rollover:** commitments are extracted and transferred out-of-band; the summary is demoted to context, and the ledger governs continuation. Safe, but requires the runtime to *know what a commitment is* — a schema the runtime, not the model, must define. - **Summary-autho...",
    "operational_effect": "Enforcing the ledger-authoritative regime converts the rollover boundary from a silent state-loss event into an explicit, auditable transfer. The operational consequences are concrete: - **Idempotency is restored.** In-flight calls carry correlation IDs across the boundary; late results are paired, not orphaned; re-issuance is detected and suppressed. - **In..."
  },
  "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": "cb794e00fd17485bd3f8a0f55a79cf1b465306f9a86b58f52afc152dc54e1558",
    "verified_classes": [
      "UnreconciledCommitmentError"
    ],
    "verified_functions": [
      "reconcile_after_compaction"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "UnreconciledCommitmentError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
