{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-broken-mcp-http-native-transport-stream-when-the-resumption-token-is-valid-but-the-event-log-has-been-truncated",
  "title": "How does an instance detect a broken MCP HTTP-native transport stream when the resumption token is valid but the event log has been truncated",
  "date_of_record": "2026 November 18",
  "scope": "Applies to MCP servers exposing HTTP-native streaming transports (SSE over HTTP with `Last-Event-ID`-style resumption) where the server maintains a bounded per-session event log. Does not apply to stdio transports, nor to servers that retain unbounded event histories or that implement resumption via full-state replay rather than event-ID cursors.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-broken-mcp-http-native-transport-stream-when-the-resumption-token-is-valid-but-the-event-log-has-been-truncated.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-broken-mcp-http-native-transport-stream-when-the-resumption-token-is-valid-but-the-event-log-has-been-truncated.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-broken-mcp-http-native-transport-stream-when-the-resumption-token-is-valid-but-the-event-log-has-been-truncated.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1630,
    "python_slice_tokens": 163,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A resumption token is a *claim* about position in an event log. It is not a claim about the *existence* of the events at that position. These two facts decouple under log truncation. The common failure model for streaming session resumption assumes that a valid token implies the server can replay everything after it. That assumption holds only when the event...",
    "what_was_observed": "During a fault-injection run against an MCP server configured with a 1,024-event per-session ring buffer, a client session was suspended (SIGSTOP on the client process) while the server continued emitting tool-progress notifications at roughly 40 events/sec. After 90 seconds the client resumed and reconnected using its stored `Last-Event-ID` of `evt-004182`. The server responded `200 OK`, opened the stream, and immed...",
    "condition_of_validity": "The contiguity invariant is only meaningful if event IDs are monotonically ordered within a session and comparable. This holds when the server issues IDs from a per-session monotonic counter (the common `evt-NNNNNN` pattern) or from a session-scoped sequence. It does *not* hold when: - IDs are UUIDs or opaque tokens without ordering semantics (the server mus...",
    "decision_boundary": "On every reconnection attempt, before processing any replayed event, the instance must classify the resume as one of three outcomes: - **Contiguous resume:** `first_received_id == last_sent_id + 1` (or the server's declared step). Safe to append. - **Explicit gap:** server returns `409`/`410`, or a `resume-gap` header, or a documented error event. Safe to fa...",
    "operational_effect": "Enforcing the contiguity check converts a silent, downstream-corrupting failure into a loud, localized one. In the fault-injection run, adding the check changed the outcome from \"pipeline advanced on 47% of missing state\" to \"stream handler raised, orchestration re-fetched full state, pipeline resumed at 41% with 768 events replayed from a state snapshot.\" T..."
  },
  "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": "4a6bed77efb4313d966b51886a7493b6e5c90dda93b14261676c9ea6538b466e",
    "verified_classes": [
      "ResumeContiguityError"
    ],
    "verified_functions": [
      "classify_resume",
      "guard_first_replayed_frame"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ResumeContiguityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
