Consider the stochastic process $(X_n)_{n\geq 1}$, defined by \begin{align} X_n = \sum_{k=1}^nY_k, \qquad Y_k= \left\{\begin{array}{ll} \mathcal{N}(0,1), &\; \text{w.p.} \; p \\ 0, &\; \text{w.p.} \; 1-p\end{array}\right. \end{align} where the $Y_k$'s are independent, $\mathcal{N}(0,1)$ is a standard normal random variable, and $0<p<1$.
Denote by $(\mathcal{F}_n)_{n\geq 1}$ the filtration generated by $(X_n)_{n\geq 1}$.
Next, define \begin{align} \tau_n = \sup\{k\leq n: Y_k\neq 0\}, \end{align} so $Y_{\tau_n}$ is the last nonzero $Y$-variable observed before or at time $n$.
My question is: With respect to which filtration is the stochastic process $(Y_{\tau_n})_{n\geq 1}$ measurable?
Specifically, for a fixed value of $n$, is $\mathcal{F}_{\tau_n}$ a $\sigma$-algebra with respect to which $Y_{\tau_n}$ is measurable, or is it only correct to say that $Y_{\tau_n}$ is measurable with respect to $\mathcal{F}_n$?