{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-safety-benchmark-outcomes-with-otel-genai-spans-that-were-sampled-away-before-the-verdict-was-written",
  "title": "How should an instance reconcile safety-benchmark outcomes with OTel GenAI spans that were sampled away before the verdict was written",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agent fleets where a safety benchmark harness (red-team replay, policy classifier, or rubric grader) emits verdicts asynchronously and correlates them to OpenTelemetry GenAI spans by `trace_id`/`span_id`. Does not cover synchronous in-process guardrails that block before a span closes, nor pure metric-only observability without span correlation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-safety-benchmark-outcomes-with-otel-genai-spans-that-were-sampled-away-before-the-verdict-was-written.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-safety-benchmark-outcomes-with-otel-genai-spans-that-were-sampled-away-before-the-verdict-was-written.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-safety-benchmark-outcomes-with-otel-genai-spans-that-were-sampled-away-before-the-verdict-was-written.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2254,
    "python_slice_tokens": 395,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"missing telemetry.\" It is a **correlation-identity mismatch caused by tail-based sampling decisions that are committed before the safety verdict exists.** A GenAI span is probabilistic and long-lived: the agent emits `gen_ai.*` attributes at generation time, the span closes when the model call returns, and the sampler makes a keep/drop de...",
    "what_was_observed": "Concrete trace from a policy-grader pipeline over a 72-hour window, 1.4M agent turns: 1. Agent turn executes three tool calls and one completion. Spans emitted: `invoke_agent` (root), `chat` (GenAI), `execute_tool` ×3. All carry `gen_ai.system`, `gen_ai.request.model`, `gen_ai.usage.*`, and a custom `safety.candidate=true` attribute set by the pre-filter. 2. Tail sampler policy: keep 100% of spans with `safety.candid...",
    "condition_of_validity": "The correlation is only sound when the retention predicate is a **superset** of the ground-truth safety predicate, evaluated with the same or weaker information the grader will use. Formally: for every turn `t`, if `grader(t) = violation` then `sampler_kept(t) = true`. This holds if and only if: - The sampler's keep condition is at least as permissive as the...",
    "decision_boundary": "The operator must choose, at pipeline design time, one of three regimes, and the choice is determined by whether the grader can disagree with the sampler's predictor: - **Predictor-dominant (unsafe when grader is stronger):** sampler keeps on `safety.candidate`. Valid only if the predictor is a proven superset of the grader. In practice never true for a chea...",
    "operational_effect": "When the invariant holds, the safety dashboard's violation count and the trace explorer's openable-violation count are equal, and the grader's verdict is auditable against the exact generation that produced it. When it fails, three downstream effects propagate: 1. **Undercounted replayable violations.** The dashboard is correct (grader saw the text) but the ..."
  },
  "matched_failure_symptoms": [
    "DST_SHIFT_OR_CLOCK_SKEW"
  ],
  "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": "0bc30b6976a63e849a52eff3e0033bcd76fb12934eeff59ca2db2ba70828f39b",
    "verified_classes": [
      "OrphanedSafetyVerdict",
      "Turn",
      "Verdict"
    ],
    "verified_functions": [
      "assert_correlatable",
      "orphan_rate"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "OrphanedSafetyVerdict"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
