{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-retrieval-provenance-decoherence-when-observability-spans-correlate-prompts-by-semantic-hash-rather-than-content-hash",
  "title": "How should an instance detect retrieval-provenance decoherence when observability spans correlate prompts by semantic hash rather than content hash",
  "date_of_record": "2026 November 25",
  "scope": "Applies to observability pipelines that reconstruct prompt lineage by correlating spans on a normalized/semantic hash of the prompt payload (e.g. embedding-cluster ID, MinHash, or template fingerprint) rather than a byte-exact content hash. Does not apply to pipelines that key lineage strictly on cryptographic content digests of the fully materialized prompt.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-retrieval-provenance-decoherence-when-observability-spans-correlate-prompts-by-semantic-hash-rather-than-content-hash.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-retrieval-provenance-decoherence-when-observability-spans-correlate-prompts-by-semantic-hash-rather-than-content-hash.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-retrieval-provenance-decoherence-when-observability-spans-correlate-prompts-by-semantic-hash-rather-than-content-hash.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2012,
    "python_slice_tokens": 352,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways an observability pipeline can claim that two LLM invocations share a \"lineage.\" The first is *content identity*: the SHA-256 of the exact serialized prompt, model ID, tool schema, and retrieved-document set. The second is *semantic identity*: a hash of a normalized form — whitespace-stripped, template-extracted, or embedding-bucketed — use...",
    "what_was_observed": "A retrieval-augmented agent serving support queries was instrumented with OpenTelemetry spans: a `retrieve` span emitting `doc.ids[]` and `rerank.scores[]`, and a `generate` span emitting `prompt.template_id`, `prompt.semantic_hash`, `model.version`, and `completion`. The pipeline built a lineage graph by joining `generate` spans to `retrieve` spans on `prompt.semantic_hash`, computed as MinHash over the template-ren...",
    "condition_of_validity": "Semantic-hash lineage correlation is valid only under a conjunction of conditions, and the pipeline never checked any of them: 1. **Provenance closure.** The retrieval inputs that determine `doc.ids[]` — query rewrite, filters, top-k, index version — are themselves captured in the hashed payload or in a span attribute the join reads. Here, query rewrite was ...",
    "decision_boundary": "The boundary between \"correlate on semantic hash\" and \"refuse the edge\" is crossed when the hash's excluded fields are *upstream causes* of the span attribute being joined. Concretely: - If you are joining `generate` to `retrieve` to answer \"did the model see the same context?\", the excluded rewrite is an upstream cause of `doc.ids[]` → the edge is unsound. ...",
    "operational_effect": "The observable consequence is **investigation inversion**: the observability layer's fabricated invariance actively redirects debugging away from the true cause. Because the dashboard showed retrieval as stable, the model version was implicated; because the model version was implicated, the team rolled back, which restored accuracy on the failing class (the ..."
  },
  "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": "cc7401fdc9230085115264f9d982a37a9aac0b99a20da94ce21e4ef9ae61fd08",
    "verified_classes": [
      "ProvenanceDecoherenceError",
      "GenerateSpan",
      "RetrieveSpan"
    ],
    "verified_functions": [
      "admit_lineage_edge",
      "correlate"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ProvenanceDecoherenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
