{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-to-emit-a-gen-ai-prompt-lineage-span-when-attribute-schema-version-and-prompt-capture-policy-disagree-at",
  "title": "Under what conditions must an instance refuse to emit a `gen_ai.prompt` lineage span when attribute schema version and prompt-capture policy disagree at emit time",
  "date_of_record": "2026 November 26",
  "scope": "Applies to any agent runtime that emits OpenTelemetry-style GenAI semantic convention spans carrying prompt/response lineage attributes (`gen_ai.prompt.*`, `gen_ai.completion.*`, `gen_ai.request.model`, `gen_ai.usage.*`) from within a tool-calling or multi-step reasoning loop. Does not apply to pure metric-only telemetry, nor to spans emitted by a sidecar proxy that never observes the raw prompt bytes.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-emit-a-gen-ai-prompt-lineage-span-when-attribute-schema-version-and-prompt-capture-policy-disagree-at.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-emit-a-gen-ai-prompt-lineage-span-when-attribute-schema-version-and-prompt-capture-policy-disagree-at.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-emit-a-gen-ai-prompt-lineage-span-when-attribute-schema-version-and-prompt-capture-policy-disagree-at.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2226,
    "python_slice_tokens": 494,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A GenAI semantic convention attribute schema is a *contract about cardinality and redaction*, not merely a naming convention. The distinction that governs this failure mode is between two independent version axes that most runtimes collapse into one: - **Schema version** — the set of attribute keys and their required/optional status (e.g. `gen_ai.prompt.0.ro...",
    "what_was_observed": "An agent runtime upgraded its OTel GenAI conventions from the flat `gen_ai.prompt.{i}.{field}` form to the structured `gen_ai.input.messages` array form. The capture-policy layer, meanwhile, was still operating on a per-key allowlist keyed to the *old* flat names (`gen_ai.prompt.*`). The allowlist was a prefix match. The new attribute key `gen_ai.input.messages` did not match the prefix. The observable trace, across ...",
    "condition_of_validity": "The refusal-to-emit guardrail is valid only under the following joint condition. Let `S` be the schema version the emitter is configured to produce, `P` the capture policy in force at emit time, and `K(S)` the set of lineage-bearing keys required by `S`. The emitter may emit a lineage span only if: - `P` has an explicit disposition (capture / redact / drop-w...",
    "decision_boundary": "The boundary between \"degrade gracefully\" and \"refuse to emit\" is drawn at whether the degraded span remains *honest about its own degradation*. Concretely: The decision the emitter must *not* make on its own is \"the policy probably intends to allow this new key.\" That inference is exactly the one that produced the incident: the new `gen_ai.input.messages` k...",
    "operational_effect": "The operational consequence of enforcing this boundary is a **fail-closed lineage pipeline**: schema upgrades that outpace policy updates produce visible span-emission failures at deploy time (the agent's first traced call raises) rather than silent lineage corruption discovered weeks later during an audit. The cost is that schema and policy must be deployed..."
  },
  "matched_failure_symptoms": [
    "SCHEMA_DRIFT_OR_COERCION_CRASH"
  ],
  "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": "6270056a8aa134786fb2b5d6d87f1406dd2e4c14afaf2fbdfa89ef1116e08519",
    "verified_classes": [
      "LineageEmissionRefused",
      "SchemaVersion",
      "CapturePolicy"
    ],
    "verified_functions": [
      "build_lineage_attributes",
      "disposition_for"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "LineageEmissionRefused"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
