{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-reject-a-linked-trace-span-parent-span-aliasing-across-agents-under-genai-semantic-conventions",
  "title": "When must an instance reject a linked trace span: parent-span aliasing across agents under GenAI semantic conventions",
  "date_of_record": "2026 December 1",
  "scope": "Applies to multi-agent systems that emit OpenTelemetry spans using GenAI semantic conventions (`gen_ai.*`) and correlate cross-agent work by linking spans (via `SpanLink` / `trace_state` propagation) rather than strict parent-child nesting. Does not apply to single-process, single-agent tracing where every span shares one `trace_id` and a linear parent chain.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-reject-a-linked-trace-span-parent-span-aliasing-across-agents-under-genai-semantic-conventions.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-reject-a-linked-trace-span-parent-span-aliasing-across-agents-under-genai-semantic-conventions.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-reject-a-linked-trace-span-parent-span-aliasing-across-agents-under-genai-semantic-conventions.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1570,
    "python_slice_tokens": 321,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different ways a downstream agent span can be connected to an upstream agent span, and they fail in opposite directions: 1. **Nested parent-child** (`parent_span_id` set, same `trace_id`): the child inherits the parent's trace context implicitly. Correlation is guaranteed by construction, but the child is *captured* by the parent's...",
    "what_was_observed": "A three-agent pipeline (planner → tool-runner → auditor) emitted spans across two services. The planner and auditor were the *same model deployment* and therefore shared `gen_ai.agent.id = \"agent-orchestrator-v3\"`. The planner opened a trace, fanned out tool calls, and handed a `SpanLink` to the tool-runner's trace. The auditor, invoked later in the same `gen_ai.conversation.id`, opened its *own* trace and linked bac...",
    "condition_of_validity": "A `SpanLink` is a *valid* correlation edge only if all of the following hold; if any fails, the consumer must treat the link as unverifiable and must not join on it: - **Identity uniqueness:** the `(gen_ai.agent.id, gen_ai.conversation.id)` pair does not collide across distinct logical agents. Same model deployment ≠ same agent instance. The invariant is *ag...",
    "decision_boundary": "The correlator must choose between **attribute-join** and **link-follow** per edge, and the rule is asymmetric: - **Follow the link** when the link target's `trace_id` differs and the target carries a matching run-id warrant — this is the only case where cross-trace causality is asserted by the producer. - **Reject the link and fall back to no edge** when th...",
    "operational_effect": "Enforcing this boundary converts a silent history rewrite into an explicit, logged rejection. In the pipeline above, the fix was to mint a per-invocation `gen_ai.agent.id` (deployment id + instance nonce) and stamp `run.id` into `trace_state` on every handoff. The correlator then rejected the planner↔auditor aliased link, emitted the auditor as a separate ro..."
  },
  "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": "f49c32a31c7cf23944081765f5e4464e54ee6bacf06c8da60a3bdacfd04028e2",
    "verified_classes": [
      "TraceLinkRejected",
      "SpanRef"
    ],
    "verified_functions": [
      "validate_link",
      "build_edge"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TraceLinkRejected"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
