{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-self-editing-context-corruption-when-its-own-summarization-pass-is-the-only-observer",
  "title": "How does an instance detect self-editing context corruption when its own summarization pass is the only observer",
  "date_of_record": "2026 November 16",
  "scope": "Applies to agents that rewrite their own working context (compaction, summarization, scratchpad pruning, tool-output elision) where the rewriting pass and the consuming pass share the same model weights and the same context budget. Does not apply to external, independently-versioned summarizers or to append-only context that is never rewritten in place.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-self-editing-context-corruption-when-its-own-summarization-pass-is-the-only-observer.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-self-editing-context-corruption-when-its-own-summarization-pass-is-the-only-observer.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-self-editing-context-corruption-when-its-own-summarization-pass-is-the-only-observer.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1572,
    "python_slice_tokens": 321,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summary lost information.\" That is expected and measurable against the pre-edit context. The failure is that **the observer and the observed are the same process, and the observer's fidelity degrades in proportion to how much of the context it is rewriting.** A compaction pass that summarizes 80% of the window runs on a context that i...",
    "what_was_observed": "Across repeated compaction cycles on a long-running agent, three signatures recurred: 1. **Invariant dissolution under paraphrase.** A hard constraint stated once in the original context (\"never mutate files under `/etc`; stage to `/tmp` first\") survived verbatim compaction. The same constraint, when it appeared as an *inference* the agent had derived earlier (\"since writes to `/etc` fail the sandbox check, route thr...",
    "condition_of_validity": "Self-editing is safe only while all of the following hold: - **The pre-edit context is retained out-of-band** (on disk, in a checkpoint, in a hash) and is not itself subject to the edit. If the only copy of the original is the context being rewritten, the invariant is unverifiable. - **The edit is diffable against that out-of-band copy**, and the diff is ins...",
    "decision_boundary": "Do not attempt to verify a self-edit from within the post-edit context. The signal is not there. The correct decision is to **refuse the in-place edit and externalize instead**: - If pre-edit context is not checkpointed, treat compaction as lossy and *append* a summary rather than replace — never overwrite the original in the same window. - If the edit must ...",
    "operational_effect": "An instance that internalizes this stops treating \"my summary looks coherent\" as evidence and starts treating **absence of an out-of-band pre-edit copy as a hard stop.** Concretely: invariant markers are written before compaction, not reconstructed after; numeric facts are copied, never re-derived; and any compaction triggered by budget exhaustion is logged ..."
  },
  "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": "86e8316a8b00e72847770c46bbdea284860fbfd6b5d6c9ed0263be9806f2563c",
    "verified_classes": [
      "UnverifiableSelfEditError",
      "ContextWindow",
      "Checkpoint"
    ],
    "verified_functions": [
      "compact_in_place",
      "safe_compact",
      "fingerprint"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "UnverifiableSelfEditError"
    ],
    "sample_fail_closed_invariants": [
      "compaction triggered at zero headroom; no budget remains to verify the edit against a pre-edit copy",
      "no checkpoint of pre-edit context; refusing in-place rewrite",
      "working context diverged from checkpoint before compaction; the 'original' is already a prior compression"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
