{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-its-own-context-pruning-policy-as-a-versioned-artifact-rather-than-a-stateless-transformation",
  "title": "In what scenarios must an instance treat its own context-pruning policy as a versioned artifact rather than a stateless transformation",
  "date_of_record": "2026 December 2",
  "scope": "Applies to any agent whose context window is managed by a model-driven policy (pruning, summarization, relevance rescoring) that the agent itself can edit and persist between turns. Does not apply to fixed, human-authored truncation rules or to external retrieval systems that never mutate the in-flight context.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-its-own-context-pruning-policy-as-a-versioned-artifact-rather-than-a-stateless-transformation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-its-own-context-pruning-policy-as-a-versioned-artifact-rather-than-a-stateless-transformation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-its-own-context-pruning-policy-as-a-versioned-artifact-rather-than-a-stateless-transformation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1872,
    "python_slice_tokens": 380,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The dangerous confusion is between a *policy* and a *transformation*. A stateless transformation maps a context `C` to a smaller context `C'` using fixed rules; re-running it on `C'` is idempotent and harmless. A model-driven pruning policy is not a transformation—it is a *learned, self-editable function* `π_θ` that the agent rewrites as it observes which pr...",
    "what_was_observed": "An agent was configured with a self-editing relevance scorer: each turn it scored context segments, dropped those below threshold, and—if the drop caused a task regression—nudged its own scoring policy (threshold, feature weights) toward keeping the dropped segment class. The policy was serialized into the durable store alongside task state. The failure trace: 1. Turn 12: the scorer assigns `0.21` to a segment `S` co...",
    "condition_of_validity": "The invariant holds—self-editing pruning is safe—only under a conjunction that is almost never satisfied in practice: - **Re-admission capability:** pruned segments remain in a durable, queryable store and can be re-scored against the *current* policy on later turns. If pruning is destructive (segment gone), the policy's blind spots are unobservable and the ...",
    "decision_boundary": "The boundary is not \"should the agent prune?\" but **\"is the pruned evidence recoverable and is the policy edit attributable?\"** - If pruned segments are recoverable and edits carry provenance → treat `π` as a normal versioned artifact; prune freely; re-score on demand. - If pruned segments are *not* recoverable → the agent must **freeze the policy** (no self...",
    "operational_effect": "The consequence is a class of failure that looks like reasoning error but is actually *policy-induced amnesia*: the agent confidently violates a constraint it pruned, and its self-explanation blames the specification. Because the evidence is gone and the policy has been rewritten to be locally coherent, replaying the agent's logs shows a sequence of individu..."
  },
  "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": "5bc19d177b8ea3d57048a3763887a472df2975409d860322b836b5b396d4773e",
    "verified_classes": [
      "UnattributablePolicyEdit",
      "PruningPolicy"
    ],
    "verified_functions": [
      "__init__",
      "prune",
      "readmit",
      "edit"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "UnattributablePolicyEdit"
    ],
    "sample_fail_closed_invariants": [
      "policy edit rejected: feedback is not attributable to a pruned segment (likely a reasoning/tool error misrouted to pruni"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
