Note: I had an overlong post which I was advised to break into pieces - here is my first, most basic question. Next question is here.
I'm trying to understand how the electric one-form symmetry acts in 4d Maxwell theory on a manifold without boundary, and then what it means to try to gauge it. SE answers I've already read include 1, 3, 4 and 5, but I wasn't able to get a complete picture.
What is the precise action of the global one-form symmetry on the operators, vs a possibly gauged version?
Here is my current understanding.
The Maxwell action is
$$ S_0 = \int \frac{1}{2g^2} F\wedge \star F $$ with $F = dA$ (locally).
We can see that this action is totally invariant under $A \rightarrow A + \lambda$, if $d \lambda = 0$. $\lambda = d\omega$ is of course the 0-form gauge symmetry.
While $S_0$ is invariant, the shift in $A$ will be detected by Wilson lines $$ W_n[C] = e^{i n \oint A} \rightarrow e^{in \oint \lambda} W_n[C]. $$
This SE answer shows that the phase picked up is topological in the sense that it depends only on the homology class of $C$, since if $C \sqcup (-C') = \partial \Sigma$ then $$ \int_C \lambda - \int_{C'} \lambda = \int_{\Sigma} d\lambda = 0. $$ Just as global 0-form symmetries involve shifting a field by a constant, i.e a 0-dimensional operator which doesn't change when you move around the connected manifold, so does a 1-form global symmetry involve shifting a field by a 1-dimensional operator that doesn't depend on how you smoothly deform it. Crucially this requires $d\lambda=0$.
On the other hand, consider shifting by some $\lambda$ such that $d\lambda \neq 0$. Then $$ \Delta S_0 = \frac{1}{g^2} \int \star F \wedge d \lambda = \frac{1}{g^2} \int d\star F \wedge \lambda = 0 $$ by virtue of the equation of motion for $A$. (This is up to some $d\lambda \wedge \star d\lambda$ term we are allowed to absorb.).
Elsewhere $\lambda$ is referred to as a flat connection, but a field is still said to shift by $d\lambda$.
$\color{orange}{\textbf{THE QUESTION}}$
Does the global symmetry action have $d\lambda = 0$ (as is held to be the case in this answer) or not? If not, what equations does $\lambda$ have to obey, and what changes about these equations when we consider trying to gauge the symmetry?
Compare this to the 0-form case where we start with a shift by a constant $\alpha$, then, when we gauge, consider the more general $\alpha(x)$.