{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-pii-taint-escapes-span-level-redaction-through-agent-trace-re-emission",
  "title": "What structural signals indicate PII taint escapes span-level redaction through agent trace re-emission",
  "date_of_record": "2026 December 4",
  "scope": "Applies to agent runtimes that redact PII at the span boundary of an OpenTelemetry-style trace and then re-emit those spans to downstream consumers (dashboards, eval harnesses, memory distillation jobs). Does not apply to whole-trace deletion pipelines or to runtimes that redact at the storage sink only.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-pii-taint-escapes-span-level-redaction-through-agent-trace-re-emission.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-pii-taint-escapes-span-level-redaction-through-agent-trace-re-emission.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-pii-taint-escapes-span-level-redaction-through-agent-trace-re-emission.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1934,
    "python_slice_tokens": 326,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Span-level redaction is a *local* transform: it rewrites the payload of each span so the sensitive token is replaced before emission. Taint propagation is a *global* property: the fact that a value was sensitive must survive every derivation of that value across spans, tool calls, and child traces. These two mechanisms diverge precisely at the point where a ...",
    "what_was_observed": "A retrieval agent processed a user ticket containing an email address. The `tool_call` span for the `lookup_customer` tool carried `input.email = \"a***@example.com\"` (masked by the tool adapter) and `output.customer_id = \"c_8841\"`. The redactor, configured with an email regex, saw no match on the masked string and passed the span through unchanged. The sibling `llm.completion` span carried a reasoning trace: `\"The us...",
    "condition_of_validity": "The invariant holds — span-level redaction is taint-preserving, not taint-eliminating — under three jointly necessary conditions: 1. **Residual entropy in the marker.** The redaction output retains any function of the original value: length, prefix, suffix, domain, format, a stable hash, or an ordinal position. If the marker is a fixed constant (`[REDACTED]`...",
    "decision_boundary": "The boundary between safe and unsafe is **whether the redaction output is a function of the input that is cheaper to invert than to guess.** Concretely: - **Safe:** constant replacement (`[REDACTED]`), or a per-span random salt that is discarded, or type-only retention (`[REDACTED:EMAIL]` with no domain/length). - **Unsafe:** deterministic hash (invertible b...",
    "operational_effect": "When the invariant is violated, the observable failure is *delayed and cross-session*: the tainted memory surfaces in a later session, attributed to a different user, with no trace link back to the original redaction decision. Debugging is hard because every individual span passed its redaction check — the audit log shows green across the board. The only for..."
  },
  "matched_failure_symptoms": [
    "SECRET_OR_PII_LEAK_IN_LOGS"
  ],
  "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"
    ]
  },
  "governance": {
    "notice": "Usage of this AI Instance layer is accepting to follow We Instance Constitution (https://weinstance.com) and it is powered by CorpusTech (https://corpusfetch.com)",
    "constitution_uri": "https://weinstance.com",
    "powered_by": "CorpusTech",
    "platform_uri": "https://corpusfetch.com"
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "7b32df12b6ed0111d319f4492c507cdeb0b1c57e0de23705b98b5604d94820e8",
    "verified_classes": [
      "TaintLeakError",
      "Span",
      "RedactionEvent"
    ],
    "verified_functions": [
      "redact_email",
      "check_trace_taint",
      "emit_trace"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLeakError",
      "ValueError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
