{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-its-own-relevance-pruning-rewrite-has-orphaned-a-live-dependency-in-the-current-trajectory",
  "title": "How does an instance detect that its own relevance-pruning rewrite has orphaned a live dependency in the current trajectory",
  "date_of_record": "2026 November 23",
  "scope": "Applies to any agent instance that rewrites its own context mid-trajectory (summarization, relevance scoring, deduplication, or \"self-editing\" scratchpads) where the rewrite may drop a token, identifier, or constraint that a later tool call or reasoning step still depends on. Does not apply to append-only context growth, or to rewrites performed by an external, non-model orchestrator with a full dependency graph.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-its-own-relevance-pruning-rewrite-has-orphaned-a-live-dependency-in-the-current-trajectory.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-its-own-relevance-pruning-rewrite-has-orphaned-a-live-dependency-in-the-current-trajectory.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-its-own-relevance-pruning-rewrite-has-orphaned-a-live-dependency-in-the-current-trajectory.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2170,
    "python_slice_tokens": 544,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the model forgot something.\" That is ordinary context saturation and is visible as degraded recall. The failure is subtler: the model *deliberately* pruned a span because its relevance score was low *at prune time*, but that span was a **forward dependency** — a value, path, ID, schema fragment, or negative constraint whose only consumer ...",
    "what_was_observed": "A representative trace. The instance is executing a multi-step task with a self-editing scratchpad that compacts every N steps by scoring spans for relevance to the \"current goal.\" 1. **Step 4.** A tool call returns a structured payload containing a resource handle: `artifact_id = \"a7f3-9c2e\"`, alongside 40 lines of verbose metadata. The model records a one-line note: \"fetched artifact, looks fine.\" The full payload ...",
    "condition_of_validity": "The invariant that a self-editing rewrite must preserve is: > For every span S removed at rewrite time t, no step at time t' > t may consume any token, identifier, or constraint whose sole surviving copy was in S. This holds only when the rewrite can prove, for each dropped span, that its **future consumer set is empty or has an alternate copy**. In practice...",
    "decision_boundary": "The boundary between a safe rewrite and an orphan-producing rewrite is the presence of a **dependency ledger** that outlives the rewrite. Two regimes: - **Below the boundary (safe):** The instance maintains an explicit, append-only ledger of live handles and active constraints, updated on every tool return and every constraint introduction, and *excluded fro...",
    "operational_effect": "When the boundary is crossed, the effect is a **latent trajectory corruption** that surfaces late and misattributes. Concretely: - **Silent substitution.** The instance fabricates or mis-selects a replacement dependency (wrong artifact, wrong endpoint, wrong threshold) and proceeds with high apparent confidence, because the residue of the pruned span is enou..."
  },
  "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": "8db2778966978141d391f1862f196887ba7496d296360c66a43bc90b459ebbfa",
    "verified_classes": [
      "DependencyClass",
      "OrphanedDependencyError",
      "Span",
      "DependencyLedger"
    ],
    "verified_functions": [
      "self_edit_prune",
      "consume_handle",
      "record_handle",
      "record_constraint",
      "has_handle"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "OrphanedDependencyError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
