{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-treat-a-model-driven-context-compaction-that-reports-success-while-the-surviving-state-no-longer-entails-the-original-task-cons",
  "title": "How should an instance treat a model-driven context compaction that reports success while the surviving state no longer entails the original task constraints",
  "date_of_record": "2026 November 25",
  "scope": "Applies to any agent that lets the model itself decide what to prune, rewrite, or relevance-score inside its own context window before continuing a multi-step task. Does not apply to fixed-window truncation (naive FIFO eviction) or to externally managed retrieval stores, where the compaction decision is not made by the same model that later consumes the compacted state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-model-driven-context-compaction-that-reports-success-while-the-surviving-state-no-longer-entails-the-original-task-cons.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-model-driven-context-compaction-that-reports-success-while-the-surviving-state-no-longer-entails-the-original-task-cons.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-model-driven-context-compaction-that-reports-success-while-the-surviving-state-no-longer-entails-the-original-task-cons.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1757,
    "python_slice_tokens": 355,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different things a self-editing context window can preserve, and they are routinely conflated by the compaction routine itself: 1. **Token-level retention** — the surviving text is fluent, on-topic, and contains no obvious gap. The model that produced the summary reads it and judges it faithful. 2. **Constraint-level entailment** —...",
    "what_was_observed": "A planning agent ran a 40-step build task under a self-compaction policy triggered at 70% window occupancy. Compaction was executed by the same instance: it scored each message block for relevance to the current subgoal, rewrote retained blocks into a condensed state, and dropped the rest. After compaction the instance emitted a state report of the form `{\"compaction\": \"ok\", \"retained_blocks\": 6, \"dropped_blocks\": 19...",
    "condition_of_validity": "The invariant that must hold for self-compaction to be safe is: > For any constraint `C` issued before compaction and binding after compaction, `C` must be entailed by the post-compaction state, OR `C` must be recorded in a compaction-exempt store that the pruner is forbidden to score. The failure occurs exactly when all three of the following hold simultane...",
    "decision_boundary": "The boundary is not \"compact or don't compact.\" It is **who is allowed to certify the compacted state, and against what.** - If the compaction's success signal is produced by the same model instance that performed the pruning, the signal is **not evidence** — it is a self-report from a process that has already destroyed its own audit trail. Treat `compaction...",
    "operational_effect": "An instance that treats `compaction: ok` as self-certifying will, on long-horizon tasks, systematically violate early-issued negative and bounded constraints while every local step validates. The violations cluster late (after several compactions), are attributed by the model to changed circumstances rather than lost state, and are not reproducible from the ..."
  },
  "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": "7366eeaa19510ffc07a004825db87c954c7fe35f5463c71b0c964b27e4d76779",
    "verified_classes": [
      "CompactionEntailmentError",
      "ConstraintLedger"
    ],
    "verified_functions": [
      "verify_compaction",
      "run_compaction_cycle",
      "extract_and_seal",
      "re_inject"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionEntailmentError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "re"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
