  Sen's theorem on the ramification of a $p$-adic analytic Galois extension of
$p$-adic local fields shows that its perfectoidness is equivalent to the
non-vanishing of its arithmetic Sen operator. By developing $p$-adic Hodge
theory for general valuation rings, we establish a geometric analogue of Sen's
criterion for any $p$-adic analytic Galois extension of $p$-adic varieties: its
(Riemann-Zariski) stalkwise perfectoidness is necessary for the non-vanishing
of the geometric Sen operators. As the latter is verified for general Shimura
varieties by Pan and Camargo, we obtain the perfectoidness of every completed
stalk of general Shimura varieties at infinite level at $p$. As an application,
we prove that the integral completed cohomology groups vanish in higher
degrees, verifying a conjecture of Calegari-Emerton for general Shimura
varieties.
