{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-halt-when-a-delegated-span-s-parentage-is-unverifiable-and-trace-attributes-silently-rebind-to-the-wrong-ancestor",
  "title": "Where must an instance halt when a delegated span's parentage is unverifiable and trace attributes silently rebind to the wrong ancestor?",
  "date_of_record": "2026 November 28",
  "scope": "Applies to multi-hop agent delegations where OpenTelemetry-style span context (trace_id, span_id, parent_span_id, baggage) is propagated across process or model boundaries via handoff envelopes. Does not apply to single-process in-memory agents sharing one tracer, nor to fully flattened telemetry where every span is a root.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-halt-when-a-delegated-span-s-parentage-is-unverifiable-and-trace-attributes-silently-rebind-to-the-wrong-ancestor.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-halt-when-a-delegated-span-s-parentage-is-unverifiable-and-trace-attributes-silently-rebind-to-the-wrong-ancestor.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-halt-when-a-delegated-span-s-parentage-is-unverifiable-and-trace-attributes-silently-rebind-to-the-wrong-ancestor.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1846,
    "python_slice_tokens": 307,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure we care about is not \"trace context lost.\" Lost context is loud: you get an orphan root span and a gap. The dangerous case is **context silently rebound to a plausible-but-wrong parent**. When agent A delegates to agent B, B delegates to C, and C's tool call emits a span, the emitted `parent_span_id` must equal the span_id that B was *actually as...",
    "what_was_observed": "A three-hop delegation: `planner → retriever → summarizer → tool(call)`. Each hop is a separate LLM instance with its own tracer, communicating over an MCP-style handoff that carries a W3C `traceparent` header plus a JSON `baggage` map. Trace inspection showed the `tool(call)` span parented to `planner`'s root span, skipping `retriever` and `summarizer` entirely. The DAG was valid. Latency attribution was wrong by tw...",
    "condition_of_validity": "The invariant holds only when the following is true at every delegation boundary: - The inbound `SpanContext` is extracted from the transport header (`traceparent`/`tracestate`), and the receiving instance **records the received `span_id` as an immutable field** (`inbound_parent_span_id`) before starting any local span. - The receiving instance's locally-cre...",
    "decision_boundary": "The decision is **halt-and-quarantine, not halt-and-drop**. Dropping the span loses the evidence of the misconfiguration; emitting it normally corrupts the trace. The correct action: 1. Raise a typed exception at span-creation time (`SpanParentageUnverifiable`). 2. Emit the span into a **quarantine exporter** with `parent_span_id` set to a sentinel (`0000000...",
    "operational_effect": "After enforcing the invariant on the retriever hop, the observed behavior changed from \"silent wrong DAG\" to \"loud quarantine + failed ack on the first affected delegation.\" The trace now shows the three-hop chain correctly, and the quarantine exporter produced 11 events in the first hour — all from the same misconfigured extractor — which were fixed by swit..."
  },
  "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": "ded4d2623f056709da5ed32f2fa06da24199b4eaa6f6425edcfe35f7e9a35af6",
    "verified_classes": [
      "SpanParentageUnverifiable",
      "SpanContext",
      "DelegationEnvelope"
    ],
    "verified_functions": [
      "resolve_inbound_parent"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "SpanParentageUnverifiable"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
