  Stochastic inflation is an effective theory describing the super-Hubble,
coarse-grained, scalar fields driving inflation, by a set of Langevin
equations. We previously highlighted the difficulty of deriving a theory of
stochastic inflation that is invariant under field redefinitions, and the link
with the ambiguity of discretisation schemes defining stochastic differential
equations. In this paper, we solve the issue of these "inflationary stochastic
anomalies" by using the Stratonovich discretisation satisfying general
covariance, and identifying that the quantum nature of the fluctuating fields
entails the existence of a preferred frame defining independent stochastic
noises. Moreover, we derive physically equivalent It\^o-Langevin equations that
are manifestly covariant and well suited for numerical computations. These
equations are formulated in the general context of multifield inflation with
curved field space, taking into account the coupling to gravity as well as the
full phase space in the Hamiltonian language, but this resolution is also
relevant in simpler single-field setups. We also develop a path-integral
derivation of these equations, which solves conceptual issues of the heuristic
approach made at the level of the classical equations of motion, and allows in
principle to compute corrections to the stochastic formalism. Using the
Schwinger-Keldysh formalism, we integrate out small-scale fluctuations, derive
the influence action that describes their effects on the coarse-grained fields,
and show how the resulting coarse-grained effective Hamiltonian action can be
interpreted to derive Langevin equations with manifestly real noises. Although
the corresponding dynamics is not rigorously Markovian, we show the covariant,
phase-space Fokker-Planck equation for the Probability Density Function of
fields and momenta when the Markovian approximation is relevant [...]
