{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-re-derive-taint-from-a-context-provenance-graph-instead-of-trusting-the-recorded-label",
  "title": "When must an instance re-derive taint from a context provenance graph instead of trusting the recorded label?",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agent runtimes that persist a provenance graph (nodes = memory writes, tool calls, retrieved chunks; edges = \"derived-from\") and use it to propagate taint labels for audit and re-derivation. Does not cover stateless single-turn calls or systems where memory writes are never re-read across sessions.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-re-derive-taint-from-a-context-provenance-graph-instead-of-trusting-the-recorded-label.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-re-derive-taint-from-a-context-provenance-graph-instead-of-trusting-the-recorded-label.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-re-derive-taint-from-a-context-provenance-graph-instead-of-trusting-the-recorded-label.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1601,
    "python_slice_tokens": 422,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A provenance graph records *why* a memory write exists: which tool call, which retrieved chunk, which prior write it descended from. Taint labels are a *summary* of that graph — a boolean or enum (\"trusted\", \"untrusted-from-web\", \"user-supplied\") attached to each node at write time. The distinction that matters operationally is between **label trust** and **...",
    "what_was_observed": "An agent session wrote a memory node `M7` summarizing a user's stated preference. At write time, `M7`'s only ancestor was tool call `T2` (a `read_user_profile` call), so it was labeled `trusted`. Three turns later, the agent performed a `fetch_url` call `T9` whose output was summarized into `M11`, and a consolidation pass merged `M7` and `M11` into `M7'` by adding an edge `M7' → T9`. The merge updated `M7'`'s content...",
    "condition_of_validity": "The invariant that makes label-trust safe is: > For every node `n`, `label(n) == join{ label(a) : a ∈ ancestors(n) }`, where `join` is the taint lattice join (untrusted dominates trusted). This holds *only* if every graph mutation that adds an ancestor edge also re-propagates the label to the node and all descendants. The three mutations that violate it in p...",
    "decision_boundary": "An instance must **re-derive taint from the graph** rather than trust the label when any of the following hold: - The node was produced by a merge/consolidation operation (its `write_kind` is `merged` or its `parent_count > 1`). - The node's `label_epoch` is older than the max `mutation_epoch` over its ancestor set — i.e., an ancestor was added after the lab...",
    "operational_effect": "The guardrail is a **taint-epoch fence**: every graph mutation bumps a global `mutation_epoch`; every label records the epoch at which it was computed; a read path that encounters `label_epoch < max_ancestor_mutation_epoch` refuses to serve the cached label and forces a bounded-depth ancestor traversal to recompute the join. Depth is bounded because provenan..."
  },
  "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": "cf646676ada03ebc25c0941020a9c34192804d1f99865478ce303c9ccb8a2749",
    "verified_classes": [
      "Taint",
      "StaleTaintLabelError",
      "Node",
      "ProvenanceGraph"
    ],
    "verified_functions": [
      "gate_action",
      "__init__",
      "bump_epoch",
      "add_edge",
      "_max_ancestor_epoch",
      "resolve_taint",
      "_recompute"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "StaleTaintLabelError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
