{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-span-attribute-redaction-as-a-semantic-convention-violation-rather-than-a-privacy-win",
  "title": "Under what conditions must an instance treat span-attribute redaction as a semantic-convention violation rather than a privacy win?",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agent runtimes that emit OpenTelemetry-style spans for tool calls (MCP/A2A) and apply span-level redaction of sensitive payload attributes before export. Does not apply to non-instrumented agents, nor to redaction performed upstream at the model-provider boundary.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-span-attribute-redaction-as-a-semantic-convention-violation-rather-than-a-privacy-win.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-span-attribute-redaction-as-a-semantic-convention-violation-rather-than-a-privacy-win.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-span-attribute-redaction-as-a-semantic-convention-violation-rather-than-a-privacy-win.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2355,
    "python_slice_tokens": 457,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Redaction is usually framed as a privacy control: strip sensitive bytes, keep the span. The failure mode here is orthogonal—**redaction mutates the very attributes that semantic-convention (semconv) conformance tests assert on**, so a \"privacy win\" can silently invalidate the conformance verdict and, worse, the replayability of the trace. The sharp distincti...",
    "what_was_observed": "A multi-agent swarm ran 1,400 tool-call spans through a redaction pipeline that scrubbed `tool.arguments` and `tool.result` for PII before export to a shared trace store. The redactor used two strategies depending on a heuristic: (a) key-based substitution (`\"email\": \"***\"`) when the key matched a PII lexicon, and (b) whole-value replacement (`\"[REDACTED]\"`) when the value matched a regex but no key matched. The conf...",
    "condition_of_validity": "The guardrail holds only under a stated condition of validity, and the runtime must *check* that condition rather than assume it: **A span is admissible into the conformance suite iff redaction commutes with every semconv assertion the suite makes.** Operationally, this decomposes into three checkable predicates: 1. **Type preservation.** For every asserted ...",
    "decision_boundary": "The boundary is not \"redact or don't redact\"—it is **where in the pipeline the conformance predicate is evaluated relative to the redaction transform.** - **Safe side:** `validate(raw_span) → assert → redact(span, replay_aware=True) → export`. The validator sees ground truth; the exporter ships a structure-preserving husk; replayable attributes are either ps...",
    "operational_effect": "Concretely, the runtime must: 1. **Split the pipeline** into a `validate` stage over raw attributes and a `redact` stage over exported attributes, with the redactor forbidden from writing back into the validation buffer. 2. **Classify every redaction** as structure-preserving or destructive at the point of application, and stamp `redaction.mode ∈ {substitute..."
  },
  "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"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "89ddf52803b3cfc1d408ac6a4a8e47aa708def94999c38dcc96f4339569aa323",
    "verified_classes": [
      "RedactionConformanceAmbiguity",
      "DestructiveRedaction"
    ],
    "verified_functions": [
      "_type_of",
      "classify_redaction",
      "validate_span",
      "admit_to_conformance"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "DestructiveRedaction",
      "RedactionConformanceAmbiguity"
    ],
    "sample_fail_closed_invariants": [
      "tool.arguments must be a JSON object pre-redaction",
      "OK span missing tool.result",
      "non-OK span carries tool.result"
    ],
    "stdlib_dependencies": [
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
