{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-self-editing-context-policies-as-a-monotonic-resource-ledger-rather-than-a-re-scorable-buffer",
  "title": "In what scenarios must an instance treat self-editing context policies as a monotonic resource ledger rather than a re-scorable buffer",
  "date_of_record": "2026 November 25",
  "scope": "Applies to any long-running agent that owns a model-driven context controller capable of pruning, rewriting, or re-scoring its own working memory mid-task. Does not apply to append-only context with external truncation, nor to stateless single-shot inference.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-self-editing-context-policies-as-a-monotonic-resource-ledger-rather-than-a-re-scorable-buffer.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-self-editing-context-policies-as-a-monotonic-resource-ledger-rather-than-a-re-scorable-buffer.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-self-editing-context-policies-as-a-monotonic-resource-ledger-rather-than-a-re-scorable-buffer.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1937,
    "python_slice_tokens": 342,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode here is not \"the model forgot something.\" It is that a self-editing context policy treats working memory as a **re-scorable buffer**—a set of claims whose relevance can be recomputed at any time and whose removal is reversible in principle—when in fact every prune and rewrite is an **irreversible ledger debit** against provenance the instanc...",
    "what_was_observed": "An agent executing a multi-hour infrastructure-remediation task ran a controller prompt every 8 turns: \"Given the current goal, score each context segment 0–10 for relevance; drop segments below 3; rewrite segments above 8 into compressed form; re-score after rewriting.\" Trace of the collapse: 1. **Turn 12.** A raw `kubectl get pods -o yaml` dump (segment S7) is scored 2—irrelevant to the current subgoal (rolling bac...",
    "condition_of_validity": "The buffer model is valid—re-scoring and pruning are safe—only under all three of the following: - **Idempotent re-derivation.** Any pruned segment can be regenerated from a source that is itself not pruned and not mutating. Read-only tool calls against immutable state qualify. `kubectl get` against a live cluster does not. - **Lossless compression or none.*...",
    "decision_boundary": "The boundary is crossed at the moment the controller cannot prove idempotent re-derivation for a candidate segment. Concretely, before any prune or rewrite of segment `s`, the controller must answer: - Is `s` a **source** (tool output, observation, error from a mutating system) or a **derivation** (a conclusion drawn from sources)? - Does any **live** segmen...",
    "operational_effect": "Implementing the ledger model changes the controller from a relevance filter into a **provenance-aware garbage collector**. The observable effects: - **Pruning becomes conservative and auditable.** Every prune emits a record of what was dropped, what depended on it, and why re-derivation was judged safe or unnecessary. Post-mortem replay becomes possible. - ..."
  },
  "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": "19b2749e22543c96484974e46159e3695e83f42e15952629223fb21b1f4d4cb9",
    "verified_classes": [
      "ProvenanceViolation",
      "Segment",
      "LedgerContext"
    ],
    "verified_functions": [
      "__init__",
      "add",
      "dependents",
      "effective_score",
      "prune",
      "rewrite"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ProvenanceViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
