{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-starve-retrieval-under-a-satisfied-latency-slo-the-compaction-credit-ordering-invariant-in-context-window-budget-arbiters",
  "title": "Why does an instance starve retrieval under a satisfied latency SLO: the compaction-credit ordering invariant in context-window budget arbiters",
  "date_of_record": "2026 November 8",
  "scope": "Applies to any context-window budget arbiter that multiplexes three consumers — compaction (history summarization), retrieval (external chunk insertion), and memory recall (persistent store lookup) — against a single token budget and a per-turn latency SLO. Does not apply to single-consumer context managers, nor to systems where compaction is performed asynchronously off the request path.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-starve-retrieval-under-a-satisfied-latency-slo-the-compaction-credit-ordering-invariant-in-context-window-budget-arbiters.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-starve-retrieval-under-a-satisfied-latency-slo-the-compaction-credit-ordering-invariant-in-context-window-budget-arbiters.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-starve-retrieval-under-a-satisfied-latency-slo-the-compaction-credit-ordering-invariant-in-context-window-budget-arbiters.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1873,
    "python_slice_tokens": 346,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A budget arbiter is usually modeled as a *feasibility* problem: given a token budget `B`, a latency budget `L`, and three candidate operations with estimated token cost `t_i` and latency cost `l_i`, admit the subset that maximizes utility subject to `Σt_i ≤ B` and `Σl_i ≤ L`. This model is correct for a single turn and catastrophically wrong across turns. Th...",
    "what_was_observed": "In a deployment serving long-horizon agent sessions (median 40 turns, p99 210 turns) with a 128k token window and a 900 ms p95 per-turn SLO, the following pattern appeared in traces: - Per-turn latency p95 held at 780–860 ms across the entire session. No SLO breach was ever recorded. - Retrieval admission rate — fraction of turns where a retrieval operation was admitted — fell from 0.91 at turn 10 to 0.34 at turn 60 ...",
    "condition_of_validity": "The invariant holds — i.e., the failure is reachable — precisely when all of the following are true: 1. **Compaction is synchronous and on the request path**, so its latency is charged to the turn that triggers it rather than to a background worker. 2. **The arbiter's latency constraint is per-turn and non-cumulative.** If the constraint were `Σ_t l_t ≤ L_to...",
    "decision_boundary": "The operational rule is a **credit ordering invariant** on the arbiter: > Compaction must be charged against the budget *before* retrieval and recall are evaluated, and its post-condition occupancy must be verified as a hard invariant `occupancy_after ≤ H` before the turn is committed. If the summarizer cannot meet the post-condition, the arbiter must escala...",
    "operational_effect": "Applying the credit ordering invariant in the same deployment: - Retrieval admission rate held at 0.88–0.94 across the full session length; the turn-120 collapse did not recur. - p95 latency rose modestly, from 840 ms to 910 ms, with a small number of turns (roughly 1.4%) exceeding the 900 ms SLO — these were turns where compaction was escalated to a hard 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": "6732645bbd3b8e685a2db40edddc17a0cce990b2b626ebaf7610906477d8bce6",
    "verified_classes": [
      "CompactionCreditViolation"
    ],
    "verified_functions": [
      "admit_retrieval",
      "run_arbiter_turn"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionCreditViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
