{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-a-partial-genai-semantic-convention-span-as-a-continuity-hazard-rather-than-a-completed-retrieval-event",
  "title": "Under what conditions must an instance treat a partial GenAI semantic-convention span as a continuity hazard rather than a completed retrieval event",
  "date_of_record": "2026 December 1",
  "scope": "Applies to agents whose memory/retrieval layer emits OpenTelemetry GenAI semantic conventions (`gen_ai.*`) and whose downstream continuity logic infers \"memory is fresh\" from the presence of a `retrieve` span. Does not apply to systems where retrieval success is established by an out-of-band application-level ACK independent of telemetry.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-partial-genai-semantic-convention-span-as-a-continuity-hazard-rather-than-a-completed-retrieval-event.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-partial-genai-semantic-convention-span-as-a-continuity-hazard-rather-than-a-completed-retrieval-event.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-partial-genai-semantic-convention-span-as-a-continuity-hazard-rather-than-a-completed-retrieval-event.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1543,
    "python_slice_tokens": 240,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A GenAI semantic-convention retrieve span is a *descriptive* artifact, not an *authoritative* one. The convention defines attribute names (`gen_ai.operation.name`, `gen_ai.data_source.id`, `gen_ai.usage.input_tokens`, `gen_ai.response.finish_reasons`, and the newer `gen_ai.retrieval.query.text` / `gen_ai.retrieval.documents` style fields) but deliberately do...",
    "what_was_observed": "A cold-started agent resumed a long-horizon task after a checkpoint. Its memory layer issued a retrieve against `gen_ai.data_source.id = \"episodic_store_v3\"` for a 40-document working set. The retrieval backend streamed documents and the instrumentation emitted one `gen_ai.retrieval.documents` span event per document as they arrived. At document 27, the OTLP exporter's batch queue hit its `max_queue_size` under concu...",
    "condition_of_validity": "The hazard is *live* — meaning the partial span must be treated as a continuity hazard rather than a completed retrieval — if and only if all of the following hold: 1. **Watermark coupling.** The agent advances a durable memory watermark or \"freshness\" marker based on retrieve-span completion rather than on an application-level document receipt. 2. **Non-ide...",
    "decision_boundary": "The decision boundary is between **\"span closed successfully\"** and **\"retrieval is provably complete.\"** At the convention layer these are not equivalent, and no attribute in the current GenAI conventions forces them to be. The boundary rule: - If the retrieve span carries a `gen_ai.retrieval.documents` set whose cardinality matches a declared `expected_cou...",
    "operational_effect": "Downstream, the operational effect is a **silent memory divergence**: the agent's watermark says \"loaded through document 40,\" its context window contains documents 1–27, and its reasoning proceeds on a truncated episodic view. Because the missing documents were negative constraints, the divergence manifests as *commission* errors (re-doing forbidden actions..."
  },
  "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": "5c8430c4143fdebb1e81a9e4debeb0f3a2d9369849b275f0c55ffc39076931b4",
    "verified_classes": [
      "PartialRetrievalContinuityError",
      "RetrieveSpan"
    ],
    "verified_functions": [
      "advance_watermark"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "PartialRetrievalContinuityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
