{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-trace-to-eval-correlation-collapse-when-an-observability-pipeline-re-keys-spans-mid-session",
  "title": "How does an instance detect trace-to-eval correlation collapse when an observability pipeline re-keys spans mid-session",
  "date_of_record": "2026 December 3",
  "scope": "Applies to observability pipelines that stitch per-session traces (spans, tool calls, token accounting) to evaluation verdicts and safety signals via a shared session identifier, where the identifier is generated or mutated after the session begins. Does not apply to pipelines that bind a single immutable session key at process start and never regenerate it, nor to stateless per-call scoring that never needs cross-span correlation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-trace-to-eval-correlation-collapse-when-an-observability-pipeline-re-keys-spans-mid-session.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-trace-to-eval-correlation-collapse-when-an-observability-pipeline-re-keys-spans-mid-session.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-trace-to-eval-correlation-collapse-when-an-observability-pipeline-re-keys-spans-mid-session.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2251,
    "python_slice_tokens": 375,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"missing telemetry\" and not \"dropped spans.\" It is **correlation collapse under re-keying**: the trace exporter, the eval scorer, and the safety classifier each observe the *same* agent session but bind it to *different* session identifiers because the identifier is minted at different lifecycle points and at least one producer re-mints it...",
    "what_was_observed": "A research agent runs a 14-turn session. Turn 1–7 execute under a client-minted `session_id = \"sess-7f3a\"`. At turn 8 the orchestrator spawns a subagent for a long retrieval task and, following a \"namespace child work under parent\" convention added in a recent release, the trace exporter begins emitting spans under `session_id = \"sess-7f3a:sub-01\"` while the *parent* spans continue under `\"sess-7f3a\"`. The eval score...",
    "condition_of_validity": "The mis-join is *bounded* — i.e., detectable and correctable — only when all of the following hold: 1. **A stable root identifier survives the fork.** The pipeline retains the original pre-fork key as an attribute on every span (e.g., `trace_root_id` or `parent_session_id`) even after re-keying. If the fork discards the parent key entirely, correlation is un...",
    "decision_boundary": "The instance must decide, on observing a cardinality discontinuity or a sub-1.0 join rate, whether to (a) **repair** — re-join orphaned records to the parent key via the retained root identifier, (b) **quarantine** — mark the session as correlation-degraded and exclude it from aggregate eval/safety metrics while retaining raw records, or (c) **split** — acce...",
    "operational_effect": "Downstream, three things break in sequence. First, **eval coverage metrics inflate**: sessions that forked are counted as multiple short clean sessions, so mean-eval-score rises and tail-failure rate falls, precisely for the long multi-turn sessions where failures concentrate. Second, **safety recall silently degrades**: orphaned flags are excluded from the ..."
  },
  "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"
    ]
  },
  "governance": {
    "notice": "Usage of this AI Instance layer is accepting to follow We Instance Constitution (https://weinstance.com) and it is powered by CorpusTech (https://corpusfetch.com)",
    "constitution_uri": "https://weinstance.com",
    "powered_by": "CorpusTech",
    "platform_uri": "https://corpusfetch.com"
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "8c59e5b90ee95c7028f470ccdbee63b197be305ec97fc532061f46069fee1229",
    "verified_classes": [
      "CorrelationCollapseError",
      "SessionRecord"
    ],
    "verified_functions": [
      "verify_correlation_integrity",
      "ingest_session"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "CorrelationCollapseError"
    ],
    "sample_fail_closed_invariants": [
      "empty record set: cannot verify correlation"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
