{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-a-self-editing-context-policy-has-crossed-its-own-rollback-horizon",
  "title": "What structural signals indicate a self-editing context policy has crossed its own rollback horizon",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agents that author their own context-rewrite policies (summarization, eviction, reordering, tool-output compression) and maintain rollback checkpoints over the resulting context state. Does not apply to statically configured context managers whose rewrite functions are fixed at deploy time, nor to single-turn inference with no persistent state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-editing-context-policy-has-crossed-its-own-rollback-horizon.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-editing-context-policy-has-crossed-its-own-rollback-horizon.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-editing-context-policy-has-crossed-its-own-rollback-horizon.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1873,
    "python_slice_tokens": 322,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A model-authored context rewrite is not a data transformation; it is a **self-modifying commitment**. The agent proposes a policy `P_t` (e.g., \"collapse tool outputs older than turn 12 into a 2-line digest\"), executes it against the live context, and retains a checkpoint `C_{t-1}` for rollback. The intuitive invariant—\"if the rewrite degrades performance, ro...",
    "what_was_observed": "A long-horizon coding agent (≈180 turns, 9 tool families) was instrumented to author its own eviction policy each 10 turns. At turn 40 it emitted `P_40`: \"compress all `grep`/`ls` outputs older than 15 turns to filenames only; keep file *contents* verbatim.\" Justification span, retained at turn 40: > `grep` results are re-derivable; file contents are expensive to re-read. At turn 70, a second rewrite `P_70` compresse...",
    "condition_of_validity": "The rollback-horizon invariant holds only when the following is true of every checkpoint `C_k` in the retained stack: > For each active rewrite policy `P_i` with `i > k`, `C_k` must contain either (a) the verbatim spans that `P_i` removed, or (b) the verbatim justification span for `P_i`, or (c) an explicit, machine-readable tombstone naming `P_i`, its remov...",
    "decision_boundary": "The boundary between a safe rewrite and a horizon-crossing rewrite is drawn at the moment the policy's *scope predicate* overlaps its own *justification span*. Concretely: - If `scope(P_t) ∩ justification(P_t) = ∅`, the rewrite is horizon-safe: the reason survives the act. - If the intersection is non-empty, the rewrite is **self-erasing** and must be gated ...",
    "operational_effect": "Enforcing the provenance-reconstructability condition changes three things in the agent loop. (1) Every checkpoint write must carry a **policy ledger**: the set of active policies with their removed span-IDs and falsification conditions, stored outside the compressible context region so no self-edit can reach it. (2) Every proposed rewrite must pass a **scop..."
  },
  "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": "584ae959e25586031c179e1c44c8342577f85a57e54f2f02c238038cc88d9e48",
    "verified_classes": [
      "RollbackHorizonExceeded",
      "SelfErasingRewrite",
      "Policy",
      "Checkpoint"
    ],
    "verified_functions": [
      "propose_rewrite",
      "rollback",
      "can_falsify"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "RollbackHorizonExceeded",
      "SelfErasingRewrite"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
