\section{Two-pass repair} \label{sec:repair} Fix $k\ge2$, put $M=4k$ and suppose $m\ge k$. Let $x_1,\ldots,x_m\in\Fp$, set $s_t=\sum_{j\le t}x_j$, $s_0=0$, and fix $\D_j\subseteq\Fp\times\Z_2$ with $|\D_j|\le B$. All indices refer to the original ordering, and decorations remain attached to positions. For $0\le t\le m$, define \begin{equation} \label{eq:potential-targets} \mathcal V_t=\left\{ s_t+\sum_{j\in J}x_j+d: \begin{array}{l} J\subseteq\{t+1,\ldots,\min(m,t+M)\},\\ d\in\D_h,\quad h\in[1,m]\cap[t,t+M] \end{array}\right\}. \end{equation} Then $|\mathcal V_t|\le B(M+1)2^M$ and $\mathcal V_m=s_m+\D_m$. A source consists of a window $W=\{b+1,\ldots,b+w\}\subseteq[m]$ of length $w\le M$, disjoint sets $U,Q\subseteq W$ with $k\le|Q|\le2k$, and a cyclic order of $Q$. A rotation is safe if \begin{equation} \label{eq:safe-rotation} s_b+\sum_{j\in U}x_j+\sum_{j\in I}x_j+d\notin\mathcal V_t \end{equation} for every nonempty proper prefix $I$ of the rotation, every $d\in\bigcup_{h\in[1,m]\cap[b,b+M]}\D_h$ and every $t\in\{0,\ldots,m\}$ with $|t-b|>2M$. A prefix denotes its set of original labels when used in a sum. The window $W$ bounds original labels; the rotating list may occupy different positions. Since the safety test includes every decoration in the source interval, it protects the list's proper prefixes whenever they end at positions in $[1,m]\cap[b,b+M]$ and the list has starting sum $s_b+\sum_{j\in U}x_j$. Partition $[m]$ into consecutive intervals $Q_i=\{b_i+1,\ldots,b_i+n_i\}$, $k\le n_i\le2k$, $1\le i\le a$. Such a partition exists by using lengths $k+u,k,\ldots,k$ when $m=ak+u$, $0\le u2M$. Put a cut at $h_i=b_i+1$. Since $n_i\ge2$, its prefix is proper and has sum \begin{equation} \label{eq:cut-sum} s_{b_i}+x_{c_i}. \end{equation} The list between cuts $h_i$ and $h_{i+1}$ is $P_i=(T_i(c_i),c_{i+1})$, of length $n_i$. Rotate it safely using the second-family source indexed by $(i,c_i,c_{i+1})$. These position intervals are disjoint. Their preserved sums, together with the fixed first label $c_1$, preserve every cut sum \eqref{eq:cut-sum}, even if its label moves. Thus $s_{b_i}+x_{c_i}$ remains the starting sum for $P_i$, even though the sum through the original boundary $b_i$ may change. For $h_i2M. \end{gathered} \end{equation} When there is one block, the first pass alone gives these conclusions. At the final position, $u_m=s_m$ and $u_m+\D_m=\mathcal V_m$; set $a_m=m$. Each pass moves labels within intervals of length at most $2k$, so their composition has displacement at most $4k-2$. If decorated points at $i