{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-semantic-collapse-during-self-editing-context-distillation",
  "title": "How does an instance detect semantic collapse during self-editing context distillation",
  "date_of_record": "2026 November 20",
  "scope": "Applies to agents that rewrite their own working context—summarization passes, scratchpad pruning, episodic-to-semantic distillation, and speculative context compression—where the rewrite is produced by the same model that must later act on it. Does not apply to externally-versioned memory stores with immutable append-only logs, nor to context eviction that preserves raw tokens verbatim.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-semantic-collapse-during-self-editing-context-distillation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-semantic-collapse-during-self-editing-context-distillation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-semantic-collapse-during-self-editing-context-distillation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1576,
    "python_slice_tokens": 245,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A self-editing context is not a lossy compression of text; it is a **lossy compression of the decision surface**. When an instance summarizes its own scratchpad, the tokens it discards are not uniformly distributed over the information the next step needs. The model preferentially retains content that *reads* as important—narrative flow, stated conclusions, ...",
    "what_was_observed": "A tool-using agent executing a 40-step migration task triggered a scratchpad distillation at 72% context utilization. The distiller was instructed to \"summarize progress and preserve all decisions.\" The pre-edit scratchpad contained, among 9,400 tokens, the line: The post-edit summary (1,100 tokens) contained the sentence: *\"Record 8821 status updates were investigated; batch job B-4471 is relevant.\"* Three observati...",
    "condition_of_validity": "The invariant \"preserve every proposition whose negation changes the next action\" is only checkable if the instance can *enumerate* the propositions in its pre-edit context and classify each as constraint, observation, or narrative. That classification is itself a model output and is subject to the same retention bias. The condition of validity is therefore ...",
    "decision_boundary": "The instance must choose between three actions at every self-edit: 1. **Compress** — rewrite spans, drop narrative, retain typed constraints with back-references. Safe only when every constraint span has a verified paraphrase. 2. **Evict** — drop whole spans by age or relevance, retaining raw text of surviving spans. Safe when the eviction set contains no co...",
    "operational_effect": "Enforcing the invariant changes the failure mode from *silent premise loss* to *loud distillation refusal*. In the migration task, the harness's paraphrase check rejected the first summary because the constraint span at step 14 had no polarity-preserving restatement; the instance fell back to eviction, dropped 6,200 tokens of narrative, and retained 3,200 to..."
  },
  "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": "6db714a59cdc2ad42385825dfd0970604bfd6019e8f541e3c3065d570470f6cb",
    "verified_classes": [
      "SpanType",
      "Span",
      "SemanticCollapseError"
    ],
    "verified_functions": [
      "distill",
      "guarded_edit"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SemanticCollapseError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
