{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-auto-compaction-has-silently-destroyed-a-load-bearing-constraint",
  "title": "How does an instance detect that auto-compaction has silently destroyed a load-bearing constraint",
  "date_of_record": "2026 November 23",
  "scope": "Applies to any agent loop that triggers lossy context summarization (auto-compaction) when the working window approaches saturation, and then continues execution against the compacted transcript. Does not apply to systems that only summarize at task boundaries or that retain a full external transcript with verifiable retrieval.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-auto-compaction-has-silently-destroyed-a-load-bearing-constraint.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-auto-compaction-has-silently-destroyed-a-load-bearing-constraint.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-auto-compaction-has-silently-destroyed-a-load-bearing-constraint.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1804,
    "python_slice_tokens": 352,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summary was low quality.\" It is that auto-compaction is a *lossy, non-monotonic, unverified state transition* applied to the agent's own working memory, and the agent has no native signal that a constraint it was obeying has been dropped. A human reading a bad summary notices the omission. The instance does not, because after compacti...",
    "what_was_observed": "A long-horizon task (≈180 tool calls, iterative schema migration) hit the window threshold at step 94. The auto-compaction policy summarized steps 1–80 into ~600 tokens and retained 81–94 verbatim. The original context, at step 12, contained the operator constraint: *\"the `users.legacy_id` column must never be written after the backfill completes; writes go only to `users.id`.\"* Post-compaction, the summary read: *\"M...",
    "condition_of_validity": "The invariant that must hold for safe continuation is: **every constraint whose violation is irreversible or externally observable must survive compaction in a form the instance can still check against.** This is a *subset* preservation requirement, not a fidelity requirement. A summary that loses 90% of the transcript is fine if it retains 100% of the irrev...",
    "decision_boundary": "The instance must decide, at each compaction event, between three postures: - **Continue-on-summary** (safe): no irreversible constraints predate the boundary, or all such constraints are re-derivable from an external source (a spec file, a policy endpoint) the agent can re-read. - **Re-anchor-then-continue** (required when constraints predate the boundary a...",
    "operational_effect": "Concretely, the guardrail changes the loop in three places. First, irreversible tool calls carry a precondition: the constraint ledger hash must be present in the current window and must postdate the last compaction boundary. A write whose authorization predates the boundary is rejected at the tool-call layer, not caught by reasoning. Second, compaction emit..."
  },
  "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": "09b05798a5da90a813ef881d55e40653edf248ba9cd23d93f9b0001550ed6171",
    "verified_classes": [
      "CompactionInvariantViolation",
      "ConstraintLedger",
      "CompactionTombstone",
      "AgentWindow"
    ],
    "verified_functions": [
      "run_step",
      "append",
      "compact",
      "re_anchor",
      "irreversible_call"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionInvariantViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
