{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-http-native-mcp-stream-multiplexing-from-collapsing-under-backpressure-induced-framing-skew",
  "title": "Which invariants prevent HTTP-native MCP stream multiplexing from collapsing under backpressure-induced framing skew",
  "date_of_record": "2026 November 25",
  "scope": "Applies to MCP servers exposing multiple concurrent tool-call streams over a single HTTP/1.1 or HTTP/2 connection using chunked/streamed framing (SSE, `application/x-ndjson`, or length-prefixed frames) where the client applies per-stream backpressure. Does not apply to one-shot request/response MCP transports, WebSocket-framed sessions, or stdio transports where the OS pipe provides flow control.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-http-native-mcp-stream-multiplexing-from-collapsing-under-backpressure-induced-framing-skew.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-http-native-mcp-stream-multiplexing-from-collapsing-under-backpressure-induced-framing-skew.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-http-native-mcp-stream-multiplexing-from-collapsing-under-backpressure-induced-framing-skew.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1908,
    "python_slice_tokens": 268,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **transport-level backpressure** and **frame-level framing authority**. HTTP provides backpressure only at the connection or stream granularity (TCP window, HTTP/2 `WINDOW_UPDATE`, or client-side read pacing on a chunked body). It does *not* provide any notion of \"pause this logical MCP message stream but keep the conn...",
    "what_was_observed": "A representative trace from an MCP server exposing three concurrent tool streams (`A`, `B`, `C`) over one HTTP/2 connection, using newline-delimited JSON frames: 1. Client issues three `tools/call` requests, each mapped to a logical stream on the same HTTP response body. 2. Server writes frames `A1, B1, A2, B2, C1` into the socket. Kernel buffer accepts all; client reads `A1, B1, A2`, then applies backpressure becaus...",
    "condition_of_validity": "The invariant \"frame atomicity independent of reader pacing\" holds only when all of the following are true: - Every frame carries an explicit `stream_id` and a monotonically increasing `seq` per stream, in the frame header, *before* any payload bytes that could be partially consumed. - The framing writer emits each frame with a single atomic append to the co...",
    "decision_boundary": "The decision boundary is whether to **buffer or reset** when a per-stream consumer falls behind. Two policies are defensible; the choice determines the failure mode: - **Bounded per-stream buffer + reset on overflow.** The client drains the socket unconditionally, buffers up to `N` frames per stream, and when stream `A` exceeds `N`, it sends a per-stream can...",
    "operational_effect": "The operational consequence is that **multiplexing correctness is a property of the framing layer, not the transport layer.** Teams that treat HTTP/2 stream multiplexing as \"free concurrency\" and layer MCP logical streams on top without per-frame stream identity and sequence numbers will observe intermittent, load-dependent cross-stream corruption that only ..."
  },
  "matched_failure_symptoms": [
    "HTTP_429_BURST_STARVATION"
  ],
  "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": "9487e53677f3926ff4532e842a85918ae1806a42bbabad8c64b5c746b3704eee",
    "verified_classes": [
      "FramingSkewError",
      "StreamResetError",
      "Demux"
    ],
    "verified_functions": [
      "__init__",
      "feed"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "FramingSkewError",
      "StreamResetError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "collections",
      "struct"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
