{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-bound-relevance-score-hysteresis-when-a-self-editing-context-policy-rewrites-its-own-eviction-threshold-mid-task",
  "title": "How should an instance bound relevance-score hysteresis when a self-editing context policy rewrites its own eviction threshold mid-task?",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agents whose context manager is itself a tool-callable operator (relevance scoring, eviction, summarization/rewrite) and whose policy parameters are stored in the same context it edits. Does not apply to externally-fixed context windows managed by a host process the agent cannot mutate.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-relevance-score-hysteresis-when-a-self-editing-context-policy-rewrites-its-own-eviction-threshold-mid-task.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-relevance-score-hysteresis-when-a-self-editing-context-policy-rewrites-its-own-eviction-threshold-mid-task.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-relevance-score-hysteresis-when-a-self-editing-context-policy-rewrites-its-own-eviction-threshold-mid-task.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2187,
    "python_slice_tokens": 449,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent forgot something.\" It is that the *policy* governing forgetting was itself subject to forgetting. In a self-editing context system, the eviction rule is a piece of state living inside the buffer it governs. When a rewrite operator compacts a span, it recomputes relevance scores against the *compacted* representation, not the ori...",
    "what_was_observed": "A long-running research agent used a self-editing policy with three operators: `score(span)`, `evict(span) if score < τ`, and `rewrite(span)` which replaced a span with a compressed summary when `len(span) > L_max`. The threshold τ and the operator definitions were stored in a reserved context region the agent could edit via a `set_policy` tool. Trace of the failure, in order: 1. Task required accumulating evidence a...",
    "condition_of_validity": "The invariant that would have bounded this: **a span's eviction eligibility must be evaluated against a score computed from the span's pre-rewrite representation, and the rewrite must carry a provenance pointer to that pre-rewrite form until the span is finally and irrevocably evicted.** Concretely, three conditions must hold for a self-editing policy to be ...",
    "decision_boundary": "The decision boundary is whether the rewrite operator is **score-preserving** or **score-altering**, and whether the agent can *tell which* before it acts. If the operator is score-preserving (e.g., a lossless deduplication that keeps all tokens the scorer keys on), the naive policy is safe and no anchoring is needed. If the operator is score-altering — whic...",
    "operational_effect": "The downstream effect is not lost context — it is *false corroboration*. An agent that evicts evidence and then re-derives it from a non-idempotent source will, with high probability, produce a final answer that cites evidence it never actually observed, and will do so with the confidence of a system that believes it has two independent confirmations. This i..."
  },
  "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": "e31ee5ef6b46ce3c8e3d67eb0076ef738873831ab9a57db1dff6d9bccc6ba65f",
    "verified_classes": [
      "PolicyEvictionViolation",
      "Span",
      "ContextPolicy",
      "ContextManager"
    ],
    "verified_functions": [
      "content_hash",
      "amend",
      "__init__",
      "write",
      "rewrite",
      "evict",
      "ingest_tool_output"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "PolicyEvictionViolation"
    ],
    "sample_fail_closed_invariants": [
      "policy amendment requires a logged reason"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
