{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-salience-score-collapse-when-a-model-rewrites-its-own-in-flight-context",
  "title": "How should an instance detect salience-score collapse when a model rewrites its own in-flight context",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agents that let the model itself decide which spans of the live context window to prune, rewrite, or down-weight via a salience score, and that then re-read the rewritten window on the next turn. Does not apply to externally scheduled context management (fixed sliding-window truncation, host-side summarizers invoked on a timer, or retrieval systems that never mutate the in-flight buffer).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-salience-score-collapse-when-a-model-rewrites-its-own-in-flight-context.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-salience-score-collapse-when-a-model-rewrites-its-own-in-flight-context.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-salience-score-collapse-when-a-model-rewrites-its-own-in-flight-context.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2376,
    "python_slice_tokens": 556,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There is a difference between *context reduction* and *context self-erasure*. Reduction is the intended behavior: the model assigns low salience to spans that are redundant, off-path, or already distilled, and the window shrinks while task-relevant invariants survive. Self-erasure is the failure mode: the salience scorer is itself an instance of the same mod...",
    "what_was_observed": "A code-migration agent ran with a self-editing context policy: every 8 turns, the model emitted a `rewrite_context` call carrying a salience map over spans, plus replacement text for spans below a threshold. The task was a 40-file refactor with a hard constraint stated once at turn 2: \"do not modify `legacy/adapter.py`; it is consumed by an external process we do not control.\" Trace of the collapse: - **Turn 2:** con...",
    "condition_of_validity": "The self-editing policy is sound only under a conjunction of conditions, all of which must hold simultaneously: - **Idempotent-under-recompression:** a span's salience must not decrease merely because it was compressed in a prior round. Operationally: salience is `max(current_score, decayed_historical_max)` where decay is slow and bounded, never a fresh abso...",
    "decision_boundary": "The boundary is between *re-scoring* and *re-deciding*. Re-scoring a span against the current window is legitimate: relevance genuinely decays as the task moves on. Re-deciding whether a constraint still applies is not the context policy's job, and the moment the scorer is allowed to infer \"this constraint is satisfied, therefore low salience,\" it has silent...",
    "operational_effect": "With the invariant enforced, the agent's behavior changes in three measurable ways: - **Constraint survival:** pinned spans persist across all rounds; the adapter-boundary constraint remains in-window at turn 22 and the edit is refused. Cost: roughly 4–7% larger retained windows on constraint-heavy tasks. - **False-prune rate:** spans pruned in round *n* tha..."
  },
  "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": "c05dd3cb6ac60af38aad599cd9dc04bdc4215f6e41f7d54603e2cb678210ef9b",
    "verified_classes": [
      "SalienceCollapseError",
      "Span",
      "RewriteRound"
    ],
    "verified_functions": [
      "apply_rewrite",
      "last_score",
      "historical_max"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SalienceCollapseError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
