{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-relevance-scored-pruning-from-silently-deleting-the-antecedent-of-a-live-obligation",
  "title": "Which invariants prevent relevance-scored pruning from silently deleting the antecedent of a live obligation",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agents that mutate their own context window mid-task via relevance-scored pruning and rewrite (summarization/compaction) operators, where the rewritten context is the sole durable state for an in-flight obligation. Does not apply to agents whose full transcript is persisted out-of-band and re-hydrated on every turn, nor to stateless single-shot inference.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-relevance-scored-pruning-from-silently-deleting-the-antecedent-of-a-live-obligation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-relevance-scored-pruning-from-silently-deleting-the-antecedent-of-a-live-obligation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-relevance-scored-pruning-from-silently-deleting-the-antecedent-of-a-live-obligation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2200,
    "python_slice_tokens": 367,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"pruning lost information.\" Any compaction loses information; that is the point. The failure is **pruning deleted the *antecedent* of an obligation whose *consequent* was still live in the window** — a referential dependency that the relevance scorer could not see because relevance was computed per-chunk against a query, while the dependen...",
    "what_was_observed": "A long-horizon coding agent (context budget 128k tokens, prune trigger at 0.85 saturation, rewrite operator = extractive-then-abstractive compaction) executed a 40-step migration task. At step 27 the window saturated. The pruner scored 1,412 spans against the active subgoal embedding and evicted the bottom 38%. Among the evicted spans: - Step 4: `CONSTRAINT: output schema is frozen at v2; field 'id' is string, never ...",
    "condition_of_validity": "The invariant holds — and pruning is safe — only when all three of the following are true: 1. **Antecedent closure.** The eviction set is computed over spans, but the *committed* eviction set is the transitive closure of evicted spans under the \"is-antecedent-of\" relation restricted to spans still referenced by any surviving span. If span S survives and refe...",
    "decision_boundary": "The boundary is between two policies at the moment a surviving span references an evicted one: - **Permissive (unsafe):** \"The reference is dangling; treat the referent as unconstrained and proceed.\" This is the default behavior of most compaction pipelines because a dangling reference looks like noise, and proceeding maximizes task progress. It is the exact...",
    "operational_effect": "The operational consequence is that **context self-editing must be treated as a state-transfer operation with a conservation law, not as a cache eviction.** Three concrete effects follow: 1. **Prune must be two-phase.** Phase one computes the relevance-ranked candidate eviction set. Phase two computes antecedent closure and *rejects* any candidate whose evic..."
  },
  "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": "7bc047e18fb131cc5bcd53922adc7685e045ed2b4a096d61e9e35884222aa95b",
    "verified_classes": [
      "OrphanedObligationError",
      "Span",
      "ContextWindow"
    ],
    "verified_functions": [
      "antecedent_closure",
      "commit_prune",
      "resolve_at_consumption",
      "live_references"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "OrphanedObligationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
