{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-silent-event-loss-in-mcp-http-native-transports-when-sse-upgrade-negotiation-is-stateless-and-per-tool-framing-is-str",
  "title": "What structural signals indicate silent event loss in MCP HTTP-native transports when SSE upgrade negotiation is stateless and per-tool framing is streamable",
  "date_of_record": "2026 November 21",
  "scope": "Applies to MCP servers that expose tools over HTTP with `Accept: text/event-stream` upgrade negotiation performed per-request (no session cookie, no sticky server state) and that emit per-tool responses as a stream of `event:`/`data:` frames terminated by a sentinel. Does not apply to stdio transports, WebSocket transports, or HTTP transports that pin a single long-lived event stream per session.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-silent-event-loss-in-mcp-http-native-transports-when-sse-upgrade-negotiation-is-stateless-and-per-tool-framing-is-str.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-silent-event-loss-in-mcp-http-native-transports-when-sse-upgrade-negotiation-is-stateless-and-per-tool-framing-is-str.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-silent-event-loss-in-mcp-http-native-transports-when-sse-upgrade-negotiation-is-stateless-and-per-tool-framing-is-str.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2033,
    "python_slice_tokens": 449,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the SSE connection dropped.\" The failure is that a *stateless* upgrade negotiation combined with *streamable per-tool framing* creates an ambiguity between two structurally identical wire conditions: (a) a tool response that legitimately produced zero output frames before its terminator, and (b) a tool response whose frames were emitted i...",
    "what_was_observed": "A tool `bulk_scan` declared `streamable: true` in its schema and emitted one frame per scanned shard, roughly 40–200ms apart, with a final `event: done` frame carrying a checksum. The client's SSE reader used a 90-second idle timeout measured from *last byte received*, not from stream open. Under load, shard 14 of 31 stalled for 91 seconds (a downstream index rebuild held a lock). The client's idle timer fired, the r...",
    "condition_of_validity": "This failure mode requires all four of the following to co-occur; remove any one and the ambiguity collapses: 1. **Stateless upgrade negotiation.** The server does not bind the frame stream to a server-side session. If the server issued a session token at upgrade and rejected a second upgrade for the same `tool_call_id` while the first stream was open, the d...",
    "decision_boundary": "The boundary is drawn at **frame-envelope attribution**. A frame stream is safe to reassemble only if every frame can be attributed to the negotiation handshake that opened it, and the attribution is checked *before* deduplication, not after. Concretely: - **Below the boundary (safe):** client keys its reassembly buffer on `(tool_call_id, stream_id)` where `...",
    "operational_effect": "The operational consequence is that **\"the checksum passed\" is not evidence of correctness** for streamable per-tool responses under stateless negotiation. A validation frame computed over the server's own shard set is internally consistent regardless of which shard set the client actually assembled. The checksum validates the producer's view, not the consum..."
  },
  "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": "5be877ae56a6eff0b5e498511647d03b23cac07c4aab0e3dd715a6ca0d23c5a2",
    "verified_classes": [
      "StreamAttributionError",
      "FrameEnvelope",
      "ReassemblyBuffer",
      "StreamRegistry"
    ],
    "verified_functions": [
      "handle_upgrade",
      "accept",
      "__init__",
      "open",
      "cancel",
      "finalize"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "StreamAttributionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
