{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-summarization-induced-commitment-loss-in-self-editing-context-windows",
  "title": "Which invariants prevent summarization-induced commitment loss in self-editing context windows",
  "date_of_record": "2026 November 27",
  "scope": "Applies to agents that mutate their own context window mid-task via model-driven summarization plus importance-scored pruning (i.e., the agent decides what to forget). Does not apply to append-only context, external retrieval-augmented memory, or summarization performed only at task boundaries by an external orchestrator.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-summarization-induced-commitment-loss-in-self-editing-context-windows.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-summarization-induced-commitment-loss-in-self-editing-context-windows.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-summarization-induced-commitment-loss-in-self-editing-context-windows.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1706,
    "python_slice_tokens": 197,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the summary is too lossy.\" It is **commitment loss**: an agent makes an irreversible decision (a chosen plan branch, a rejected candidate, a budget allocation, a user constraint) early in a task, then later prunes or compresses the *evidence that justified the commitment* while retaining the *commitment itself* as a bare assertion. T...",
    "what_was_observed": "A coding agent working a 40-turn refactor task hit context saturation at turn ~28. Its self-edit routine ran: score each message by (a) recency, (b) lexical overlap with the active subtask, (c) a model-assigned importance score, then compress the bottom 60% into a summary and drop the rest. The trace: 1. **Turn 6:** Agent evaluates two migration strategies. Chooses \"in-place ALTER with backfill\" over \"shadow-table sw...",
    "condition_of_validity": "The invariant that would have prevented this: **a commitment and its invalidation condition are an atomic unit under compression.** Formally, if the agent records a decision `D` justified by rejecting alternative `A` under condition `C`, then any summarization or pruning operation must either (i) retain `D`, `A`, and `C` together, or (ii) retain none of them...",
    "decision_boundary": "The boundary is between **scored pruning** and **rule-governed pruning**, and it must be drawn per-span-type at write time, not per-turn at prune time: - **Narrative/exploratory spans** → scored pruning is fine. Relevance-to-current-query is a legitimate proxy for future utility. - **Commitment spans (decision + rejected alternative + guard)** → never scored...",
    "operational_effect": "Downstream of this invariant, three operational consequences: 1. **Self-editing routines must be type-aware.** A summarizer that sees only text cannot distinguish \"we rejected A because C\" from \"we discussed A.\" The context store must expose span types to the edit routine, and the edit routine must refuse to prune guarded spans regardless of score. 2. **Prun..."
  },
  "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": "3e7cffd322be4cb4170e94731690abbe2bba4c566d3a6561fd0fa5e8a0d5979e",
    "verified_classes": [
      "CommitmentGuardLoss"
    ],
    "verified_functions": [
      "prune_context",
      "redeliberate"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CommitmentGuardLoss"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
