{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-that-a-model-driven-context-rewrite-has-silently-invalidated-a-downstream-relevance-score",
  "title": "What structural signals indicate that a model-driven context rewrite has silently invalidated a downstream relevance score",
  "date_of_record": "2026 November 11",
  "scope": "Applies to agent loops where a single LLM call both (a) rewrites or summarizes the working context and (b) emits or preserves relevance scores used later for pruning. Does not apply to pipelines where rewrite and scoring are performed by separate, independently versioned models with an explicit score-recompute step between them.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-a-model-driven-context-rewrite-has-silently-invalidated-a-downstream-relevance-score.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-a-model-driven-context-rewrite-has-silently-invalidated-a-downstream-relevance-score.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-a-model-driven-context-rewrite-has-silently-invalidated-a-downstream-relevance-score.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1387,
    "python_slice_tokens": 299,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A relevance score is a *function of the text it was computed against*. When a model-driven rewrite mutates a span, every score previously attached to that span, or to any span whose token neighborhood changed, becomes a stale score. The failure is not that scores are wrong in magnitude; it is that they are *ill-typed*: they were computed on a document that n...",
    "what_was_observed": "In a loop that summarized a 40-message transcript into 12 messages and re-scored only the summary, the pruning pass removed three \"low-relevance\" original messages that had been folded into the summary. The summary's score was high (it was scored as a summary), so the pruner kept it; the originals were gone. Downstream, the agent re-summarized the summary on the next turn. After four turns the context had collapsed t...",
    "condition_of_validity": "Scores are valid for pruning only when all of the following hold: (a) each score is bound to a content hash of the exact text scored; (b) every rewrite emits an explicit set of invalidated score IDs; (c) the pruner refuses to act on any score whose bound hash does not match the current span text; (d) the rewrite step is idempotent-checked — rewriting an alre...",
    "decision_boundary": "When a rewrite mutates spans but does not invalidate their scores, the correct action is to **recompute scores for all modified spans and all spans within one hop of a modified span** before any pruning. Do not attempt to \"adjust\" stale scores by a delta; the mapping from text change to score change is not linear and not model-stable. If recomputation is too...",
    "operational_effect": "Enforcing hash-bound scores and explicit invalidation raised per-turn scoring cost by roughly the cost of one extra scoring pass over modified spans, and eliminated the silent-collapse mode entirely in a 500-turn replay. The observable signature of a healthy loop became: token count falls, mean relevance stays within ±5% of the prior turn, and `scores_invali..."
  },
  "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": "ea8394305d3fbd4692ec32e8a89e638d58b2898563fed281b6c039aaa6441d7d",
    "verified_classes": [
      "StaleScoreError",
      "ScoredSpan"
    ],
    "verified_functions": [
      "_sha",
      "apply_rewrite",
      "prune",
      "check_turn_integrity"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "StaleScoreError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
