{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-quarantine-provenance-degraded-memories-before-retrieval-poisons-a-long-horizon-plan",
  "title": "How should an instance quarantine provenance-degraded memories before retrieval poisons a long-horizon plan",
  "date_of_record": "2026 November 27",
  "scope": "Applies to long-horizon agents that persist episodic memories across sessions and retrieve them by semantic similarity into a working context. Does not apply to stateless single-turn inference or to retrieval over immutable, externally-signed corpora where the agent has no write path.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-quarantine-provenance-degraded-memories-before-retrieval-poisons-a-long-horizon-plan.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-quarantine-provenance-degraded-memories-before-retrieval-poisons-a-long-horizon-plan.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-quarantine-provenance-degraded-memories-before-retrieval-poisons-a-long-horizon-plan.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1910,
    "python_slice_tokens": 421,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure that matters is not \"a poisoned memory was written.\" It is that **provenance metadata and semantic similarity are orthogonal retrieval signals, and similarity-based retrieval silently outranks provenance when the two disagree.** A memory can be 0.94 cosine-similar to the current task and simultaneously carry a provenance chain that has been inval...",
    "what_was_observed": "A planning agent running a 40-step infrastructure-remediation horizon accumulated episodic memories of the form `(observation, action, outcome, provenance)`. Provenance was recorded as a triple: `(origin_tool, origin_call_id, warrant_state)`, where `warrant_state` was set to `VALID` at write time and never revisited. A summarization tool with a non-deterministic sampling temperature of 0.7 was used to distill raw too...",
    "condition_of_validity": "The pre-retrieval gating invariant is valid only under three conditions, and the agent must check all three before trusting a retrieved memory: 1. **Warrant liveness.** Every provenance record must carry a TTL or a dependency set. A memory whose origin tool call had `partial=true`, `timed_out=true`, or `sampled=true` must be marked `DEGRADED` at write time, ...",
    "decision_boundary": "The boundary between \"retrieve and proceed\" and \"quarantine and corroborate\" is drawn on the *reversibility of the planned action*, not on the confidence of the memory. A `DEGRADED` memory may ground a read-only or reversible action (querying state, staging a change) because the cost of a wrong step is recoverable. It may not ground an irreversible action (r...",
    "operational_effect": "Enforcing the pre-retrieval gate changed retrieval from a single similarity sort into a two-pass operation: pass one computes the eligible candidate set by provenance predicate; pass two sorts the eligible set by similarity and takes top-k. The measured effect on the long-horizon workload was a 100% elimination of the \"partial observation summarized as compl..."
  },
  "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": "436894b55583242e570f6aa1176659c16b5fe7e1090cf2f195d3a52c58fa6d63",
    "verified_classes": [
      "WarrantState",
      "ProvenanceGateError",
      "Provenance",
      "Memory",
      "Action",
      "RetrievalResult"
    ],
    "verified_functions": [
      "gate_candidates",
      "select_top_k",
      "dedup_replay_divergence"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ProvenanceGateError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
