I am reading Section 8.3 Regular Conditional Distribution of Klenke's Probability Theory. The author motivates the topic by saying that we would like to define for every $x\in E$ a probability measure $\mathbf{P}[\cdot|X=x]$ such that for any $A\in\mathcal{A}$, we have $\mathbf{P}[A|X]=\mathbf{P}[A|X=x]$ on $\{X=x\}$. To this end, the author defines the conditional expectation of $Y\in\mathcal{L}^1(\mathbf{P})$ given $X=x$ by $\mathbf{P}[Y|X=x]:=\varphi(x)$, where $\varphi$ satisfies $\mathbf{E}[Y|X]=\varphi(X)$. He also defines $\mathbb{P}[A|X=x]=\mathbb{E}[\mathbf{1}_{A}|X=x]$. He then goes on to state the following:
[...] for every given $A\in\mathcal{A}$, the expression $\mathbf{P}[A|X=x]$ is defined for almost all $x$ only; that is, up to $x$ in a null set that may, however, depend on $A$.
My question: I am having trouble understanding the meaning of this sentence. It seems to me that the author is picking a version $Z$ of $\mathbf{E}[Y|X]$, and then finding $\varphi$ such that $Z=\varphi(X)$ everywhere. But then the expression $\mathbf{P}[A|X=x]=\varphi(x)$ is defined for all $x$ in the range of $X$. What does the author mean by "for almost all $x$"? Is he speaking of the push-forward measure $\mathbf{P}\circ X^{-1}$ on $E$?
What I do understand is the following: The conditional probability $\mathbf{P}[A|X]$ is a random variable defined for almost all $\omega\in\Omega$ only, that is, up to $\omega$ in a null set that may depend on $A$. However, I am not sure how this is connected to the author's statement.
As you wrote, (a version of) the conditional probability of $A ∈ \mathcal A$ given $X = x$ is defined as $ \mathbb P [A | X =x] = φ(x)$, where $φ: E → \mathbb R$ is a measurable map factorizing a version $Z$ of $ \mathbb P[A|σ(X)]$, i.e. it holds that $$Z(ω) = φ(X(ω)) \quad ∀ ω ∈ Ω.\tag{$*$}$$
so indeed we first pick a version of $ \mathbb P[A|σ(X)]$ and then factorize that. There are two sources of indeterminacy in this construction (which is why we talk about versions):