Stationary process with seasonality and trend? Although I've read many assertions and claims that seasonality or trends are indicators that a time series is not stationary, I don't quite understand why. In fact, I have a construction of what I think is a stationary process with a period / trend in it.

Thus, time series with trends, or with seasonality, are not stationary
— the trend and seasonality will affect the value of the time series
at different times.

-- Forecasting: Principles and Practice from Rob J Hyndman and George Athanasopoulos

Consider a periodic function $g$ with period $P$. If $y$ is uniformly distributed from $0$ to $P$, and $\epsilon_t$ is white noise, then $X_t = g(t+y)+\epsilon_t$ is stationary, because if you're given some time $t$, there's no way of knowing where exactly in the season you are placed. But any particular realization of the process would definitely exhibit "seasonality".
To be a bit more rigorous, $E[g(t+y)] = \frac{1}{P} \int_0^P g(t+y) dy = \frac{1}{P} \int_t^{t+P} g(u) du$. By periodicity of $g$, this is the same as $\frac{1}{P}\int_0^P g(u) du$, which doesn't depend on $t$. so $E[X_t]$ is constant. The same argument can be used to show that the variance and autocovariances are also constant -- simply drop in $g(t+y)^2$ or $g(t+y)g(t+y+k)$ in place of $g(t+y)$.

As another example, consider a function $f(t)$ drawn from a suitable prior -- for example, a standard gaussian process. Then $X_t = f(t)+ \epsilon_t$ is also stationary, despite the fact that $f$ is very definitely a trend. (At least, if a gaussian kernel is used, and the lengthscale is large compared to the observed time series, it's possible or even likely that a consistent downward or upward trend will be present throughout the entire observed data).
Again, to be a bit more precise, for a standard gaussian process with gaussian kernel, the expectation is 0 everywhere and since the gaussian kernel $K(x, x')$ depends on only the difference $x-x'$, the covariance is also shift-invariant.

For a fixed $y$ or a fixed $f(t)$, these examples would obviously not be stationary, but I don't see any reason why they should be fixed.
The crux of my confusion seems to stem from the fact that while stationarity requires the joint distribution to remain invariant to shifts, typically the "time series data" consists of just a single instance or sample of the process -- from which it seems impossible to conclude anything about the distribution.
Am I misunderstanding something here?
 A: I would probably consider this to be a comment, but I don't have enough reputation to add it.
I believe that your question can be answered in terms of the difference between stationarity and ergodicity of a particular realisation of the stochastic process. In the book by Hamilton (Time series Analysis) you can find an example of a stationary process that is not ergodic that basically goes as follows:
Consider the mean of the ith realisation of a stochastic process $\{Y^{(i)}_t\}_{t=-\infty}^{t=\infty}$ to be $\mu^{(i)}$, generated by a $\mathcal{N}(0, \lambda^2)$ distribution: $Y^{(i)}_t = \mu^{(i)} +\epsilon_t$, being $\epsilon_t$ (Gaussian) white noise with variance $\sigma^2$. Under these assumptions one can show that the process is covariance-stationary. In particular, the mean $\mathbb{E}[Y_t] = \mathbb{E}[\mu^{(i)}] + \mathbb{E}[\epsilon_t] =0$ does not depend on time.
However, the i-th realisation is not mean-ergodic because the time average $ \lim_{T\rightarrow \infty}  1/T \sum^T_{i=0}Y^{(i)}_t = \mu^{(i)}$ does not converge to the mean of the process, i.e. to $0$.
To me, your examples seem to be a sophisticated version of the above.
