Solution (source code)

= Solution

Under $H_0$, $(Z_1,Z_2)$ is a <bivariate standard normal distribution> with correlation $\rho=\sqrt{m_1/m_2}$. Rejection occurs either at stage 1 through $Z_1\geq u_1$, or at stage 2 through $Z_2\geq u_2$ after continuation $l_1<Z_1<u_1$. Hence the <Type I error> is
$$
\alpha_{\mathrm{actual}}
=\mathbb P_0(Z_1\geq u_1)
+\mathbb P_0(l_1<Z_1<u_1,,Z_2\geq u_2)
$$
$$
=1-\Phi(u_1)+
\int_{l_1}^{u_1}\phi(z)
\left[1-\Phi\!\left(\frac{u_2-\rho z}{\sqrt{1-\rho^2}}\right)\right]dz.
$$
The final lack-of-benefit boundary $l_2$ affects acceptance, but not the probability of crossing an efficacy boundary.