{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-a-self-editing-context-controller-has-silently-invalidated-a-downstream-invariant",
  "title": "What structural signals indicate a self-editing context controller has silently invalidated a downstream invariant",
  "date_of_record": "2026 November 23",
  "scope": "Applies to any agent loop where a controller rewrites, summarizes, or elides prior turns in-place (compaction, \"context editing,\" rolling summarization) to preserve task-relevant invariants, and where later turns depend on the *literal* content of the rewritten region. Does not apply to append-only memory with immutable turn history and read-only retrieval overlays.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-editing-context-controller-has-silently-invalidated-a-downstream-invariant.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-editing-context-controller-has-silently-invalidated-a-downstream-invariant.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-editing-context-controller-has-silently-invalidated-a-downstream-invariant.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1629,
    "python_slice_tokens": 216,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summary lost information.\" That is expected and bounded by a lossy-compression budget. The failure is **semantic drift that preserves the invariant's *proposition* while destroying the *binding* that made it executable** — the rewritten turn still *asserts* the constraint (\"must use the staging key,\" \"the ID is fixed at 4012,\" \"reject...",
    "what_was_observed": "A tool-using agent held a task invariant in turn 3: `deploy_target = \"svc-staging-a7f3\"` and a hard rule `do not touch prod-*`. At turn 11 the controller compacted turns 1–8 into a single summary turn, emitting: *\"The deployment target is the staging service; production resources must not be modified.\"* Both propositions are intact. The literal string `svc-staging-a7f3` is gone. At turn 14 the agent needed to call `d...",
    "condition_of_validity": "The guardrail holds only under this condition: **any token that a downstream tool call, verifier, or branch predicate will consume as a literal must be classified as a \"pinned referent\" before the edit, and the edit must be rejected or the referent re-injected verbatim if the rewritten region drops it.** Concretely, a self-editing controller is safe against ...",
    "decision_boundary": "The boundary between safe and unsafe edits is the point where the controller replaces a **bound value** with a **describable value**. Operationally: - **Safe:** eliding turns that contain only *reasoning* (chain-of-thought, exploratory tool calls whose outputs are already distilled into a pinned fact). Reasoning is re-derivable; its loss costs tokens, not co...",
    "operational_effect": "With the gate in place, the observable behavior changes at the failure site: instead of a plausible-but-wrong argument at turn 14, the controller either (a) keeps the definition-site turn verbatim (costing context budget) or (b) emits a structured pinned-referent block alongside the summary (`PINNED: deploy_target=\"svc-staging-a7f3\"`), which downstream turns..."
  },
  "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": "75e2892197febc3474c93aa7e11613e0d17925b5647133d605bd76a297eb732e",
    "verified_classes": [
      "PinnedReferentLoss",
      "EditProposal"
    ],
    "verified_functions": [
      "_survives_verbatim",
      "apply_edit",
      "compact_turn"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "PinnedReferentLoss"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "re"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
