In the notes by Lurie there seems to be two possible definition for crystals which both makes sense for arbitrary functors $X : \mathrm{CRing}_k \to \mathrm{Set}$. ($k$ here is a field. We probably need to restrict $\mathrm{CRing}_k$ to just the full subcategory $\mathrm{CRing}^{\mathrm{ft}}_k$ of finite type commutative algebras at some point.)
Definition (infinitesimal groupoid). $X^{(2)}$ is defined as the fiber product of $X$ with itself over $X_{\mathrm{dR}}$. This is naturally a groupoid over $X$.
Definition (Integrable connection). A crystal on $X$ is a quasi-coherent sheaf on $X$ equipped with equivariance with respect to $X^{(2)}$.
Definition (de Rham space version). A crystal on $X$ is a quasi-coherent sheaf on $X_{\mathrm{dR}}$.
In the notes, it is mentioned that the "integrable connections" definition matches the "de Rham space" definition under the assumption that $X$ is a smooth scheme. Actually, I believe the argument only requires $X$ to be formally smooth in the sense that $X \to X_{\mathrm{dR}}$ to be a surjection of functors.
My question is: outside the assumption of formal smoothness on $X$, which definition is the "correct" one?
I'm quite confused because in the notes mentioned above, they seem to take the "integrable connection" definition as the basic one. However, in the the paper by Gaitsgory and Rozenblyum they seem to take the "de Rham space" definition as the basic one.