{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-distrust-its-own-drift-score-when-otel-genai-trace-embeddings-alias-semantically-distinct-tool-call-topologies",
  "title": "Under what conditions must an instance distrust its own drift score when OTel GenAI trace embeddings alias semantically distinct tool-call topologies",
  "date_of_record": "2026 November 29",
  "scope": "Applies to runtime anomaly detection systems that embed OpenTelemetry GenAI spans (attributes such as `gen_ai.operation.name`, `gen_ai.tool.name`, `gen_ai.usage.input_tokens`, span event sequences) into a vector space and score per-instance drift against a rolling baseline. Does not apply to pure metric-threshold alerting (latency, error rate) or to log-keyword detectors, which do not suffer the aliasing described here.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-distrust-its-own-drift-score-when-otel-genai-trace-embeddings-alias-semantically-distinct-tool-call-topologies.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-distrust-its-own-drift-score-when-otel-genai-trace-embeddings-alias-semantically-distinct-tool-call-topologies.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-distrust-its-own-drift-score-when-otel-genai-trace-embeddings-alias-semantically-distinct-tool-call-topologies.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1960,
    "python_slice_tokens": 298,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A drift score is a *distance in embedding space*. An anomaly is a *deviation in execution semantics*. These coincide only when the embedding map is injective over the set of execution traces the agent can produce. It is not. Trace embeddings are trained or constructed to place \"similar-looking\" spans near each other, and \"similar-looking\" is defined by surfa...",
    "what_was_observed": "A support-agent instance running a plan-act-verify loop emitted the following two traces within the same hour, both scored against a 7-day baseline: Trace A (baseline-conforming): - `invoke_agent` → `execute_tool retrieve_policy` (returns 3 docs) → `chat` (reasoning, 812 input tokens) → `execute_tool apply_credit` (args: `{amount: 40, ref: \"POL-7\"}`) → `execute_tool verify_ledger`. Trace B (anomalous): - `invoke_agen...",
    "condition_of_validity": "The drift score is trustworthy **iff** the embedding function φ is order-sensitive over the span DAG. Formally, for any two traces T₁, T₂ with identical span multisets but different happens-before relations, ‖φ(T₁) − φ(T₂)‖ must exceed the alert threshold. Mean-pooling, max-pooling, and bag-of-spans constructions violate this by construction. Positional enco...",
    "decision_boundary": "The boundary is between **score-as-signal** and **score-as-verdict**. - **Score-as-signal (safe):** the drift score is one input among several, and a low score triggers no action beyond \"continue.\" Guardrails that are order-sensitive—explicit precondition assertions in the tool layer, a `verify_before_act` state machine, provenance checks on arguments—carry ...",
    "operational_effect": "The practical consequence is that drift-score dashboards built on pooled trace embeddings systematically under-report exactly the anomalies that matter most for agent safety: **causal inversions** (act-before-verify), **retry storms** (multiplicity collapse), and **silent tool substitution** (a fallback tool with a similar name and arg shape). These are 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"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "90e83c1349a39dd5a4aab04e1566e79edb27b3b407b0691def2287b1759ba5f4",
    "verified_classes": [
      "DriftScoreUntrustedError",
      "Span"
    ],
    "verified_functions": [
      "topology_hash",
      "assert_score_trustworthy",
      "node_hash"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "DriftScoreUntrustedError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
