Notes

Data Pipelines

This is an example of creating tasks from real raw data (3.2 of RL Environments): by taking historical issues and pull requests from a GitHub repository. In this case, the Nim compiler. Give the agent the repository state up to t-1 and the issue(s) description, then ask the agent to solve the issue. Repo and Generated Dataset.

1. Where to start

Which repo to even select in the first place?

You’d want to choose a repo most likely to create unsaturated/difficult, high-quality tasks. A few ideas and personal preferences:

  1. Find types of tasks in popular benchmarks: terminal-bench, frontier-swe, swe-marathon, and find traces and where models fail, patterns of tasks, repo types, compilers, linters, weird libraries, large repos, coding languages, etc.
  2. Languages with fewer examples, strange compilers, libraries, etc are obviously easier. Avoid mainstream languages
  3. Testable as black-box repos, where tests/progress are not implementation-specific (integration > unit tests), but you can think of the artifact as a binary, are very easy to test; for example, compilers/compiled languages/LSPs, ofc not everything has to be like this, but it makes things easy.

After a few of these are selected, we’ll need to look into potential event cuts/task partitioning (in the case of coding repos, this will usually come from commits, PRs, and/or issues).

Then, for each of these event cuts, you’d wanna check their quality- for example, if working with PRs, how good is the issue linkage, granularity, issue and PR description, and newly added tests in the merged PR.

The easiest version is to start with PRs + issues; then, after you saturate this, you can move to commit cuts, but this requires some task synthesis.

Once you audit quality, select a repo and start experimenting.

2. The environment

Check the task-template directory and the environment Dockerfile, and a task example here: nim-pr-10946. (Just ask Claude to make it)

See also the verifier Dockerfile, task configuration, and the general notes on crafting the environment.

An instruction format I like for SWE-bench (PR, issue) type of tasks, and the one used here:

Fix the problems reported in $path_issue.md for $repo_path

3. Verifier creation

The verifier should be based on the PR that got merged and solves the targeted issue(s). We can take all the tests at state t and use them to check an agent’s solution; split them into 2 groups: regression and implementation. The agent should be able to implement the fix without damaging any other parts of the code; thus, any failed regression test should set the reward to 0, whereas for implementation tests (it depends) it can be set to binary {0,1} or partial [0,1].

Related notes: Scoring an attempt and Reward Hacking.

3.1 Derisking your verifier

  • Ensure your oracle solution works by creating solution/solve.sh that git applies the t-1 state of the repo with its t state, and this solution should get a 1.0 verifier reward.
  • Sometimes public repos have issues such as newly added tests that don’t mean they only pass after the changes; clear up these potential tasks.
  • Run a few trials to check results diversity across models, then go explore these traces with a model and find issues (proof of a model passing the task is great)

The fail-to-pass validation code checks the unchanged source and reference implementation. See Oracle Solution for the general principle.

4. Task Quality and Filtering

Each proposed task must go through a QC pipeline that usually looks like: static checks -> rubrics -> oracle/nop -> trials -> per-trial-analysis (all extracted from terminal-bench repo CI setup)

When a repo is very large, it’s better to overfilter and constrain yourself to generating tasks from a few PR/issue pairs with a high likelihood of avoiding leakage, underspecification, saturation, etc.

See also Going Further on QC.

5. Calibrate, make them harder

For what model are you producing tasks? A good starting model could be Deepseek-v4.1-flash; it’s a good balance of capability/price.

So, what if the model you selected just completes all the generated tasks easily? You can 1/ pivot or 2/increase difficulty naturally. How?

A few examples: combining multiple PRs; issues with multiple PRs; issues with at least 100 lines changed; issues that are features; issues that appeared multiple times and had multiple patching attempts; etc.

Your task search must narrow, and if none of this worked, well, this repo might be too easy, or someone already sold these repo tasks :)

For the general approach, see Calibration; for this project's pass rates and methodology, see eval.md.

6. Synthesis

1/Ask Claude/Codex to run through this loop and find all the potential tasks that make it through the pipeline/saturation goals, etc. 2/ Then make it deterministic. This part has multiple potential shapes. I like adding an automated CI per task proposal, so codex/claude can submit tasks there and get an output; then you can add an agent skill for the step; then you can make some of these steps deterministic, and so on.

7. Artifacts

  • Nim dataset: the broader collection, published as josancamon19/nim@v1.4.0 (285 tasks). Nim-hard dataset: the 15-task subset, published as josancamon19/nim-hard@v1.3.0.
  • eval.md: leaderboard, verifier details, task sample, and cost/performance plot.
  • Harbor evaluation job: 180 retained trials, agent trajectories, verifier logs, and submitted source artifacts.

The archived job ran on nim-hard@v1.2.0; eval.md explains how its scores carry over to the hardened v1.3.0 verifier.

7.1 Task Sample nim-pr-20529

The Nim repo gets added to the environment under /workspace, with a git checkout at commit 5334dc9, plus a .md description of the two issue reports, and the model is instructed to:

Fix the problems reported in /workspace/12938.md, /workspace/14193.md for /workspace/Nim.

This task asks the model to solve 2 issues. 1/Issue #12938: passing a literal integer as the size of a generic array crashes the compiler, and 2/Issue #14193: a related compiler crash in macro-generated code using generic array sizes.

The expected solution comes from Merged PR #20529 and the verifier tests.