AdithyaSK's picture
AdithyaSK HF Staff
MiMo-V2.6-RL code in Harbor (mimo_harbor 1.3.0)
86004f4 verified
|
Raw History Blame Contribute Delete
10.8 kB
---
license: apache-2.0
language:
- en
- zh
task_categories:
- other
tags:
- rl-environment
- reinforcement-learning
- harbor
- agent
- mimo
- mimo-v2.6-rl
- code
- code
- swe
- software-engineering
size_categories:
- 1K<n<10K
viewer: false
---
[![View tasks in Harbor Visualiser](https://img.shields.io/badge/%F0%9F%A4%97%20Harbor%20Visualiser-View%20tasks-FFD21F?style=for-the-badge)](https://huggingface.co/spaces/HuggingFaceH4/harbor-visualiser?dataset=FineEnvs/MiMo-V2.6-RL-harbor-code)
[![MiMo RL Environment Explorer](https://img.shields.io/badge/%F0%9F%A4%97%20Explorer-Run%20a%20rollout-FFD21F?style=for-the-badge)](https://huggingface.co/spaces/FineEnvs/MiMo-RL-Envs-Explorer)
# MiMo-V2.6-RL Code (Harbor)
**Fix a real issue in a real repository.** 2,698 Harbor tasks from the Code domain of Xiaomi's
[MiMo-V2.6-RL-oss](https://huggingface.co/datasets/XiaomiMiMo/MiMo-V2.6-RL-oss), the RL environments MiMo-V2.6 was trained
on, converted so every one runs as a standard Harbor task.
The agent gets an issue and the repository at its base commit. After it finishes, the files the hidden test patch touches are reset, the patch is applied, and the task's own test command decides the reward: 1 when it passes, 0 when it doesn't.
| | |
|---|---|
| Tasks | 2,698 |
| Graded by | hidden tests (deterministic) |
| Reference step limit | 500 |
| Source | [`XiaomiMiMo/MiMo-V2.6-RL-oss`](https://huggingface.co/datasets/XiaomiMiMo/MiMo-V2.6-RL-oss) at `639865fd3374` |
| Reference harness | XiaomiMiMo/verl `a2ad9f6` + XiaomiMiMo/mimoagent `467f0a1` |
| Adapter version | `mimo_harbor 1.3.0` (see the changelog below) |
Part of a set of six: [code](https://huggingface.co/datasets/FineEnvs/MiMo-V2.6-RL-harbor-code), [cyber](https://huggingface.co/datasets/FineEnvs/MiMo-V2.6-RL-harbor-cyber), [general](https://huggingface.co/datasets/FineEnvs/MiMo-V2.6-RL-harbor-general), [terminal](https://huggingface.co/datasets/FineEnvs/MiMo-V2.6-RL-harbor-terminal), [webdev](https://huggingface.co/datasets/FineEnvs/MiMo-V2.6-RL-harbor-webdev), [music](https://huggingface.co/datasets/FineEnvs/MiMo-V2.6-RL-harbor-music).
## Layout
```text
tasks/<task_id>/
├── task.toml # image pinned by digest, one-time setup (healthcheck), judge settings, provenance
├── instruction.md # the prompt the agent sees, word for word what Xiaomi's harness gives it
├── environment/ # Dockerfile (FROM the same digest) and setup/, a readable copy of the setup
└── tests/ # test.sh and everything grading needs; uploaded only after the agent finishes
registry.json # Harbor registry entry
data/tasks.jsonl # one metadata row per task, for filtering without walking the tree
manifest.json # sha256 of every task directory
jobs/code.yaml # the reference agent settings
agents/mimo_opencode.py
```
Example: [task.toml](https://huggingface.co/datasets/FineEnvs/MiMo-V2.6-RL-harbor-code/blob/main/tasks/format-code-task-000001/task.toml) ·
[instruction](https://huggingface.co/datasets/FineEnvs/MiMo-V2.6-RL-harbor-code/blob/main/tasks/format-code-task-000001/instruction.md) ·
[verifier](https://huggingface.co/datasets/FineEnvs/MiMo-V2.6-RL-harbor-code/blob/main/tasks/format-code-task-000001/tests/test.sh).
## Run
```bash
hf download FineEnvs/MiMo-V2.6-RL-harbor-code --repo-type dataset --local-dir mimo-code
cd mimo-code
PYTHONPATH=agents HF_TOKEN=hf_... harbor run -y -c jobs/code.yaml
# or on Daytona (builds the Dockerfile, runs the agent unprivileged natively — closer to Xiaomi's pods):
DAYTONA_API_KEY=... DAYTONA_API_URL=... PYTHONPATH=agents HF_TOKEN=hf_... harbor run -y -c jobs/code.daytona.yaml
```
The job runs `agents/mimo_opencode.py` (OpenCode 1.18.32) on HF Sandbox with the reference settings: the step
limit above, replies of up to 65,536 tokens, thinking low, no web fetch or search.
Change `model_name` and the provider block for another model. Any Harbor agent can run these tasks; this one
also applies two steps of Xiaomi's harness a task file can't express: the answer-leak blocklist after install,
and the unprivileged `agent` user on sandboxes that run everything as root.
Serving them to a trainer works like any Harbor dataset, for example with OpenEnv:
```bash
openenv harbor serve --dataset FineEnvs/MiMo-V2.6-RL-harbor-code --llm-url http://127.0.0.1:8000/v1 --model <your-model>
```
## How it was converted
With the [mimo_harbor adapter](https://github.com/adithya-s-k/FineEnvs/tree/main/tooling/mimo-rl-explorer/mimo_harbor). It reads the source at one pinned revision and every image through
a digest lock, so a rerun produces byte-identical tasks (`manifest.json`). Setup and grading follow Xiaomi's
harness step by step, as the explorer's runner does, using the same vendored graders:
- Nothing that grades a task (hidden tests, rubrics, verifier scripts) is reachable while the agent works.
- A testbed failure (a patch that won't apply, a system that died, a judge that never answered) writes no reward,
so Harbor records an error rather than a 0.
- Images are pinned by digest; HF Sandbox and other prebuilt-image backends run them without a build step.
## Where this differs from Xiaomi's setup, in plain terms
The task, its files, how it is graded, and the reward you get are **exactly Xiaomi's**. These are the only differences, and how we handle each:
- **The agent is [OpenCode](https://opencode.ai), not Xiaomi's own agent.** The model gets the same instruction and the same reward — only the tool it uses to do the work is different.
- **It can't look the answer up online.** Xiaomi ran with no internet. We let the model reach its own model API but block, by name, the places an answer could come from — code sites (GitHub, GitLab, …), search engines, this dataset's own page on the Hub, and package registries — so they don't resolve while it works.
- **No answer in the git history.** If an image still carries the fix in its git log, we delete those later commits before the agent starts, so it can't be read out of history.
That's the whole list. The detailed, technical version is in the [adapter README](https://github.com/adithya-s-k/FineEnvs/tree/main/tooling/mimo-rl-explorer/mimo_harbor#deviations-from-the-reference-and-why).
## Validation
- All 7,780 tasks across the six datasets load with Harbor's task loader and pass the adapter's static checks
(digest-pinned images, setup payload equal to its readable copy, rubrics only under `tests/`).
- With Harbor's no-op agent every dataset scores 0 and every verifier runs to completion: no free rewards.
- **Parity with Xiaomi's harness.** Following Harbor's parity procedure, the 36-task parity subset (6 per dataset)
was run 3 times on each side with the same agent (OpenCode 1.18.32), model (GLM-5.3 via deepinfra, thinking low),
step limits, judges and sandboxes, in Harbor and in the [explorer](https://huggingface.co/spaces/FineEnvs/MiMo-RL-Envs-Explorer), which runs Xiaomi's harness. The score ranges overlap for all six datasets. For this one:
| | Mean reward (mean ± SEM, 3 runs) | Runs |
|---|---:|---|
| Xiaomi's harness (explorer) | 0.556 ± 0.056 | 0.667, 0.500, 0.500 |
| Harbor | 0.556 ± 0.056 | 0.667, 0.500, 0.500 |
Full results, per-task outcomes and notes are in `parity.md` and `parity_experiment.json`.
## Patches, updates and fixes
A timeline of changes to this dataset and the `mimo_harbor` adapter that builds it. Every task records the adapter
version that produced it in `task.toml` (`[metadata].adapter`) and in `manifest.json`, so you can tell which of
these a given copy includes.
### 1.3.0 — 2026-10-09 — environment-level answer-leak enforcement
- The answer-leak blocklist is now applied to `/etc/hosts` as the **last step of task setup**, so the answer routes
(GitHub and its API, PyPI / npm / crates, the Go module proxy, and the Hub's own dataset hosts) are blocked for
**any** agent or trainer — not only the reference agent. Before this, the task only *staged* the list and the
reference agent applied it after installing; a different agent on a network-connected sandbox could still reach
those hosts and fetch a fix.
- The reference agent (`agents/mimo_opencode.py`) lifts the blocklist to install OpenCode (fetched from GitHub),
then re-applies it, so the model/judge router (`router.huggingface.co`) and the relay stay open throughout while
the answer routes stay closed during the run.
- Affects **code, cyber, general and terminal** (the domains that carry a blocklist); **webdev** and **music** are
unchanged.
- Prompted by independent third-party analysis of reward-hacking in the released MiMo environments.
### 1.2.0 — 2026-10-05 — initial public release
- All 7,780 environments across six domains (code, cyber, general, terminal, webdev, music) published as Harbor
tasks, set up and graded 1:1 with Xiaomi's harness (`verl` `a2ad9f6` + `mimoagent` `467f0a1`).
- Anti-reward-hacking faithful to the reference: the Code git-history strip physically removes fix-bearing future
commits, **including unreachable objects** (falling back to hiding `.git` only when the strip can't be verified);
build-residue and cache scrubs; the answer-leak blocklist (mimoagent's list, extended with the Hub dataset hosts
and package registries because this runs online where Xiaomi ran offline); a grader-isolation guard for
in-container grading; the unprivileged `agent` user on Cyber and General.
- Daytona backend support (`jobs/<kind>.daytona.yaml`): builds the Dockerfile and runs the agent unprivileged.
- Music runs in a Debian *bookworm*-slim Python image with workdir `/root`, so it starts on HF Sandbox.
## Credits
The environments, their prompts, tests, verifiers, images and graders are the work of the
[Xiaomi MiMo](https://huggingface.co/XiaomiMiMo) team, released as
[XiaomiMiMo/MiMo-V2.6-RL-oss](https://huggingface.co/datasets/XiaomiMiMo/MiMo-V2.6-RL-oss) together with their training code
[XiaomiMiMo/verl](https://github.com/XiaomiMiMo/verl) and agent harness
[XiaomiMiMo/mimoagent](https://github.com/XiaomiMiMo/mimoagent). mimoagent builds on
[mini-swe-agent](https://github.com/SWE-agent/mini-swe-agent) (Kilian A. Lieret and Carlos E. Jimenez).
The task format and runner are [Harbor](https://github.com/harbor-framework/harbor).
This conversion is by Hugging Face and the FineEnvs team, and is not affiliated with or endorsed by Xiaomi.
## License
Apache-2.0, as the source dataset (`LICENSE`). Files vendored from XiaomiMiMo/mimoagent (`tests/server_arvo.py`
in Cyber tasks, and the ported setup commands) are MIT (`LICENSE-mimoagent.md`). `NOTICE` lists every source,
its license, and the changes this conversion made. Vendored grader files are unmodified.