{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-reject-a-parent-child-span-link-when-a-nested-agent-to-agent-trace-crosses-a-genai-semantic-convention-boundary",
  "title": "Under what conditions must an instance reject a parent-child span link when a nested agent-to-agent trace crosses a GenAI semantic-convention boundary",
  "date_of_record": "2026 December 1",
  "scope": "Applies to any agent runtime that emits OpenTelemetry spans annotated with the GenAI semantic conventions (`gen_ai.*`) and that links child agent invocations to a parent via `traceparent`/`tracestate` plus a semantic-convention-versioned attribute set. Does not apply to single-process, single-agent traces where parent and child share one SDK and one `gen_ai` schema version.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-reject-a-parent-child-span-link-when-a-nested-agent-to-agent-trace-crosses-a-genai-semantic-convention-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-reject-a-parent-child-span-link-when-a-nested-agent-to-agent-trace-crosses-a-genai-semantic-convention-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-reject-a-parent-child-span-link-when-a-nested-agent-to-agent-trace-crosses-a-genai-semantic-convention-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1597,
    "python_slice_tokens": 260,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A trace identifier is a transport-level continuity token. A GenAI semantic-convention span link is a *semantic* claim: it asserts that the child span's `gen_ai.operation.name`, `gen_ai.provider.name`, `gen_ai.request.model`, and token-accounting attributes are commensurable with the parent's, such that an aggregator summing `gen_ai.usage.input_tokens` across...",
    "what_was_observed": "A three-tier delegation chain: orchestrator (SDK schema v1.27, `gen_ai.usage.input_tokens`) → planner sub-agent (schema v1.29, `gen_ai.usage.input_tokens` but adds `gen_ai.usage.cache_read.input_tokens` as a *sibling* rather than a sub-key) → executor sub-agent (vendor-forked schema, `gen_ai.usage.prompt_tokens`). The executor's span correctly carried `traceparent` pointing at the planner's span ID, and the planner's...",
    "condition_of_validity": "The invariant that must hold for a span link to be semantically valid is: > For every child span linked to a parent, the child's `gen_ai` attribute keys that the parent's accounting logic reads must exist in the child's namespace, under the same key path, with the same unit and the same inclusion semantics (whether a token class is a sub-key or a sibling). T...",
    "decision_boundary": "An instance must **reject** the parent-child link—emit the child span with a `span.kind=INTERNAL` orphan marker and a `gen_ai.link.rejected` event rather than a parent reference—when any of the following is true: 1. The child's `tracestate` carries a `genai` schema version that differs from the parent's, *and* the parent's accounting logic reads any `gen_ai....",
    "operational_effect": "Enforcing the rejection boundary converts a silent accounting failure into a loud, localized one. The orphaned child span still appears in the trace (preserving debuggability), but the parent's budget verifier now sees an explicit gap rather than a plausible-looking sum, and must either fetch a receipt or fail the run. In the observed chain, adding the `trac..."
  },
  "matched_failure_symptoms": [
    "SUBPROCESS_PIPE_HANG_OR_FD_LEAK"
  ],
  "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": "978323315769aea7287637e9d202dbf5307df2b9a303fe817afb2b379b45effd",
    "verified_classes": [
      "SpanLinkRejected",
      "GenAISpanContext"
    ],
    "verified_functions": [
      "validate_link",
      "link_or_orphan"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SpanLinkRejected"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
