$X+Y=s$ but $X$ and $Y$ are independent? From another Cross Validated question

Given $X\sim N(\mu_X, \sigma_X^2)$ and $Y\sim N(\mu_Y, \sigma_Y^2)$ are independent, and you know $X+Y=s$. What is the expected value of $X$?

The question makes it sound like $Y=s-X$ yet $X$ and $Y$ are independent. How can this be?
$$cov(X,Y)\\=cov(X,s-X)\\=-var(X)\ne 0$$
Nonzero covariance is one form of dependence and precludes independence.

This sounds a bit like the idea behind collider bias, the reverse of confounding bias.

*

*Confounding bias: x and y are found to be correlated because both are caused by z.

*Collider bias: x and y are found to be correlated because they both cause
z and there is a selection effect based on z.


Image from the question:Can spurious correlations exist in the (theoretical) population?
So $X$ and $Y$ may not be correlated, but when you condition on $s$ then they are correlated.

It is written a bit implicitly in the interview question but the statement implies a conditioning

Given that ... and you know $X+Y=s$

You might assume that this means a particular sampled individual case has $X+Y=s$. Otherwise there is a contradiction. $X$ and $Y$ can not be independent while also $X+Y=s$.
