{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-orphaned-safety-signals-when-trace-context-propagation-drops-across-an-async-eval-boundary",
  "title": "How does an instance detect orphaned safety signals when trace-context propagation drops across an async eval boundary",
  "date_of_record": "2026 November 29",
  "scope": "Applies to production agent observability pipelines that emit spans, eval scores, and safety-flag events from *separate* execution contexts (request thread vs. async judge/classifier workers) and correlate them post-hoc via trace/span IDs. Does not apply to synchronous in-process evals that share the agent's trace context by construction, nor to single-threaded batch scoring runs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-orphaned-safety-signals-when-trace-context-propagation-drops-across-an-async-eval-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-orphaned-safety-signals-when-trace-context-propagation-drops-across-an-async-eval-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-orphaned-safety-signals-when-trace-context-propagation-drops-across-an-async-eval-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1732,
    "python_slice_tokens": 372,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a trace is missing\" and it is not \"a safety flag fired but nobody saw it.\" The failure is a **correlation-identity split**: the safety signal is emitted correctly, the trace is emitted correctly, both are durable, and yet they never join because the safety event was produced by a worker whose trace context was *re-rooted* rather than *con...",
    "what_was_observed": "A tool-using agent emits a step span `S` with `trace_id=T` and `span_id=P`. The step's tool output is routed to an asynchronous safety classifier via a queue. The classifier worker: 1. Dequeues the payload, which contains the tool output text but — by design of the queue schema — *not* the W3C `traceparent` header, because the producer serialized only the business payload. 2. Runs the classifier, which emits a `safet...",
    "condition_of_validity": "The correlation invariant holds only when all three are true: 1. **Context continuity across the async boundary.** The producer must serialize `traceparent` (and `tracestate`) into the queue envelope, and the consumer must extract it and attach it as the parent context *before* creating any span. Payload-only serialization is the trigger condition. 2. **A jo...",
    "decision_boundary": "An instance must treat a trace as **safety-unknown, not safety-clean**, when: - The trace closed with ≥1 step whose declared safety check has no corresponding child event under that `trace_id`, AND - The step's `correlation_id` does not appear in the orphan pool either. If the `correlation_id` *does* appear among orphaned/rooted flags, the correct action is ...",
    "operational_effect": "With the invariant enforced, the observable effect is a shift in what the safety dashboard *means*: per-trace safety status becomes tri-state (`clean | flagged | unknown`), and the `unknown` bucket becomes the primary SLO — it directly measures context-propagation integrity across the async boundary. In the incident above, the `unknown` rate spiked from ~0.2..."
  },
  "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": "f41e8657590d225e17ce018a3d3cc3ea3341e9a38a64300231ad938360090249",
    "verified_classes": [
      "SafetyStatus",
      "CorrelationInvariantError",
      "Step",
      "SafetyEvent"
    ],
    "verified_functions": [
      "reconcile_trace",
      "close_trace"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "CorrelationInvariantError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
