# Filtration modelling a random number of observation

Suppose we have i.i.d. r.v.'s $$\{X_i\}$$ and a random number of observations $$N$$ we are allowed, following some distribution, independent of the $$\{X_i\}$$. So essentially we observe $$X_1,\ldots,X_N$$. I am interested in constructing a filtration for the process of observing these values, and stopping according to some stopping rule as usual. However, what could happen is that my stopping rule could find out, AFTER an observation and not having stopped at that observation, that it was the last one allowed. We assign the value of infinity to the stopping time, in this case.

Now my question is: what filtration models what we know at a step $$n\leq N$$ in this game? My guess would be $$\sigma(X_1, \ldots, X_n, 1_{\{N=0\}},\ldots, 1_{\{N=n-1\}})$$. This makes sense when inspected step by step: if the game starts (this is expressed by $$1_{\{N=0\}}=0$$), at time 1, when receiving performing the first observation, I will only know that it is not the case that there were no observations at all, but I do not know yet if the observation I am taking will be the last: thus $$\sigma(X_1,I_{\{N=0\}})$$ is what I know. After making the decision whether to stop or continue, I will know $$\sigma(X_1,I_{\{N=0\}},I_{\{N=1\}})$$, that is I will know whether $$X_1$$ was the last observation ($$I_{\{N=1\}}=1$$) or not ($$I_{\{N=1\}}=0$$). Next $$\sigma(X_1,I_{\{N=0\}},I_{\{N=1\}}, X_2)$$ and so on.

What confuses me is that I am used to filtration expressing all the information available at time $$n$$, in the sense of all that could have happened by that time, but my construction seems a little different and I suspect that there is a mistake. In fact, say we are at time 3 in the game, the information is supposed to be $$\sigma(X_1,I_{\{N=0\}},I_{\{N=1\}}, X_2)$$. But clearly, if I am at time 3 in the game, just before I am inspecting $$X_3$$, I know that $$I_{\{N=0\}}=I_{\{N=1\}}=0$$, otherwise I would have not inspected $$X_2$$ at the second step. What I mean is that, focusing on the indicators, only sequences of zeroes and sequences of zeroes with one at the end are allowed, in terms of information, not every possible string of zero and ones. As soon as a one appears, the game stops and we set our stopping time to infinity. (If instead we stop by our decision, we have the stopped sigma algebra to model that.) Does this mean that the construction is redundant or even wrong? Thanks for any help.