fix(execution): wait for Redis readiness before subscribing

Merged
IC
1mo ago
+321-35

Summary

  • Prevent concurrent workflow subscriptions from entering Redis subscriber mode before ioredis finishes its readiness INFO command. Apply the readiness gate in the shared execution-signal hub for initial subscriptions and reconnects.
  • Share a bounded readiness wait across callers, tolerate recoverable connection errors, and keep pending subscriptions independent from acknowledged channels being restored after reconnect.

Type of Change

  • Bug fix

Testing

  • Reproduced the failure through the unmodified execution-signal hub against local Redis under Bun; the same reproduction passes with this fix.
  • Verified live Redis reconnects, recovery from an initially unavailable Redis server, new subscriptions during reconnect, and cancellation delivery on both current and legacy channels.
  • 141 targeted tests passed across the signal hub, cancellation, event buffer, execution engine, and execution stream route, including terminal shutdown, timeout, and independent subscription acknowledgement failures.
  • Lint and type checks passed across all 26 workspaces; all 46 repository audits, API validation, block-registry validation, and docs-manifest checks passed.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)