Connectedness principle in algebraic geometry What is the most general version of the connectedness principle in algebraic geometry? In particular, I'm interested in cases where there is no field available (eg, $Y$ below is the spectrum of something like $\mathbb{Z}_p$), or if it is then it isn't algebraically closed.
In his algebraic geometry book, Hartshorne gives the following version (ex III.11.4):
Let $k = \bar{k}$ and $\{X_t \}$ be a flat family of closed subschemes of $P^n_k$ parametrized by an irreducible curve $T$ of finite type over $k$. Suppose there is a nonempty open set $U \subset T$ such that for all closed points $t \in U$, $X_t$ is connected. Then $X_t$ is connected for all $t\in T$.
You can also restate this in terms DVR's
Let $X\rightarrow Y$ be a proper faithfully flat map with $Y$ the spectrum of a DVR. Let $y$ be the generic point of $Y$ and assume that $\dim_{k(y)} H^0(X_y, \mathcal{O}_{X_y}) = 1$. In particular, this condition implies that the generic fiber is connected. Then the special fiber is connected.
 A: Here are two relevant counterexamples:
Let $R$ be a ring and $I$ an ideal, then the morphism $\operatorname{Spec} R[x]/(x-x^2,Ix) \to \operatorname{Spec} R$ has connected fibers outside $V(I)$ but disconnected fibers inside $V(I)$. This suggests that some kind of flatness condition is unavoidable.
Let $R$ be a non-Henselian local ring and let $f$ be an irreducible polynomial that factors into coprime polynomials modulo the maximal ideal. Then $\operatorname{Spec} R[x]/f(x) \to \operatorname{Spec} R$ has connected generic fiber but disconnected special fiber. This suggests that some sort of geometric connectedness condition fro the generic fiber is unavoidable.
But we do not always need the generic fiber to be "completely" geometrically connected.  Let $Y=\operatorname{Spec} k[[x]]$, then if the generic fiber of a flat proper morphism $f: X \to Y$ is connected, then the special fiber is connected. This is because $f_* \mathcal O_X$ is a finite flat algebra. After inverting $x$, and ignoring nilpotents, it injects into a finite field extension of $k((x))$, which must be the field of fractions of a complete local ring, so it itself is a complete local ring.
Presumably we should formulate the most general version locally, with $Y$ the spectrum of a local ring $R$, for simplicity. A sufficient flatness condition is that the morphism is flat, or that $f_* \mathcal O_X$ is flat. A sufficient connectedness condition is that the fiber over the "Henselian generic point", the spectrum of the field of fractions of the Henselization or completion of $R$, is connected.
We can see this by reducing the connectedness of $X$ to the connectedness of the second half of Stein factorization via Zariski's connectedness theorem. We reduce to the case where $R$ itself is Henselian by completing. Then $f_* \mathcal O_X$ is an $R$-algebra which injects into a connected algebra over the field of fractions of $R$, so modulo nilpotents, which we can safely ignore, it injects into a finite field extension of $R$. 
Assume that the special fiber is disconnected, that is, $f_* \mathcal O_X/m$ contains an idempotent mod $m$. Lift that idempotent to $f_* \mathcal O_X$, and compute its minimal polynomial. This is irreducible, so by Hensel's Lemma it has a unique root mod $m$, which must be either $0$ or $1$ since $x^2-x$ divides the minimal polynomial mod $m$, so the idempotent is equal to either $0$ or $1$, a contradiction.
