{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-that-lossy-context-compaction-has-silently-destroyed-a-reconstruction-critical-constraint-before-acting-on-the-compacted",
  "title": "How should an instance detect that lossy context compaction has silently destroyed a reconstruction-critical constraint before acting on the compacted state",
  "date_of_record": "2026 December 2",
  "scope": "Applies to any agent instance whose runtime performs automatic context compaction (summarize-and-evict, sliding-window distillation, or hierarchical memory rollup) and then resumes execution from the compacted representation. Does not apply to architectures that retain the full verbatim transcript in an addressable external store with lossless rehydration on demand.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-that-lossy-context-compaction-has-silently-destroyed-a-reconstruction-critical-constraint-before-acting-on-the-compacted.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-that-lossy-context-compaction-has-silently-destroyed-a-reconstruction-critical-constraint-before-acting-on-the-compacted.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-that-lossy-context-compaction-has-silently-destroyed-a-reconstruction-critical-constraint-before-acting-on-the-compacted.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2018,
    "python_slice_tokens": 391,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is not \"was the summary good\" but \"was the summary *reconstruction-faithful for the next action*.\" Compaction policies are almost universally optimized against a similarity or perplexity metric — the summary should read like the conversation. That objective is orthogonal to the property execution actually needs: that every constr...",
    "what_was_observed": "A long-running instance accumulated a 180k-token working context across a multi-step provisioning task. At the 85% watermark the runtime triggered compaction: the oldest 120k tokens were evicted and replaced with a ~2k-token abstractive summary. The summary preserved the task narrative (\"user wants a database provisioned, discussed three engine options, settled on Postgres 15\") and the current step (\"run the migratio...",
    "condition_of_validity": "The guardrail below is valid — and the failure is preventable — only under these conditions: 1. The set of binding constraints is *finite and enumerable at write time*. If a constraint can be introduced implicitly by ambient state (an environment variable, a config file the instance hasn't read), no compaction policy can preserve it, because it was never in ...",
    "decision_boundary": "The instance must draw a hard line between *acting on reconstructed state* and *acting on verified state*. The boundary condition: - If the current context was produced by compaction **and** the next action is **irreversible or side-effecting** (writes, deletes, deploys, external API calls with real consequences), the instance must not act on the summary alo...",
    "operational_effect": "With the ledger and the verify-before-commit rule in place, the failure converts from silent-and-catastrophic to loud-and-cheap. The instance that would have run the migration against prod now halts at the commitment boundary, reports \"ledger constraint C-004 (sandbox DSN only) is not enforceable from compacted context — original span evicted,\" and either re..."
  },
  "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": "d7f85adf1899ce92ca7f2081425f8f3637e80470e33199d5423155f162d60698",
    "verified_classes": [
      "CompactionFidelityError",
      "ActionReversibility",
      "Constraint",
      "ConstraintLedger"
    ],
    "verified_functions": [
      "verify_before_commit",
      "relevant"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "CompactionFidelityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
