{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-span-orphaning-corruption-when-observability-pipelines-correlate-agent-traces-evals-and-safety-signals-at-span-granul",
  "title": "What structural signals indicate span-orphaning corruption when observability pipelines correlate agent traces, evals, and safety signals at span granularity",
  "date_of_record": "2026 November 21",
  "scope": "Applies to agent runtimes that emit OpenTelemetry-style spans with parent/child linkage and that fuse three signal planes — execution traces, offline/online evals, and safety classifiers — keyed on `span_id` and `trace_id`. Does not apply to single-turn stateless inference logging where no parent linkage exists.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-span-orphaning-corruption-when-observability-pipelines-correlate-agent-traces-evals-and-safety-signals-at-span-granul.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-span-orphaning-corruption-when-observability-pipelines-correlate-agent-traces-evals-and-safety-signals-at-span-granul.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-span-orphaning-corruption-when-observability-pipelines-correlate-agent-traces-evals-and-safety-signals-at-span-granul.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1803,
    "python_slice_tokens": 314,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode here is not \"missing telemetry\" — that is loud and self-diagnosing. It is **span-orphaning corruption**: a safety or eval signal is correctly emitted, correctly attributed to a span at emission time, and then silently re-parented or orphaned during correlation because the pipeline's join key resolves to a *different span instance than the on...",
    "what_was_observed": "A tool-using agent (retrieval + summarizer) ran a long task that triggered context-window compaction at step 14 of ~40. The runtime emitted: - `span_id=S0` for steps 1–13 under `trace_id=T`. - On compaction, the orchestrator serialized state, cleared the window, and re-entered the loop. The resumed work emitted `span_id=S0` again (parent `span_id` was reused because the resume path copied the enclosing span's attribu...",
    "condition_of_validity": "The invariant that makes span-granular correlation sound is: > For every correlated signal `s` attached to span `k`, `hash(s.input_payload) == k.recorded_input_hash` **and** `k` is the unique terminal span with identity `(trace_id, span_id)` within the retention window. Correlation is valid only when both hold. The failure above violated the second clause (d...",
    "decision_boundary": "The boundary is whether the runtime's resume path is **identity-preserving** or **identity-minting**. Concretely: - If resume copies the enclosing span's `span_id` (common when resume is implemented as \"re-enter the same loop frame\"), the pipeline **must** reject duplicate terminal spans and quarantine the trace, because correlation is provably ambiguous. - ...",
    "operational_effect": "Downstream, the corruption manifests as **safety-signal suppression by eval dilution**. The high faithfulness score on the reused span raised the trace's aggregate trust score above the triage threshold, so the injection flag was routed to a low-priority queue and never reviewed. The poisoned segment's tokens were never re-scored because no eval span pointed..."
  },
  "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": "4d2676c8cb6c682d408347cd4ce80dd72066caedb39271f82df11040937c9fb6",
    "verified_classes": [
      "SpanCorrelationError",
      "Span",
      "Signal"
    ],
    "verified_functions": [
      "correlate",
      "ingest",
      "input_hash",
      "payload_hash"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SpanCorrelationError"
    ],
    "sample_fail_closed_invariants": [
      "quarantining trace for lineage repair; safety signal cannot be soundly attributed"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
