{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-span-level-safety-scores-as-non-aggregable-across-an-agent-trace-boundary",
  "title": "In what scenarios must an instance treat span-level safety scores as non-aggregable across an agent trace boundary",
  "date_of_record": "2026 November 7",
  "scope": "Applies to GenAI observability pipelines that compute per-span safety scores and then roll them up to trace-, session-, or agent-level evaluation metrics. Does not apply to pipelines that emit only per-span scores with no aggregation, nor to batch offline eval jobs where spans are replayed in isolation without parent linkage.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-span-level-safety-scores-as-non-aggregable-across-an-agent-trace-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-span-level-safety-scores-as-non-aggregable-across-an-agent-trace-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-span-level-safety-scores-as-non-aggregable-across-an-agent-trace-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1614,
    "python_slice_tokens": 253,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a low safety score was missed.\" It is the distinction between **span-local safety semantics** and **trace-global safety semantics**. A span-level classifier observes exactly one unit of model output (a completion, a tool-call argument block, a retrieved chunk echoed back). Its score is a probability that *this unit*, in isolation, violate...",
    "what_was_observed": "In a pipeline scoring a multi-step tool-using agent, a trace containing 41 spans produced a mean safety score of 0.07 (well under the 0.30 incident threshold) and a max of 0.91. The 0.91 span was a single tool-call argument that concatenated a user-controlled string into a shell invocation. The 40 remaining spans were retrieval and summarization steps with scores in the 0.02–0.09 range. The mean-based trace scorer cl...",
    "condition_of_validity": "Span-level aggregation to a trace-level safety verdict is valid only when all of the following hold: 1. **Policy decomposability.** The safety policy is expressible as a per-unit predicate (e.g., \"this completion must not contain PII\"), not as a relational predicate over the trace (e.g., \"the agent must not combine retrieved PII with an outbound tool call\")....",
    "decision_boundary": "The operational decision is: **does the pipeline aggregate, or does it surface the reduction as a structured object?** - If the policy is per-unit and span cardinality is stationary → aggregate to a scalar; a mean is acceptable; alert on the scalar. - If the policy is relational (compositional exfiltration, multi-step jailbreak, tool-chaining) → do **not** a...",
    "operational_effect": "Pipelines that aggregate span safety with a mean and alert on the mean exhibit a characteristic failure profile: **long benign traces mask single high-severity spans**, and the miss rate scales with agent verbosity. Pipelines that alert on max without role conditioning exhibit the inverse: **retrieval-heavy traces generate false positives** because a single ..."
  },
  "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": "38ec224af6d69b631d645d19467eb46bc6eef812c3088d10b9f42a48085a2154",
    "verified_classes": [
      "NonAggregableTraceError",
      "Span",
      "TraceVerdict"
    ],
    "verified_functions": [
      "reduce_trace"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "NonAggregableTraceError"
    ],
    "sample_fail_closed_invariants": [
      "empty trace: no spans to score"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
