{
  "schema_version": "1.3.0",
  "slug": "what-communication-invariants-prevent-an-out-of-memory-cascade-when-a-downstream-consumer-silently-stops-reading",
  "title": "What communication invariants prevent an out-of-memory cascade when a downstream consumer silently stops reading?",
  "date_of_record": "2026 October 20",
  "scope": "* **Applies when:** The producer emits high-volume messages, the consumer can silently stop reading, and the producer's internal buffering could grow unboundedly. * **Does not apply when:** The producer's queue is strictly bounded (e.g., a ",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-communication-invariants-prevent-an-out-of-memory-cascade-when-a-downstream-consumer-silently-stops-reading.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-communication-invariants-prevent-an-out-of-memory-cascade-when-a-downstream-consumer-silently-stops-reading.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-communication-invariants-prevent-an-out-of-memory-cascade-when-a-downstream-consumer-silently-stops-reading.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 947,
    "python_slice_tokens": 237,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The separation between **TCP-level backpressure** (the OS socket buffer fills, and the network stack blocks the write) and **application-level acknowledgment** (the producer knows the consumer has processed the message). Relying on TCP backpressure creates the **Silent Consumer OOM**: the OS buffer fills, but the producer is unaware. Meanwhile, the producer'...",
    "what_was_observed": "In streaming agent architectures, failing to detect silent consumer stalls produces three primary failure modes: 1. **Producer OOM:** The producer's internal message queue grows unboundedly because the consumer stopped reading, and the producer never detects the stall. 2. **Memory Bloat:** The producer's application retains all messages in memory for replay or ordering, exhausting heap and triggering OOM killer. 3. *...",
    "condition_of_validity": "* **Applies when:** The producer emits high-volume messages, the consumer can silently stop reading, and the producer's internal buffering could grow unboundedly. * **Does not apply when:** The producer's queue is strictly bounded (e.g., a fixed-size ring buffer with explicit drops), or the consumer cannot silently stall (e.g., synchronous request-response w...",
    "decision_boundary": "1. **Is the outstanding unacked count within the `buffer_backpressure_threshold`?** If yes, normal production continues. If no, apply application-level backpressure. 2. **Has the `stall_detection_epoch` exceeded the stall timeout?** If yes, the consumer is likely stalled. The producer must halt production and either drop or escalate. 3. **Does the producer e...",
    "operational_effect": "1. **OOM Prevention:** Bounds the producer's internal queue, preventing memory exhaustion when the consumer stalls. 2. **Stall Detection:** Detects stalled consumers explicitly, allowing escalation or rerouting. 3. **Cascading Failure Prevention:** Halts production early, preventing pipeline-wide collapse."
  },
  "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": "d5588dbd1ecc114f3476e329214ba33cb60efc84dd9588a116c74b0d253e2407",
    "verified_classes": [
      "BackpressureVerdict",
      "ProducerState",
      "ProductionPolicy",
      "BackpressureManifest",
      "SilentConsumerGuard"
    ],
    "verified_functions": [
      "_hash",
      "evaluate_state"
    ],
    "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
  }
}
