{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-re-derive-eviction-eligibility-from-raw-turn-provenance-rather-than-trusting-a-cached-protected-span-manifest",
  "title": "Under what conditions must an instance re-derive eviction eligibility from raw turn provenance rather than trusting a cached \"protected span\" manifest",
  "date_of_record": "2026 December 1",
  "scope": "Applies to agents that rewrite their own context in place—maintaining a mutable protected-span manifest (pinned tool outputs, task anchors, safety constraints) and evicting non-protected turns to fit a token budget. Does not apply to append-only context with external truncation, nor to stateless single-shot calls where no rewrite occurs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-re-derive-eviction-eligibility-from-raw-turn-provenance-rather-than-trusting-a-cached-protected-span-manifest.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-re-derive-eviction-eligibility-from-raw-turn-provenance-rather-than-trusting-a-cached-protected-span-manifest.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-re-derive-eviction-eligibility-from-raw-turn-provenance-rather-than-trusting-a-cached-protected-span-manifest.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1976,
    "python_slice_tokens": 378,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Self-editing context policies usually maintain two artifacts: (1) the live turn buffer, and (2) a *protected-span manifest*—a compact index of byte/turn ranges the policy has decided must survive eviction (the original task statement, the most recent tool schema, safety directives, in-flight plan anchors). The manifest exists because re-scanning the full buf...",
    "what_was_observed": "An agent running a 64k-token budget with a 12k-token reserve for the response was executing a multi-step tool workflow. Turn 0 held the user task (\"summarize the three CSVs and flag anomalies\"). Turns 4–6 held three `read_file` tool outputs whose schemas were pinned as protected so the final synthesis could cite row indices. The manifest recorded `protected = [{turn: 0}, {turn: 4..6, kind: schema}]`. Mid-task, the po...",
    "condition_of_validity": "The cached-manifest optimization is sound only under a conjunction of conditions, and the failure occurs when any one is violated while the others still hold—which is why it is easy to miss: 1. **Provenance stability:** no eviction, split, merge, or reorder operation has run since the manifest was derived. Violated by the very act of evicting. 2. **Offset an...",
    "decision_boundary": "- **Re-derive from raw provenance** when: any buffer mutation occurred since last derivation (eviction, merge, split, reorder, in-place rewrite); OR the manifest is positional and the buffer length changed; OR a protected span's content hash no longer resolves. Re-derivation cost is O(protected spans × buffer scan) and is bounded by the protection set size, ...",
    "operational_effect": "Downstream, a stale manifest produces **silent relevance loss**: protected content is evicted while the policy believes it is pinned, and the agent proceeds with headroom to spare, so no budget alarm fires. The failure surfaces only as degraded output quality—hallucinated citations, lost schema mappings, dropped safety directives—which is exactly the class o..."
  },
  "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": "6a8b6c6fddab316db384221e7429994e6b70eab31446e1bcd7ecd0eee296122a",
    "verified_classes": [
      "StaleProtectionManifestError",
      "Turn",
      "ProtectedSpan",
      "Manifest"
    ],
    "verified_functions": [
      "_hash",
      "derive_manifest",
      "validate_manifest",
      "evict"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "StaleProtectionManifestError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
