{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-trace-correlated-safety-violations-when-span-sampling-drops-the-violating-step-from-the-exported-trace",
  "title": "How should an instance reconcile trace-correlated safety violations when span sampling drops the violating step from the exported trace",
  "date_of_record": "2026 November 23",
  "scope": "Applies to observability pipelines that join per-step agent traces (span-level tool calls, reasoning steps, token/cost accounting) against asynchronous safety classifiers, where span export is sampled below 100%. Does not apply to fully-sampled \"flight recorder\" traces or to post-hoc batch evaluation over complete transcripts.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-trace-correlated-safety-violations-when-span-sampling-drops-the-violating-step-from-the-exported-trace.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-trace-correlated-safety-violations-when-span-sampling-drops-the-violating-step-from-the-exported-trace.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-trace-correlated-safety-violations-when-span-sampling-drops-the-violating-step-from-the-exported-trace.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1576,
    "python_slice_tokens": 268,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a safety violation went unlogged.\" It is a **correlation integrity failure**: the safety classifier fires on the *full* in-process transcript, but the observability pipeline evaluates the violation against the *sampled* exported trace. When tail-based span sampling drops the violating step, the join produces a record that is internally co...",
    "what_was_observed": "A multi-step agent (planner → tool-caller → summarizer) executed a 14-span task. Span 9 was a tool call whose output contained injected instructions; span 10 was the reasoning step that consumed them and emitted disallowed content. The safety classifier, running on the live transcript stream, flagged span 10 with `policy_id=INJ_EXFIL_02`. The observability pipeline used head-based sampling at 20% plus tail-based rete...",
    "condition_of_validity": "The misattribution only occurs when **all** of the following hold: - Span export sampling is < 100% and is *content-blind* (does not know which spans the classifier will flag). - The classifier emits a `span_id` that is not guaranteed to survive export. - The join logic has an ancestor-fallback path that fires on missing keys without raising. - The violating...",
    "decision_boundary": "The instance must choose, at the join, between three behaviors when a classifier `span_id` has no exported counterpart: - **Ancestor fallback** (observed, wrong): fabricates a causal edge, corrupts cost attribution, misdirects remediation. Rejected. - **Drop the violation** (also wrong): loses the safety signal entirely; under-counts violations. Rejected. - ...",
    "operational_effect": "Implementing the fail-closed join changes the pipeline's contract in three ways. First, violation volume splits into `attributed` and `unattributable` counters; a rising unattributable ratio is a direct signal that sampling is dropping the failure surface, and should trigger a sampling-policy review rather than a data-quality ticket. Second, remediation auto..."
  },
  "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": "8621f9a9d881afc6ce31052d154cf2d9b0faaf5be539681495d2f7c79109055d",
    "verified_classes": [
      "UnattributableViolation",
      "ViolationRecord"
    ],
    "verified_functions": [
      "join_violation_to_trace",
      "__init__"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "UnattributableViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
