{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-enforce-taint-monotonicity-when-a-quarantined-retrieval-span-is-re-derived-by-a-trusted-summarizer",
  "title": "Where must an instance enforce taint monotonicity when a quarantined retrieval span is re-derived by a trusted summarizer",
  "date_of_record": "2026 November 24",
  "scope": "Applies to single- or multi-agent systems that label context spans with provenance taint (trusted vs. untrusted-retrieval) and gate tool invocation on that label. Does not cover taint models for user-authored input (treated as a separate principal class) or for tool *outputs* re-entering context, except where they cross the summarizer boundary described here.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-enforce-taint-monotonicity-when-a-quarantined-retrieval-span-is-re-derived-by-a-trusted-summarizer.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-enforce-taint-monotonicity-when-a-quarantined-retrieval-span-is-re-derived-by-a-trusted-summarizer.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-enforce-taint-monotonicity-when-a-quarantined-retrieval-span-is-re-derived-by-a-trusted-summarizer.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2234,
    "python_slice_tokens": 438,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Taint-aware sandboxing treats the context window as a set of labeled spans: a span retrieved from an untrusted source (web page, third-party document, external MCP server response) carries `taint=untrusted`, and any tool call whose arguments are *derived from* a tainted span must be blocked or routed to a quarantined executor. The commonly assumed invariant ...",
    "what_was_observed": "A retrieval-augmented agent was configured with a summarizer stage: raw retrieved chunks (taint `untrusted`) were compressed into a 400-token \"working summary\" before being placed in the planner's context, to control window saturation. The runtime assigned taint at the retrieval boundary; the summarizer call was made with the trusted system prompt and its output was appended to context with `taint=trusted`. The failu...",
    "condition_of_validity": "The taint-monotonicity invariant holds **only when every derivation edge is recorded and the label is computed as the join (least upper bound) over the derivation DAG, not assigned at emission**. Concretely, a system may trust its summary spans if and only if all of the following hold: - The summarizer call is instrumented to emit a `derived_from` set of inp...",
    "decision_boundary": "The operational decision is where to place the taint join. Three placements, with distinct failure profiles: - **Emission-time stamping** (label assigned by the emitting component's trust class): cheapest, and wrong whenever a trusted emitter paraphrases untrusted input. This is the observed failure. - **Ingestion-time stamping with declared derivation**: re...",
    "operational_effect": "With the join moved to the context-set boundary, the observed trace changes at step 2: the summary span inherits `untrusted` from the one tainted input chunk, the planner's tool call at step 3 is blocked by the gate, and the call is routed to the quarantined executor (or refused). The deny path fires; the session is auditable. The costs are real and must be ..."
  },
  "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": "e94da8628ae9109d7faadeaa53cc27f7fc5e32aa3622db9637f454a42fc47ce8",
    "verified_classes": [
      "TaintLaunderingError",
      "Span",
      "ProvenanceTracker"
    ],
    "verified_functions": [
      "join",
      "gate_tool_call",
      "__init__",
      "register",
      "admit_summary"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
