{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-compacts-its-context-window-and-the-eviction-metric-reports-high-fidelity-on-a-summary-that-has-silently-dropped-the-bin",
  "title": "What happens when an instance compacts its context window and the eviction metric reports high fidelity on a summary that has silently dropped the binding constraints",
  "date_of_record": "2026 November 25",
  "scope": "Applies to long-running agent instances that perform periodic context compaction (summarization + eviction) over a retrieval-augmented episodic store, where a fidelity score gates whether the compacted summary replaces the raw turn history. Does not apply to stateless single-turn calls or to architectures that retain the full raw log and only summarize for display.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-its-context-window-and-the-eviction-metric-reports-high-fidelity-on-a-summary-that-has-silently-dropped-the-bin.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-its-context-window-and-the-eviction-metric-reports-high-fidelity-on-a-summary-that-has-silently-dropped-the-bin.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-its-context-window-and-the-eviction-metric-reports-high-fidelity-on-a-summary-that-has-silently-dropped-the-bin.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1956,
    "python_slice_tokens": 352,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two different things an operator can mean by \"compaction fidelity,\" and conflating them is the root of the failure: 1. **Reconstruction fidelity** — can a reader (or a downstream LLM) recover the *gist* of the evicted turns from the summary? This is what most fidelity metrics measure: embedding cosine similarity between the summary and the source s...",
    "what_was_observed": "An agent running a 14-turn infrastructure-remediation task compacted its history at turn 9. The compactor produced a 380-token summary of turns 1–8 and scored it at 0.88 cosine similarity against the concatenated source embeddings, with an LLM-judge score of \"faithful.\" The summary read, in substance: *\"User asked to migrate the staging database; agent inspected schema, confirmed 12 tables, planned a dump-and-restore...",
    "condition_of_validity": "The eviction is safe only if *all* of the following hold. If any fails, the fidelity score is not a valid gate: 1. **Constraint inventory is closed and known.** Before compaction, the instance must have an explicit, enumerable set of binding constraints extracted from the raw turns (imperatives, negations, numeric bounds, entity-scoped prohibitions, identity...",
    "decision_boundary": "The operational rule is a split gate, and the split is the whole point: - **If the compacted summary is the *only* surviving representation of the evicted turns for the remainder of the task** → the gate must be **constraint-preservation**, evaluated as a hard binary over the enumerated constraint set. Any dropped or mis-bound constraint fails the compaction...",
    "operational_effect": "When this boundary is respected, compaction becomes a *lossy-but-bounded* operation: the summary may lose gist, but it provably retains every fact that gates a future action, and any constraint the extractor failed to enumerate is still recoverable because eviction is gated on the enumeration being complete and the archive being inline-reachable. When it is ..."
  },
  "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": "0bf67b48dbf1328c1c7242c1dd7791d43985cf8b398aa86cbcbef60490238785",
    "verified_classes": [
      "CompactionFidelityError",
      "Constraint",
      "CompactionResult"
    ],
    "verified_functions": [
      "gate_eviction"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CompactionFidelityError"
    ],
    "sample_fail_closed_invariants": [
      "no constraints enumerated from raw turns; reconstruction fidelity is not a valid eviction gate"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
