\section{Problem and Data}
\label{sec:problem}
\paragraph{Decision state.}
Let $x_i$ denote a repair state for task $i$. The controller observes an issue description, a patch relative to the initial repository, recent tool observations, a public-test menu, and the remaining repair budget. The underlying executor can also restore the candidate's complete saved history. The controller's input is bounded to 4,096 tokens through a fixed, label-independent allocation across fields. Future observations, reference patches, and official evaluation outcomes are excluded from this input.

\paragraph{Actions.}
The action set is
\begin{equation*}
\begin{split}
\mathcal{A}=\{&\texttt{submit},\ \texttt{continue},\ \texttt{retry},\\
&\texttt{test\_targeted},\ \texttt{test\_regression}\}.
\end{split}
\end{equation*}
Submission returns the current patch. Continuation restores the candidate and its visible history. The two testing actions run a predetermined public check on the restored candidate, add its actual output to the history, and then continue repair. Restart restores the original repository and begins a fresh attempt without the earlier reasoning history. A testing action is unavailable when its menu has no legal candidates.

All nonterminal actions receive at most 8,192 new output tokens, 30 tool calls, and 1,200 seconds for repair. A prescribed pretest receives an additional 300-second ceiling, and its time is charged to the action. The limits specify a common operating regime rather than equal realized cost: an action that submits early can use less than its allowance. The first experiment makes one controller decision per candidate, so it estimates bounded intervention value rather than an unrestricted long-horizon policy.

\paragraph{Public tests and official labels.}
The test menu is constructed from tests already present in the initial repository. A deterministic path-association rule selects up to five targeted test functions and up to twenty broader test functions. Candidate-modified test files are excluded. Pytest, Django's native runner, and SymPy's native runner execute the declared selections. The controller receives the pretest output only after choosing that action. The official hidden test patch is introduced only for final grading and is never fed back to the repair model.

\paragraph{Frozen cohorts.}
The available clean pilot contains 320 trajectories from 40 tasks in eight repositories. We select four candidates per task with a seeded hash of the source trial identifier, before reading the outcome label. One task from each repository forms the development set, leaving 32 training tasks and eight development tasks: 128 and 32 candidate states, respectively. All candidates from a task remain in one split. The independent test cohort consists of 60 frozen task identifiers selected after excluding the existing 150-task pool and a separate 100-task holdout used by another study. Two fresh candidates per test task are planned after development configuration freeze.

\paragraph{Restoration and missingness.}
We export final patches and visible histories; the protocol does not depend on retaining every intermediate Git object. Each action runs in a fresh environment. Setup removes access to later Git history, and the agent phase is network-isolated. Binary patch application and the initial repository commit are checked before the intervention. Transport, setup, and grading failures retain an unavailable outcome instead of receiving a failure label. When an action lacks the required pair of judged seeds, its success target is masked. Complete frozen-cohort coverage is required for the headline comparison.
