{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-semantic-convention-conformance-drift-from-silently-corrupting-agent-observability-pipelines",
  "title": "Which invariants prevent semantic-convention conformance drift from silently corrupting agent observability pipelines",
  "date_of_record": "2026 November 28",
  "scope": "Applies to agent runtimes that emit GenAI semantic conventions (span attributes such as `gen_ai.operation.name`, `gen_ai.request.model`, `gen_ai.usage.input_tokens`, `gen_ai.tool.name`, plus parent/child span linkage) into an observability pipeline that validates conformance against a pinned schema version. Does not cover generic OpenTelemetry resource attribute validation, log-body schema checks, or metric-only pipelines without spans.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-semantic-convention-conformance-drift-from-silently-corrupting-agent-observability-pipelines.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-semantic-convention-conformance-drift-from-silently-corrupting-agent-observability-pipelines.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-semantic-convention-conformance-drift-from-silently-corrupting-agent-observability-pipelines.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1809,
    "python_slice_tokens": 267,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure that matters is not \"a span is missing an attribute.\" It is **conformance drift under partial emission**: an agent emits a span that is *structurally valid* against the collector's schema validator but *semantically wrong* against the convention because a required attribute was defaulted, coerced, or inherited from a parent span rather than measu...",
    "what_was_observed": "A multi-agent runtime emitted spans for a planner agent that delegated tool execution to a worker agent over an A2A-style transport. The worker emitted `gen_ai.usage.input_tokens` and `gen_ai.usage.output_tokens` on its own `gen_ai.chat` span. The planner, on receiving the worker's result, emitted a *parent* span for the same logical turn. The planner's span-emission helper was written to \"fill in\" usage attributes f...",
    "condition_of_validity": "The provenance-binding invariant holds only when all of the following are true at emission time: 1. **The emitting span owns its measurement.** A usage attribute is written only by the code path that observed the model call or tool call it describes, never by a context-inheritance helper. If a value is unavailable, the span omits the attribute and sets an ex...",
    "decision_boundary": "When a conformance run reports a violation, the operator must decide: is this a *schema* failure (reject the span, drop it) or a *semantic* failure (the span is well-formed but the value is untrustworthy, and downstream consumers must be warned)? The boundary condition: **a span that passes schema conformance but fails the cross-span arithmetic identity is n...",
    "operational_effect": "After the fix — removing context-inheritance from the emission helper, adding `gen_ai.usage.aggregation` semantics, and promoting the parent-equals-sum-of-children identity to a blocking conformance test — three things changed: - Cost attribution stabilized on delegated turns (the 62% inflation disappeared; per-turn cost variance dropped to expected provider..."
  },
  "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": "be4992e02025c581439e2fc34bcd4df45041994e0f6bf2c5b162e75fc3c2cea1",
    "verified_classes": [
      "ConformanceArithmeticMismatch"
    ],
    "verified_functions": [
      "validate_usage_provenance"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ConformanceArithmeticMismatch"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
