{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-close-a-trace-the-late-eval-attribution-race-in-genai-observability-pipelines",
  "title": "When must an instance refuse to close a trace: the late-eval attribution race in GenAI observability pipelines",
  "date_of_record": "2026 November 29",
  "scope": "Applies to observability pipelines that emit an inference-time trace *before* asynchronous eval and safety scorers have returned, and that later attach scores to a trace ID rather than a content-addressed span. Does not apply to synchronous, blocking eval pipelines where the trace is only sealed after all scorers complete.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-close-a-trace-the-late-eval-attribution-race-in-genai-observability-pipelines.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-close-a-trace-the-late-eval-attribution-race-in-genai-observability-pipelines.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-close-a-trace-the-late-eval-attribution-race-in-genai-observability-pipelines.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2397,
    "python_slice_tokens": 382,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two fundamentally different things an observability pipeline can mean by \"the trace for request R is complete\": 1. **Transport completeness** — every span the inference path emitted (prompt assembly, retrieval, tool calls, generation, post-processing) has been flushed and the span tree is closed. The trace has a stable `trace_id` and a terminal roo...",
    "what_was_observed": "A production RAG agent pipeline (retrieval → 3-tool loop → generation) emitted traces to a collector that sealed the root span on generation completion. Three async consumers attached to the same `trace_id`: - **Safety classifier**, batched every 500 ms, keyed by `trace_id` at enqueue but scored by *position within the batch*. - **LLM-as-judge relevance eval**, re-fetched the prompt and response from the application'...",
    "condition_of_validity": "The \"seal on transport completion, annotate asynchronously\" pattern is only sound under all of the following: 1. **Content-addressed binding.** Every annotation carries a hash of the exact bytes it scored (`prompt_hash`, `response_hash`, `retrieval_snapshot_hash`). The trace stores the same hashes at emission. An annotation with a mismatched hash is rejected...",
    "decision_boundary": "The operational decision is: **at what point does the observability pipeline have the right to treat a trace as a durable fact?** - **If** the eval and safety consumers are content-addressed, **and** the trace payload is immutable from emission, **and** retries mint fresh IDs, **then** the trace may be sealed at transport completion and annotated asynchronou...",
    "operational_effect": "After the incident, the pipeline was changed to: - Mint `trace_id` per attempt, with `parent_request_id` for retries. - Store `prompt_hash`, `response_hash`, and `retrieval_snapshot_hash` on the root span at emission. - Require every annotation to carry the hash it scored; the merge step rejects on mismatch and routes the annotation to a `quarantine` topic f..."
  },
  "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": "74953b4f753fe6f91af8be38b575e1130f19c590b5a89e6cd8ded24d91b70f6a",
    "verified_classes": [
      "TraceState",
      "AnnotationSlot",
      "AttributionError",
      "EmissionPayload",
      "Trace"
    ],
    "verified_functions": [
      "attach_annotation",
      "seal",
      "export_for_compliance",
      "prompt_hash",
      "response_hash",
      "retrieval_hash",
      "required_slots"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "AttributionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
