To tackle the high cost of building training environments for long-horizon coding tasks—and the reliance of training-value optimization on expensive downstream feedback—teams from Beihang University, Shanghai Jiao Tong University, and iQuest propose RepoFactory, which uses low-cost proxy metrics to drive recursive improvement of long-horizon coding environments. The method categorizes environment-evolution objectives into three areas: plausibility, implementation scope, and structural coupling. This enables iterative optimization of task environments without requiring the model to fully solve them or relying on downstream training evaluation. Experiments show that models fine-tuned with this environment improve by an average of 8.5 percentage points across five benchmark evaluations; evolved environments deliver an average additional gain of 2.1 percentage points over unevolved versions, and raise the effective environment yield rate from 33.8% to 69.4%. Currently, the full RepoFactory environment set contains 10,159 Python project environments spanning 17 domains, with an initial release of 200 unevolved environments and corresponding pre-built Docker images.
