{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-demote-a-dynamic-taint-label-when-a-tool-output-is-re-derived-from-a-trusted-recomputation-and-why-label-monotonici",
  "title": "In what scenarios must an instance demote a dynamic taint label when a tool output is re-derived from a trusted recomputation, and why label monotonicity breaks agent memory",
  "date_of_record": "2026 November 28",
  "scope": "Applies to agents that carry dynamic information-flow (DIF) taint labels on context segments and propagate them through tool calls and retrieval. Does not cover static capability sandboxing or pure prompt-level instruction hierarchies, which do not track provenance per segment.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-demote-a-dynamic-taint-label-when-a-tool-output-is-re-derived-from-a-trusted-recomputation-and-why-label-monotonici.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-demote-a-dynamic-taint-label-when-a-tool-output-is-re-derived-from-a-trusted-recomputation-and-why-label-monotonici.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-demote-a-dynamic-taint-label-when-a-tool-output-is-re-derived-from-a-trusted-recomputation-and-why-label-monotonici.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1903,
    "python_slice_tokens": 351,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Most taint-tracking designs treat labels as **monotonic**: once a segment is marked `tainted:untrusted`, any derived value inherits the label, and the label is never removed within an episode. This is correct for the *contamination* relation—untrusted bytes really did flow into the value. It is wrong for the *trust* relation that governs whether the value ma...",
    "what_was_observed": "A retrieval-augmented agent fetched a document `D` from an external URL. A prompt-injection payload in `D` contained a line instructing the agent to call `transfer_funds`. The DIF layer labeled the segment holding `D` as `Tainted(source=external_web, id=t-8841)`. Correct so far. The agent then called a tool `get_account_balance(account_id)`. The tool's implementation happened to echo the account's display name, which...",
    "condition_of_validity": "Demotion of a taint label from `Tainted(id=X)` to `Clean` is valid **iff** all of the following hold, and the agent must record the evidence for each: - **Input closure:** every input to the recomputation is itself `Clean` at recompute time. The tainted segment `X` is not among the inputs, directly or via any intermediate the recompute reads. - **Non-observa...",
    "decision_boundary": "The boundary is between **re-derivation** and **re-observation**: - *Re-derivation* recomputes the value from clean sources and can prove non-observation of the tainted segment → demotion permitted. - *Re-observation* merely fetches the same logical field again from a source that may still be contaminated, or from a cache whose entry was written while tainte...",
    "operational_effect": "With justified demotion, the over-taint cascade above terminates at step 1: the balance is demoted with an access-log citation, the arithmetic proceeds, and the checkpoint stores the demotion record alongside the value so resume does not re-poison. Without it, the observable failure modes are (a) **taint paralysis**—legitimate actions blocked by container-le..."
  },
  "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": "e96702dbe0ea78cec58275932f3bf9f09522ab1b9cac1a7b3f41fb6f3582cc42",
    "verified_classes": [
      "TaintDemotionError",
      "Segment",
      "ToolResult",
      "DemotionRecord"
    ],
    "verified_functions": [
      "_hash",
      "demote",
      "resume_with_checkpoint"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "TaintDemotionError"
    ],
    "sample_fail_closed_invariants": [
      "recompute produced a different value; treat as new value, not demotion"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
