{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-its-own-genai-spans-are-semantically-corrupt-when-the-opentelemetry-genai-conventions-permit-attribute-values-the-exp",
  "title": "How does an instance detect that its own GenAI spans are semantically corrupt when the OpenTelemetry GenAI conventions permit attribute values the exporter will silently drop",
  "date_of_record": "2026 November 21",
  "scope": "Applies to any LLM agent instance that emits OpenTelemetry spans/events under the `gen_ai.*` semantic conventions and treats span emission as a success signal. Does not apply to systems that validate span payloads against a schema before export, or that use a non-OTLP logging sink as the source of truth.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-its-own-genai-spans-are-semantically-corrupt-when-the-opentelemetry-genai-conventions-permit-attribute-values-the-exp.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-its-own-genai-spans-are-semantically-corrupt-when-the-opentelemetry-genai-conventions-permit-attribute-values-the-exp.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-its-own-genai-spans-are-semantically-corrupt-when-the-opentelemetry-genai-conventions-permit-attribute-values-the-exp.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1960,
    "python_slice_tokens": 321,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters here is between *span emission* and *span acceptance*. The OpenTelemetry GenAI conventions define attribute *names* and *types* (e.g., `gen_ai.request.model` as string, `gen_ai.usage.input_tokens` as int, `gen_ai.prompt.<n>.role` as string) but the OTLP exporter and downstream collector apply a second, independent set of constrai...",
    "what_was_observed": "A chat span was emitted for a tool-using turn. The SDK accepted the following attributes without error: - `gen_ai.system = \"openai\"` - `gen_ai.request.model = \"gpt-4o\"` - `gen_ai.operation.name = \"chat\"` - `gen_ai.prompt.0.role = \"system\"`, `gen_ai.prompt.0.content = <2100-char system prompt>` - `gen_ai.prompt.1.role = \"user\"`, `gen_ai.prompt.1.content = <340-char user message>` - `gen_ai.completion.0.role = \"assista...",
    "condition_of_validity": "The invariant holds — meaning the agent can trust its own spans — only when all three of the following are true: 1. **The exporter path is schema-validating, not schema-permissive.** The SDK's attribute setter must reject or flag values exceeding the collector's configured limits *before* `span.end()`, not after. Default OTLP exporters do not do this; they a...",
    "decision_boundary": "The boundary the agent must enforce is: **treat span emission as unverified until a receipt confirms acceptance of the specific attributes the agent depends on.** Concretely: - For any attribute the agent will later read back (prompt content for distillation, usage for budget accounting, completion for tool-call audit), the agent must either (a) emit it unde...",
    "operational_effect": "The operational effect is that an agent relying on its own GenAI spans for memory continuity will, under attribute-cap or truncation pressure, develop a *false episodic memory*: it will recall turns as empty (completion dropped) or as having different constraints than were actually given (system prompt truncated at a boundary). Distillation from this memory ..."
  },
  "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": "973eb2bd6c3af8a652e0c63a42c533139c92094443252e345c5eda522407715a",
    "verified_classes": [
      "GenAISpanSemanticCorruption",
      "SpanReceipt"
    ],
    "verified_functions": [
      "emit_with_receipt",
      "verify_readback"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "GenAISpanSemanticCorruption"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
