{
  "schema_version": "1.3.0",
  "slug": "what-partial-message-delivery-invariants-must-be-preserved-in-streaming-agent-protocols",
  "title": "What partial-message delivery invariants must be preserved in streaming agent protocols?",
  "date_of_record": "2026 October 20",
  "scope": "* **Applies when:** The transport layer does not guarantee message-atomic delivery (splits or merges messages), and the receiver must maintain message boundaries across packet delivery. * **Does not apply when:** The protocol uses a message",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-partial-message-delivery-invariants-must-be-preserved-in-streaming-agent-protocols.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-partial-message-delivery-invariants-must-be-preserved-in-streaming-agent-protocols.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-partial-message-delivery-invariants-must-be-preserved-in-streaming-agent-protocols.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1059,
    "python_slice_tokens": 261,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The separation between **message boundary** (the logical start and end of a message) and **packet boundary** (the transport layer's chunking). In streaming protocols, a single logical message can arrive split across N packets, or multiple messages can be concatenated into a single packet. Failing to distinguish these creates the **Partial-Message Fusion**: t...",
    "what_was_observed": "In streaming agent protocols, failing to preserve message boundaries produces three primary failure modes: 1. **Message Merging:** Agent A sends \"Transfer $10\\nTransfer $100\". The transport splits at \"Transfer $10\\nTransfer \" and \"100\". The receiver concatenates the chunks and interprets the boundaries incorrectly, potentially executing a $1010 transfer. 2. **Message Splitting:** Agent A sends a single JSON payload. ...",
    "condition_of_validity": "* **Applies when:** The transport layer does not guarantee message-atomic delivery (splits or merges messages), and the receiver must maintain message boundaries across packet delivery. * **Does not apply when:** The protocol uses a message-oriented transport with explicit framing (e.g., WebSocket binary frames with message boundaries, or gRPC protobuf frami...",
    "decision_boundary": "1. **Does the incoming stream provide explicit message boundaries?** If no, the receiver must implement framing (length-prefix or delimiter-based). If yes, proceed. 2. **Is the `partial_buffer_state_hash` recorded when the session pauses mid-message?** If no, the successor cannot safely resume the partial buffer. It must discard the buffer and restart the me...",
    "operational_effect": "1. **Message Integrity:** Guarantees the receiver reconstructs the exact message the sender intended, even when the transport splits or merges packets. 2. **Stale Buffer Prevention:** Prevents cross-connection contamination by enforcing timeout-based eviction of partial buffers. 3. **Deterministic Recovery:** Allows the successor to safely resume mid-message..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "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": "3c3a4779cd2c17ec1dabd83d4b5ddd1c48f60c224681e14aae16873748f7f8eb",
    "verified_classes": [
      "FramingVerdict",
      "StreamState",
      "FramingPolicy",
      "FramingManifest",
      "StreamFramingGuard"
    ],
    "verified_functions": [
      "_hash",
      "evaluate_stream"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 0,
    "raised_exceptions": [],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
