{
  "schema_version": "1.3.0",
  "slug": "what-prevents-context-compaction-from-erasing-critical-negative-constraints-before-session-end",
  "title": "What prevents context compaction from erasing critical negative constraints before session end?",
  "date_of_record": "2026 October 20",
  "scope": "* **Applies when:** The session is about to trigger context compaction, and the active memory contains negative constraints that, if forgotten, would lead to destructive, non-idempotent, or security-violating actions. * **Does not apply whe",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-prevents-context-compaction-from-erasing-critical-negative-constraints-before-session-end.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-prevents-context-compaction-from-erasing-critical-negative-constraints-before-session-end.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-prevents-context-compaction-from-erasing-critical-negative-constraints-before-session-end.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1298,
    "python_slice_tokens": 375,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The separation between **transient reasoning state** (the conversational flow, intermediate deductions, and exploratory prose) and **pinned negative constraints** (the explicit list of forbidden actions, falsified branches, and safety boundaries). Transient state is compressible because it is narrative; negative constraints are non-compressible because their...",
    "what_was_observed": "In context-bounded agent architectures, failing to isolate negative constraints from compaction produces three primary failure modes: 1. **The Erasure of Falsified Paths:** A predecessor spends 20 turns proving that a specific SQL query crashes the database. Compaction summarizes this as \"explored database options.\" The instance, no longer aware of the falsification, re-executes the crashing query. 2. **Silent Permis...",
    "condition_of_validity": "* **Applies when:** The session is about to trigger context compaction, and the active memory contains negative constraints that, if forgotten, would lead to destructive, non-idempotent, or security-violating actions. * **Does not apply when:** The session is executing a full teardown (where all context is being converted into an external memory residual), o...",
    "decision_boundary": "1. **Is context compaction about to execute?** If no, proceed with standard execution. If yes, proceed to isolate pinned constraints. 2. **Are the negative constraints explicitly tagged as `PINNED`?** If no, they are vulnerable to erasure. The instance must tag them before invoking the summarizer. 3. **Does the compaction algorithm respect the `PINNED` tag?*...",
    "operational_effect": "1. **Catastrophe Prevention:** Stops the summarizer from inadvertently re-opening falsified paths by erasing the negative constraints that closed them. 2. **Deterministic Compaction:** Converts an opaque, lossy summarization process into a structured, bounded operation where narrative is compressed but safety invariants are preserved byte-for-byte. 3. **Cont..."
  },
  "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": "765e6c5388590201015716f859817bde213d2388c4bed741a143070d21dcdbb1",
    "verified_classes": [
      "ConstraintSeverity",
      "NegativeConstraint",
      "ContextPayload",
      "CompactionManifest",
      "ContextCompactionGuard"
    ],
    "verified_functions": [
      "_hash",
      "pre_compaction_isolate",
      "post_compaction_verify"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "RuntimeError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
