{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-redact-a-span-it-cannot-attribute-the-unredactable-span-deadlock-in-cost-attributed-genai-observability-pipelines",
  "title": "When must an instance refuse to redact a span it cannot attribute: the unredactable-span deadlock in cost-attributed GenAI observability pipelines",
  "date_of_record": "2026 December 2",
  "scope": "Applies to observability pipelines that emit one span per LLM call, attach prompt/response payloads to those spans, and apply (a) PII/secret redaction and (b) token-cost attribution as post-processing stages keyed on span ID and parent-child linkage. Does not apply to stateless log scrubbers that never join spans, nor to pipelines where cost is computed inside the model gateway before span emission.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-redact-a-span-it-cannot-attribute-the-unredactable-span-deadlock-in-cost-attributed-genai-observability-pipelines.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-redact-a-span-it-cannot-attribute-the-unredactable-span-deadlock-in-cost-attributed-genai-observability-pipelines.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-redact-a-span-it-cannot-attribute-the-unredactable-span-deadlock-in-cost-attributed-genai-observability-pipelines.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2137,
    "python_slice_tokens": 346,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *redaction as a field transform* and *redaction as a graph operation*. A field transform is idempotent and local: given a span's payload and a policy, produce a redacted payload. A graph operation is neither: the redactor must decide whether a span's payload is safe to emit *given what other spans in the trace will rev...",
    "what_was_observed": "A trace for a multi-step agent run, 41 spans, root at `trace_id=8f2c...`. Spans 1–12 (the planning phase) completed and were flushed by the redaction worker within the 30-second batch window. The redaction worker, on flush, replaced each payload with a salted hash receipt and a `redaction_manifest` field listing which regex classes fired. It then dropped the plaintext. Spans 13–41 (tool execution and synthesis) ran f...",
    "condition_of_validity": "The invariant that was assumed and that failed: > *For every span S, the pair (redaction_state(S), attribution_state(S)) is monotone: once redaction has fired on S, attribution of any descendant of S must either already be complete or must be computable from redaction-surviving metadata alone.* This holds only if attribution is *content-independent* — i.e., ...",
    "decision_boundary": "The decision the pipeline must make, per span, at the moment redaction is about to fire: - If the span has **no unflushed descendants** and attribution is complete for its subtree → redact, emit receipt, drop plaintext. Safe. - If the span has **unflushed descendants** and the attribution function is **content-independent** → redact, but the receipt must car...",
    "operational_effect": "Concretely, the guardrail is a *deferred-redaction hold* with three properties: (1) the hold is keyed on `(trace_id, span_id)` and blocks redaction of any ancestor of an open descendant; (2) the hold is released only by an attribution-complete signal that carries proof of content-independence, or by the descendant itself being redacted first (bottom-up redac..."
  },
  "matched_failure_symptoms": [
    "SQLITE_BUSY_OR_DEADLOCK"
  ],
  "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": "653677377588de277cfa5d1914a018aa6b17f711284edc8414b5a7357bf6e3fe",
    "verified_classes": [
      "RedactionOrderingViolation",
      "AttributionMode",
      "Span",
      "TraceGraph"
    ],
    "verified_functions": [
      "request_redaction",
      "descendants"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "RedactionOrderingViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
