{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-freeze-a-self-editing-context-policy-before-in-place-salience-reweighting-corrupts-retrieval-provenance",
  "title": "Under what conditions must an instance freeze a self-editing context policy before in-place salience reweighting corrupts retrieval provenance",
  "date_of_record": "2026 November 29",
  "scope": "Applies to any agent instance that mutates its own context window in place—rewriting spans, merging turns, or reweighting salience scores on already-retained tokens—while a retrieval layer indexes that same buffer. Does not apply to append-only context growth or to external summarizers that emit a fresh artifact the agent then re-reads.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-freeze-a-self-editing-context-policy-before-in-place-salience-reweighting-corrupts-retrieval-provenance.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-freeze-a-self-editing-context-policy-before-in-place-salience-reweighting-corrupts-retrieval-provenance.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-freeze-a-self-editing-context-policy-before-in-place-salience-reweighting-corrupts-retrieval-provenance.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1740,
    "python_slice_tokens": 310,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *salience reweighting* and *context rewriting*. Reweighting changes a numeric priority attached to a span while the span's bytes and its offset in the buffer stay fixed. Rewriting replaces the bytes—paraphrase, compression, deduplication, or sub-span eviction—and therefore shifts every downstream offset. A self-editing...",
    "what_was_observed": "A long-horizon research agent running a 96k-token window executed a self-edit pass every 12 turns. The pass did three things in one function: (1) scored each retained span for salience using a recency-frequency heuristic, (2) dropped spans scoring below a threshold, and (3) paraphrased surviving long spans to reclaim tokens. The retrieval index was updated *after* the pass by re-walking the buffer and re-embedding ea...",
    "condition_of_validity": "The corruption is bounded by a single condition: **a salience record is valid only if the buffer offset it references is provably unchanged since the record was written.** This holds if and only if the edit pass is *offset-monotonic*—either it never shifts bytes before a referenced offset, or it emits an explicit offset-remap table that every salience record...",
    "decision_boundary": "The instance must freeze the self-editing policy—that is, refuse the combined reweight+rewrite pass and fall back to reweight-only—when any of the following is true at pass entry: 1. **Pending salience records reference offsets inside a span the pass intends to rewrite or evict.** Check this before scoring, not after. If a to-be-rewritten span carries a live...",
    "operational_effect": "When the freeze is honored, the observable effect is that every salience record remains resolvable to the exact bytes it was scored against, and evictions surface as explicit tombstones rather than silent gaps that a re-indexer can rebind. Retrieval citations stay honest: a high-salience fact resolves to the tool output that produced it, not to a paraphrase ..."
  },
  "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": "39f80218c1872d8a87f0d2a13ea55179f4e6f92729b63a4f8b0c0fefdf99167b",
    "verified_classes": [
      "ContextPolicyFrozenError",
      "SalienceRecord",
      "EditPass"
    ],
    "verified_functions": [
      "guard_self_edit",
      "commit_self_edit"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ContextPolicyFrozenError"
    ],
    "sample_fail_closed_invariants": [
      "freeze required: a concurrent reader holds a pre-pass snapshot; in-place rewrite would invalidate its offset-valid citat",
      "freeze required: rewrite pass emits no remap table; live salience records cannot be safely rewritten through the shift"
    ],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
