Invariants / DC-PUMP-05

DC-PUMP-05

DC derived enforced

Cooperative keep-alive liveness under downstream backpressure. No stall of the downstream consumer -- of ANY duration or cause (block application, epoch-boundary fold, recovery-checkpoint capture) -- may prevent the wire pump from sending MsgKeepAlive on the DC-PUMP-03 cadence AND consuming the peer's echoed MsgResponseKeepAlive. The wait for downstream capacity is itself a select! (emit_cooperative: events_out.reserve() vs the cadence timer vs inbound), so the cadence is REACHABLE while parked. Servicing only the timer is INSUFFICIENT: the BLUE agency guard suppresses every later tick once the lane is ClientAwaiting, giving ~117s of tolerance against an unbounded stall. MUST NOT: await a bounded events_out.send outside the cooperative wait; make the frame handlers async (they could park on such a send); queue the cadence frame on outbox_payloads (drained only by the outer loop, so it would never reach the wire during the very stall it exists to survive).

Source

docs/clusters/LIVE-WIRE-LIVENESS/SLICE-S1-keepalive-under-backpressure.md + docs/clusters/LIVE-WIRE-LIVENESS/SLICE-S2-live-feed-reconnect.md (INV-WL-1)

Enforcement trace

Tests 1

  • ce_wl_1_keep_alive_survives_unbounded_downstream_stall

Cross-references

Evidence notes

RED shell only -- the BLUE keep_alive_transition state machine and the session reducer are reused UNCHANGED (no BLUE edit). Closes the defect that ended a live preview run 2026-08-01 03:44:11Z: the peer logged ExceededTimeLimit (KeepAlive) ClientHasAgency because the pump was parked on a bounded send OUTSIDE its select!. SUPPORTING live evidence only (never the reason for enforcement): a sustained preview run 2026-08-01 (~/.cardano-live1/ade-1376-s1s2.log) held the live tip for 8h+ with 1400 consecutive keep-alive round trips, max observed inter-line stall 20.0s (the cadence itself) against the peers ~97s limit, and recovered a deliberate docker restart of cardano-node-preview in 1m48s. Enforcement rests on the named tests + ci/ci_check_wire_liveness.sh, not on this run.