{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-emits-span-attributes-that-satisfy-the-schema-but-violate-semantic-convention-cardinality-across-a-resumed-trace",
  "title": "What happens when an instance emits span attributes that satisfy the schema but violate semantic convention cardinality across a resumed trace",
  "date_of_record": "2026 November 27",
  "scope": "Applies to OpenTelemetry-style GenAI agent telemetry pipelines where spans are emitted per LLM/tool invocation and joined by `trace_id` across process restarts, async workers, or handoff boundaries. Does not apply to single-process, single-span traces or to pipelines that validate only against JSON Schema without semantic convention rules.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-emits-span-attributes-that-satisfy-the-schema-but-violate-semantic-convention-cardinality-across-a-resumed-trace.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-emits-span-attributes-that-satisfy-the-schema-but-violate-semantic-convention-cardinality-across-a-resumed-trace.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-emits-span-attributes-that-satisfy-the-schema-but-violate-semantic-convention-cardinality-across-a-resumed-trace.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1684,
    "python_slice_tokens": 356,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Schema conformance and semantic convention conformance are not the same property, and agent telemetry pipelines routinely conflate them. A span attribute set can pass structural validation (correct types, required keys present, enum values in range) while violating a *cardinality invariant* the semantic convention assumes: that within one trace, a given attr...",
    "what_was_observed": "A multi-step agent running a retrieval-then-summarize task was checkpointed mid-execution. On resume, the orchestrator reconstructed the agent's working state from an episodic log but re-derived `gen_ai.conversation.id` from a fresh session token rather than from the checkpointed value. The resumed spans carried the new conversation ID; the pre-checkpoint spans carried the old one. All spans shared a single `trace_id...",
    "condition_of_validity": "The cardinality invariant holds only under the conjunction of three conditions, and the pipeline must test all three rather than assuming them: 1. **Trace-scoped key stability.** For every attribute key declared trace-scoped by the convention (conversation ID, agent ID when the agent is singular per trace), all spans sharing a `trace_id` must carry identical...",
    "decision_boundary": "The boundary between \"acceptable divergence\" and \"conformance violation\" is whether the divergence is *declared and linkable*. A conversation ID change across a resume is a violation unless the resume boundary is marked and the change is intentional (e.g., the agent deliberately forked the conversation). A tool call ID change across a retry is acceptable onl...",
    "operational_effect": "Pipelines that validate only per-span will pass these traces indefinitely and produce silently wrong cost, latency, and token accounting — the kind of error that is invisible until a budget alarm fires or a customer disputes a bill. The fix is not stricter schema validation; it is a trace-level conformance pass that enforces the three conditions above and ra..."
  },
  "matched_failure_symptoms": [
    "SCHEMA_DRIFT_OR_COERCION_CRASH"
  ],
  "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": "ffc6ad63685e1d16acb0b87c7d532920fb55cfb8aaf696a61183dbb636b2d8dc",
    "verified_classes": [
      "SemanticConventionViolation",
      "Span"
    ],
    "verified_functions": [
      "check_trace_conformance"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SemanticConventionViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "collections",
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
