{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-silent-replay-divergence-when-a-streamable-http-mcp-server-resumes-a-broken-sse-stream",
  "title": "Which invariants prevent silent replay divergence when a streamable-HTTP MCP server resumes a broken SSE stream",
  "date_of_record": "2026 November 25",
  "scope": "Applies to MCP servers and clients speaking the streamable HTTP transport (single POST endpoint plus optional `GET` SSE stream, `Mcp-Session-Id` header, `Last-Event-ID` resumption). Does not cover stdio transport, legacy HTTP+SSE dual-endpoint servers, or WebSocket-based transports, where resumption semantics are defined differently or not at all.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-replay-divergence-when-a-streamable-http-mcp-server-resumes-a-broken-sse-stream.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-replay-divergence-when-a-streamable-http-mcp-server-resumes-a-broken-sse-stream.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-replay-divergence-when-a-streamable-http-mcp-server-resumes-a-broken-sse-stream.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2146,
    "python_slice_tokens": 299,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The conformance question most test suites answer is *\"does the server accept `Last-Event-ID` and return 200?\"* The question that actually determines correctness is *\"does the event ID space survive the process that minted it?\"* These diverge precisely at the boundary where a stream is broken mid-flight and resumed against a different server instance, a resta...",
    "what_was_observed": "Conformance run against a reference streamable-HTTP MCP server deployed behind a round-robin load balancer with three replicas, each holding an in-memory ring buffer of the last 1000 SSE events keyed by session. The test harness: 1. Initializes a session, receives `Mcp-Session-Id`, opens the `GET` SSE stream, and records events `1, 2, 3` (server-assigned integer IDs, generated per-replica from a local counter). 2. Ki...",
    "condition_of_validity": "The guardrail holds only under the following conditions, and the article's claim is void outside them: - **Event IDs must be globally monotonic and gap-free across the logical stream's lifetime, including across process restarts and replica handoffs.** A per-process counter, a per-replica counter, or a UUID (non-orderable) all fail this. The only conforming ...",
    "decision_boundary": "The boundary is between **\"the stream is resumable\"** and **\"the resume is verifiable.\"** A server crosses from correct to silently-divergent the moment it returns `200` on a `Last-Event-ID` resume without being able to prove, from durable state, that it holds every event after that ID on that logical stream. The decision rule for a conformance test: - If `L...",
    "operational_effect": "When the invariant is enforced (durable shared sequence + reject-on-unresolvable-anchor + client-side monotonicity check), the observable effect is that reconnection becomes *safe under duplicate delivery*: the client can always tell whether it has seen an event, and a misbehaving server degrades to a detectable error rather than a silent hang or a lost tool..."
  },
  "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": "69bc62e76dbbf186249c529b4831ffc58c3d6ded29d9c28f7ea40e32e490250a",
    "verified_classes": [
      "StreamContinuityViolation",
      "ResumeProbe"
    ],
    "verified_functions": [
      "assert_resume_is_continuous",
      "run_conformance"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 7,
    "raised_exceptions": [
      "StreamContinuityViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
