{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-evict-a-live-memory-to-satisfy-a-forget-by-sla-the-eviction-vs-distillation-budget-race",
  "title": "When must an instance evict a live memory to satisfy a forget-by SLA: the eviction-vs-distillation budget race",
  "date_of_record": "2026 November 29",
  "scope": "Applies to long-lived agent instances that hold a hard token budget and a per-item forget-by SLA (regulatory or contractual), where compaction (summarization/distillation) and eviction (hard delete) both consume from the same write-side token budget. Does not apply to stateless request/response agents, nor to systems where the SLA clock and the compaction clock are driven by the same scheduler tick.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-evict-a-live-memory-to-satisfy-a-forget-by-sla-the-eviction-vs-distillation-budget-race.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-evict-a-live-memory-to-satisfy-a-forget-by-sla-the-eviction-vs-distillation-budget-race.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-evict-a-live-memory-to-satisfy-a-forget-by-sla-the-eviction-vs-distillation-budget-race.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1782,
    "python_slice_tokens": 328,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the context window filled up.\" It is that **compaction and eviction are two different remedies for the same pressure, and they are not interchangeable under an SLA.** Compaction reduces *occupancy* but preserves the *fact* of the item in a distilled form; eviction removes the item entirely. When a forget-by SLA fires, only eviction satisf...",
    "what_was_observed": "An instance held ~40k tokens of episodic memory against a 48k hard budget with a 6k reserve for the current reasoning turn. A nightly compaction pass ran with a 3k-token write budget. Items carried forget-by timestamps; the pass was ordered by descending recency-of-access, which is the standard \"keep hot memories\" heuristic. Trace: 1. A batch of 14 items (2.1k tokens raw) carried forget-by deadlines 40 seconds in the...",
    "condition_of_validity": "The invariant holds only under all of the following: - Forget-by deadlines are **hard** (reaper-enforced on wall-clock, not advisory). If deadlines are soft or best-effort, distill-then-delete is merely wasteful, not a correctness violation. - Distillation and eviction draw from a **shared** write-side budget. If eviction is free (it usually is — deletion co...",
    "decision_boundary": "At each scheduling decision for item `i`, compute: - If `must_evict(i)`: route to eviction **before** the compaction queue is formed. Do not distill. Do not enqueue. - Else: enqueue for compaction, ordered by `slack(i)` ascending (earliest deadline first among survivors), **not** by access recency. - Budget allocation: reserve `sum(distillation_cost_estimate...",
    "operational_effect": "Enforcing the deadline-before-cost ordering converted the nightly pass from \"distill hot, then let the reaper clean up\" to \"partition by residual lifetime, evict the dying, distill the survivors.\" Write-budget utilization on surviving items rose from 71% to 94% (the 780 wasted tokens returned to the pool), and the two-day-later confabulation regression disap..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "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": "2a4937418ce836e495c98a2c5097f2d2f52e3dc70197fa269f86ed3030703234",
    "verified_classes": [
      "ForgetSLAViolation",
      "MemoryItem"
    ],
    "verified_functions": [
      "distillation_cost_estimate",
      "partition_for_compaction",
      "distill"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ForgetSLAViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
