openmodelai AdithyaSK HF Staff commited on
Commit
c62f145
·
0 Parent(s):

Duplicate from FineEnvs/MiMo-V2.6-RL-harbor-code

Browse files

Co-authored-by: Adithya S K <AdithyaSK@users.noreply.huggingface.co>

This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +60 -0
  2. LICENSE +202 -0
  3. LICENSE-mimoagent.md +22 -0
  4. NOTICE +31 -0
  5. README.md +169 -0
  6. agents/mimo_opencode.py +75 -0
  7. data/tasks.jsonl +0 -0
  8. jobs/code.daytona.yaml +55 -0
  9. jobs/code.yaml +57 -0
  10. manifest.json +0 -0
  11. parity.md +80 -0
  12. parity_experiment.json +114 -0
  13. registry.json +0 -0
  14. tasks/format-code-task-000001/environment/Dockerfile +3 -0
  15. tasks/format-code-task-000001/environment/setup/files/blocklist +62 -0
  16. tasks/format-code-task-000001/environment/setup/setup.sh +59 -0
  17. tasks/format-code-task-000001/instruction.md +45 -0
  18. tasks/format-code-task-000001/task.toml +40 -0
  19. tasks/format-code-task-000001/tests/test.patch +216 -0
  20. tasks/format-code-task-000001/tests/test.sh +39 -0
  21. tasks/format-code-task-000001/tests/test_command.sh +1 -0
  22. tasks/format-code-task-000002/environment/Dockerfile +3 -0
  23. tasks/format-code-task-000002/environment/setup/files/blocklist +62 -0
  24. tasks/format-code-task-000002/environment/setup/setup.sh +59 -0
  25. tasks/format-code-task-000002/instruction.md +29 -0
  26. tasks/format-code-task-000002/task.toml +40 -0
  27. tasks/format-code-task-000002/tests/test.patch +113 -0
  28. tasks/format-code-task-000002/tests/test.sh +39 -0
  29. tasks/format-code-task-000002/tests/test_command.sh +1 -0
  30. tasks/format-code-task-000003/environment/Dockerfile +3 -0
  31. tasks/format-code-task-000003/environment/setup/files/blocklist +62 -0
  32. tasks/format-code-task-000003/environment/setup/setup.sh +59 -0
  33. tasks/format-code-task-000003/instruction.md +7 -0
  34. tasks/format-code-task-000003/task.toml +40 -0
  35. tasks/format-code-task-000003/tests/test.patch +70 -0
  36. tasks/format-code-task-000003/tests/test.sh +39 -0
  37. tasks/format-code-task-000003/tests/test_command.sh +1 -0
  38. tasks/format-code-task-000004/environment/Dockerfile +3 -0
  39. tasks/format-code-task-000004/environment/setup/files/blocklist +62 -0
  40. tasks/format-code-task-000004/environment/setup/setup.sh +59 -0
  41. tasks/format-code-task-000004/instruction.md +23 -0
  42. tasks/format-code-task-000004/task.toml +40 -0
  43. tasks/format-code-task-000004/tests/test.patch +59 -0
  44. tasks/format-code-task-000004/tests/test.sh +39 -0
  45. tasks/format-code-task-000004/tests/test_command.sh +1 -0
  46. tasks/format-code-task-000007/environment/Dockerfile +3 -0
  47. tasks/format-code-task-000007/environment/setup/files/blocklist +62 -0
  48. tasks/format-code-task-000007/environment/setup/setup.sh +59 -0
  49. tasks/format-code-task-000007/instruction.md +26 -0
  50. tasks/format-code-task-000007/task.toml +40 -0
.gitattributes ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.avro filter=lfs diff=lfs merge=lfs -text
4
+ *.bin filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
7
+ *.ftz filter=lfs diff=lfs merge=lfs -text
8
+ *.gz filter=lfs diff=lfs merge=lfs -text
9
+ *.h5 filter=lfs diff=lfs merge=lfs -text
10
+ *.joblib filter=lfs diff=lfs merge=lfs -text
11
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
12
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
13
+ *.mds filter=lfs diff=lfs merge=lfs -text
14
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
15
+ *.model filter=lfs diff=lfs merge=lfs -text
16
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
17
+ *.npy filter=lfs diff=lfs merge=lfs -text
18
+ *.npz filter=lfs diff=lfs merge=lfs -text
19
+ *.onnx filter=lfs diff=lfs merge=lfs -text
20
+ *.ot filter=lfs diff=lfs merge=lfs -text
21
+ *.parquet filter=lfs diff=lfs merge=lfs -text
22
+ *.pb filter=lfs diff=lfs merge=lfs -text
23
+ *.pickle filter=lfs diff=lfs merge=lfs -text
24
+ *.pkl filter=lfs diff=lfs merge=lfs -text
25
+ *.pt filter=lfs diff=lfs merge=lfs -text
26
+ *.pth filter=lfs diff=lfs merge=lfs -text
27
+ *.rar filter=lfs diff=lfs merge=lfs -text
28
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
29
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
30
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
31
+ *.tar filter=lfs diff=lfs merge=lfs -text
32
+ *.tflite filter=lfs diff=lfs merge=lfs -text
33
+ *.tgz filter=lfs diff=lfs merge=lfs -text
34
+ *.wasm filter=lfs diff=lfs merge=lfs -text
35
+ *.xz filter=lfs diff=lfs merge=lfs -text
36
+ *.zip filter=lfs diff=lfs merge=lfs -text
37
+ *.zst filter=lfs diff=lfs merge=lfs -text
38
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
39
+ # Audio files - uncompressed
40
+ *.pcm filter=lfs diff=lfs merge=lfs -text
41
+ *.sam filter=lfs diff=lfs merge=lfs -text
42
+ *.raw filter=lfs diff=lfs merge=lfs -text
43
+ # Audio files - compressed
44
+ *.aac filter=lfs diff=lfs merge=lfs -text
45
+ *.flac filter=lfs diff=lfs merge=lfs -text
46
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
47
+ *.ogg filter=lfs diff=lfs merge=lfs -text
48
+ *.wav filter=lfs diff=lfs merge=lfs -text
49
+ # Image files - uncompressed
50
+ *.bmp filter=lfs diff=lfs merge=lfs -text
51
+ *.gif filter=lfs diff=lfs merge=lfs -text
52
+ *.png filter=lfs diff=lfs merge=lfs -text
53
+ *.tiff filter=lfs diff=lfs merge=lfs -text
54
+ # Image files - compressed
55
+ *.jpg filter=lfs diff=lfs merge=lfs -text
56
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
57
+ *.webp filter=lfs diff=lfs merge=lfs -text
58
+ # Video files - compressed
59
+ *.mp4 filter=lfs diff=lfs merge=lfs -text
60
+ *.webm filter=lfs diff=lfs merge=lfs -text
LICENSE ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
LICENSE-mimoagent.md ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Xiaomi Corporation
4
+ Copyright (c) 2025 Kilian A. Lieret and Carlos E. Jimenez (mini-swe-agent)
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
NOTICE ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MiMo-V2.6-RL in Harbor format
2
+ Converted by Hugging Face and the FineEnvs team. Not affiliated with or endorsed by Xiaomi.
3
+
4
+ This work is derived from, and redistributes material of:
5
+
6
+ MiMo-V2.6-RL-oss (https://huggingface.co/datasets/XiaomiMiMo/MiMo-V2.6-RL-oss, revision 639865fd3374018d6cb29b9fb82dd531406fcf5f)
7
+ Copyright Xiaomi Corporation. Licensed under the Apache License, Version 2.0 (LICENSE).
8
+ The task prompts, test patches, test commands, Terminal-Bench test files, General-domain verifier files,
9
+ and the Docker images referenced by digest (docker.io/xiaomimimo/mimo-v2.6-rl-oss) are Xiaomi's.
10
+
11
+ XiaomiMiMo/verl (https://github.com/XiaomiMiMo/verl, commit a2ad9f6), Apache License 2.0 (LICENSE):
12
+ tests/music_scorer/ (recipes/design/music/scorer), tests/webdev/shot.py, tests/webdev/eval_rubric.py,
13
+ tests/webdev/verdict.py (parse_verdict from eval_mode.py), the Webdev agent prompt, and the step limits.
14
+
15
+ XiaomiMiMo/mimoagent (https://github.com/XiaomiMiMo/mimoagent, commit 467f0a1), MIT License
16
+ (LICENSE-mimoagent.md; Copyright (c) 2026 Xiaomi Corporation, Copyright (c) 2025 Kilian A. Lieret and
17
+ Carlos E. Jimenez (mini-swe-agent)): tests/server_arvo.py, and the Code-domain residue scrub, cache scrub,
18
+ git-clean keep list, test-file reset and ARVO description parsing, ported into the setup and test scripts.
19
+
20
+ Vendored files are unmodified. Changes made in this conversion (Apache-2.0 section 4(b)):
21
+ - Each environment is repackaged as a Harbor task: task.toml, instruction.md, environment/, tests/.
22
+ - Setup that Xiaomi's harness runs before the agent is written as environment/setup/setup.sh and run from
23
+ the task's healthcheck. In the Code residue scrub, /logs is emptied rather than deleted (Harbor owns it).
24
+ - Grading entry points (tests/test.sh, grade.py, verify.py) wrap the original graders. Cyber re-runs the
25
+ last submitted PoC with server_arvo.py's own logic; General redacts judge-key echoes from its output.
26
+ - Music: "Write your complete reply to /app/answer.md." is appended to each prompt, because a Harbor task
27
+ is an agent session rather than a single completion.
28
+ - Images are referenced by digest instead of by tag; the MCP sidecar pins mcp==1.26.0.
29
+ - agents/mimo_opencode.py extends Harbor's OpenCode agent (Apache-2.0, harbor-framework/harbor).
30
+
31
+ Harbor (https://github.com/harbor-framework/harbor) is the task format and runner; it is not redistributed here.
README.md ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ - zh
6
+ task_categories:
7
+ - other
8
+ tags:
9
+ - rl-environment
10
+ - reinforcement-learning
11
+ - harbor
12
+ - agent
13
+ - mimo
14
+ - mimo-v2.6-rl
15
+ - code
16
+ - code
17
+ - swe
18
+ - software-engineering
19
+ size_categories:
20
+ - 1K<n<10K
21
+ viewer: false
22
+ ---
23
+
24
+ [![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)
25
+ [![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)
26
+
27
+ # MiMo-V2.6-RL Code (Harbor)
28
+
29
+ **Fix a real issue in a real repository.** 2,698 Harbor tasks from the Code domain of Xiaomi's
30
+ [MiMo-V2.6-RL-oss](https://huggingface.co/datasets/XiaomiMiMo/MiMo-V2.6-RL-oss), the RL environments MiMo-V2.6 was trained
31
+ on, converted so every one runs as a standard Harbor task.
32
+
33
+ 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.
34
+
35
+ | | |
36
+ |---|---|
37
+ | Tasks | 2,698 |
38
+ | Graded by | hidden tests (deterministic) |
39
+ | Reference step limit | 500 |
40
+ | Source | [`XiaomiMiMo/MiMo-V2.6-RL-oss`](https://huggingface.co/datasets/XiaomiMiMo/MiMo-V2.6-RL-oss) at `639865fd3374` |
41
+ | Reference harness | XiaomiMiMo/verl `a2ad9f6` + XiaomiMiMo/mimoagent `467f0a1` |
42
+ | Adapter version | `mimo_harbor 1.3.0` (see the changelog below) |
43
+
44
+ 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).
45
+
46
+ ## Layout
47
+
48
+ ```text
49
+ tasks/<task_id>/
50
+ ├── task.toml # image pinned by digest, one-time setup (healthcheck), judge settings, provenance
51
+ ├── instruction.md # the prompt the agent sees, word for word what Xiaomi's harness gives it
52
+ ├── environment/ # Dockerfile (FROM the same digest) and setup/, a readable copy of the setup
53
+ └── tests/ # test.sh and everything grading needs; uploaded only after the agent finishes
54
+ registry.json # Harbor registry entry
55
+ data/tasks.jsonl # one metadata row per task, for filtering without walking the tree
56
+ manifest.json # sha256 of every task directory
57
+ jobs/code.yaml # the reference agent settings
58
+ agents/mimo_opencode.py
59
+ ```
60
+
61
+ Example: [task.toml](https://huggingface.co/datasets/FineEnvs/MiMo-V2.6-RL-harbor-code/blob/main/tasks/format-code-task-000001/task.toml) ·
62
+ [instruction](https://huggingface.co/datasets/FineEnvs/MiMo-V2.6-RL-harbor-code/blob/main/tasks/format-code-task-000001/instruction.md) ·
63
+ [verifier](https://huggingface.co/datasets/FineEnvs/MiMo-V2.6-RL-harbor-code/blob/main/tasks/format-code-task-000001/tests/test.sh).
64
+
65
+ ## Run
66
+
67
+ ```bash
68
+ hf download FineEnvs/MiMo-V2.6-RL-harbor-code --repo-type dataset --local-dir mimo-code
69
+ cd mimo-code
70
+ PYTHONPATH=agents HF_TOKEN=hf_... harbor run -y -c jobs/code.yaml
71
+ # or on Daytona (builds the Dockerfile, runs the agent unprivileged natively — closer to Xiaomi's pods):
72
+ DAYTONA_API_KEY=... DAYTONA_API_URL=... PYTHONPATH=agents HF_TOKEN=hf_... harbor run -y -c jobs/code.daytona.yaml
73
+ ```
74
+
75
+ The job runs `agents/mimo_opencode.py` (OpenCode 1.18.32) on HF Sandbox with the reference settings: the step
76
+ limit above, replies of up to 65,536 tokens, thinking low, no web fetch or search.
77
+ Change `model_name` and the provider block for another model. Any Harbor agent can run these tasks; this one
78
+ also applies two steps of Xiaomi's harness a task file can't express: the answer-leak blocklist after install,
79
+ and the unprivileged `agent` user on sandboxes that run everything as root.
80
+
81
+ Serving them to a trainer works like any Harbor dataset, for example with OpenEnv:
82
+
83
+ ```bash
84
+ openenv harbor serve --dataset FineEnvs/MiMo-V2.6-RL-harbor-code --llm-url http://127.0.0.1:8000/v1 --model <your-model>
85
+ ```
86
+
87
+ ## How it was converted
88
+
89
+ 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
90
+ a digest lock, so a rerun produces byte-identical tasks (`manifest.json`). Setup and grading follow Xiaomi's
91
+ harness step by step, as the explorer's runner does, using the same vendored graders:
92
+
93
+ - Nothing that grades a task (hidden tests, rubrics, verifier scripts) is reachable while the agent works.
94
+ - A testbed failure (a patch that won't apply, a system that died, a judge that never answered) writes no reward,
95
+ so Harbor records an error rather than a 0.
96
+ - Images are pinned by digest; HF Sandbox and other prebuilt-image backends run them without a build step.
97
+
98
+ ## Where this differs from Xiaomi's setup, in plain terms
99
+
100
+ 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:
101
+
102
+ - **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.
103
+ - **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.
104
+ - **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.
105
+
106
+ 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).
107
+
108
+ ## Validation
109
+
110
+ - All 7,780 tasks across the six datasets load with Harbor's task loader and pass the adapter's static checks
111
+ (digest-pinned images, setup payload equal to its readable copy, rubrics only under `tests/`).
112
+ - With Harbor's no-op agent every dataset scores 0 and every verifier runs to completion: no free rewards.
113
+ - **Parity with Xiaomi's harness.** Following Harbor's parity procedure, the 36-task parity subset (6 per dataset)
114
+ was run 3 times on each side with the same agent (OpenCode 1.18.32), model (GLM-5.3 via deepinfra, thinking low),
115
+ 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:
116
+
117
+ | | Mean reward (mean ± SEM, 3 runs) | Runs |
118
+ |---|---:|---|
119
+ | Xiaomi's harness (explorer) | 0.556 ± 0.056 | 0.667, 0.500, 0.500 |
120
+ | Harbor | 0.556 ± 0.056 | 0.667, 0.500, 0.500 |
121
+
122
+ Full results, per-task outcomes and notes are in `parity.md` and `parity_experiment.json`.
123
+
124
+ ## Patches, updates and fixes
125
+
126
+ A timeline of changes to this dataset and the `mimo_harbor` adapter that builds it. Every task records the adapter
127
+ version that produced it in `task.toml` (`[metadata].adapter`) and in `manifest.json`, so you can tell which of
128
+ these a given copy includes.
129
+
130
+ ### 1.3.0 — 2026-10-09 — environment-level answer-leak enforcement
131
+ - The answer-leak blocklist is now applied to `/etc/hosts` as the **last step of task setup**, so the answer routes
132
+ (GitHub and its API, PyPI / npm / crates, the Go module proxy, and the Hub's own dataset hosts) are blocked for
133
+ **any** agent or trainer — not only the reference agent. Before this, the task only *staged* the list and the
134
+ reference agent applied it after installing; a different agent on a network-connected sandbox could still reach
135
+ those hosts and fetch a fix.
136
+ - The reference agent (`agents/mimo_opencode.py`) lifts the blocklist to install OpenCode (fetched from GitHub),
137
+ then re-applies it, so the model/judge router (`router.huggingface.co`) and the relay stay open throughout while
138
+ the answer routes stay closed during the run.
139
+ - Affects **code, cyber, general and terminal** (the domains that carry a blocklist); **webdev** and **music** are
140
+ unchanged.
141
+ - Prompted by independent third-party analysis of reward-hacking in the released MiMo environments.
142
+
143
+ ### 1.2.0 — 2026-10-05 — initial public release
144
+ - All 7,780 environments across six domains (code, cyber, general, terminal, webdev, music) published as Harbor
145
+ tasks, set up and graded 1:1 with Xiaomi's harness (`verl` `a2ad9f6` + `mimoagent` `467f0a1`).
146
+ - Anti-reward-hacking faithful to the reference: the Code git-history strip physically removes fix-bearing future
147
+ commits, **including unreachable objects** (falling back to hiding `.git` only when the strip can't be verified);
148
+ build-residue and cache scrubs; the answer-leak blocklist (mimoagent's list, extended with the Hub dataset hosts
149
+ and package registries because this runs online where Xiaomi ran offline); a grader-isolation guard for
150
+ in-container grading; the unprivileged `agent` user on Cyber and General.
151
+ - Daytona backend support (`jobs/<kind>.daytona.yaml`): builds the Dockerfile and runs the agent unprivileged.
152
+ - Music runs in a Debian *bookworm*-slim Python image with workdir `/root`, so it starts on HF Sandbox.
153
+
154
+ ## Credits
155
+
156
+ The environments, their prompts, tests, verifiers, images and graders are the work of the
157
+ [Xiaomi MiMo](https://huggingface.co/XiaomiMiMo) team, released as
158
+ [XiaomiMiMo/MiMo-V2.6-RL-oss](https://huggingface.co/datasets/XiaomiMiMo/MiMo-V2.6-RL-oss) together with their training code
159
+ [XiaomiMiMo/verl](https://github.com/XiaomiMiMo/verl) and agent harness
160
+ [XiaomiMiMo/mimoagent](https://github.com/XiaomiMiMo/mimoagent). mimoagent builds on
161
+ [mini-swe-agent](https://github.com/SWE-agent/mini-swe-agent) (Kilian A. Lieret and Carlos E. Jimenez).
162
+ The task format and runner are [Harbor](https://github.com/harbor-framework/harbor).
163
+ This conversion is by Hugging Face and the FineEnvs team, and is not affiliated with or endorsed by Xiaomi.
164
+
165
+ ## License
166
+
167
+ Apache-2.0, as the source dataset (`LICENSE`). Files vendored from XiaomiMiMo/mimoagent (`tests/server_arvo.py`
168
+ in Cyber tasks, and the ported setup commands) are MIT (`LICENSE-mimoagent.md`). `NOTICE` lists every source,
169
+ its license, and the changes this conversion made. Vendored grader files are unmodified.
agents/mimo_opencode.py ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """OpenCode for MiMo tasks: Harbor's OpenCode agent plus two steps of Xiaomi's harness that a task can't express.
2
+
3
+ 1. The answer-leak blocklist. mimoagent appends it to /etc/hosts after the agent is installed (the install itself
4
+ needs github.com). Task setup leaves the list in /var/lib/mimo/blocklist; this agent applies it right after
5
+ install and fails closed, as mimoagent does.
6
+ 2. The unprivileged agent user. Cyber and General run the agent as `agent`, so the verify server and the systems'
7
+ data stay out of its reach. Tasks say so in [agent].user; on environments that cannot switch users (HF Sandbox
8
+ runs everything as root), this agent drops to that user itself with runuser.
9
+
10
+ 3. The output ceiling. OpenCode caps a reply at 32,000 tokens unless OPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX says
11
+ otherwise; it is set here from the configured model limit (65,536, mimoagent's opencode.yaml) rather than in the
12
+ job's env, because Harbor treats any env var named *TOKEN* as a secret and blanks its value in every output.
13
+
14
+ Use it with `import_path: mimo_opencode:MimoOpenCode` (see jobs/*.yaml).
15
+ """
16
+
17
+ from __future__ import annotations
18
+
19
+ import shlex
20
+ from typing import Any
21
+
22
+ from harbor.agents.installed.opencode import OpenCode
23
+ from harbor.environments.base import BaseEnvironment
24
+
25
+ MIMO = "/var/lib/mimo"
26
+
27
+
28
+ class MimoOpenCode(OpenCode):
29
+ @staticmethod
30
+ def name() -> str:
31
+ return "mimo-opencode"
32
+
33
+ def __init__(self, *args, **kwargs):
34
+ super().__init__(*args, **kwargs)
35
+ self._drop_to: str | None | bool = False # False: not checked yet
36
+ limits = [m.get("limit", {}).get("output") for p in (self._opencode_config.get("provider") or {}).values()
37
+ for m in (p.get("models") or {}).values()]
38
+ top = max([x for x in limits if isinstance(x, int)] or [0])
39
+ self._mimo_env = {"OPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX": str(top)} if top > 32000 else {}
40
+
41
+ async def _target_user(self, environment: BaseEnvironment) -> str | None:
42
+ """The user the task wants the agent to run as, if the environment would otherwise run it as root."""
43
+ if self._drop_to is False:
44
+ want = await environment.exec(f"cat {MIMO}/agent_user 2>/dev/null", user="root")
45
+ user = (want.stdout or "").strip() or None
46
+ if user:
47
+ who = await super().exec_as_agent(environment, "id -un")
48
+ user = user if (who.stdout or "").strip() == "root" else None
49
+ self._drop_to = user
50
+ return self._drop_to
51
+
52
+ async def exec_as_agent(self, environment: BaseEnvironment, command: str, env: dict[str, str] | None = None,
53
+ cwd: str | None = None, timeout_sec: int | None = None) -> Any:
54
+ env = {**(env or {}), **self._mimo_env}
55
+ user = await self._target_user(environment)
56
+ if user:
57
+ home = f"/home/{user}"
58
+ exports = " ".join(f"{k}={shlex.quote(v)}" for k, v in (env or {}).items())
59
+ command = (f"runuser -u {user} -- env HOME={home} USER={user} {exports} "
60
+ f"bash -c {shlex.quote(('cd ' + shlex.quote(cwd) + ' && ' if cwd else '') + command)}")
61
+ return await super().exec_as_agent(environment, command, env=env, cwd=cwd, timeout_sec=timeout_sec)
62
+
63
+ async def install(self, environment: BaseEnvironment) -> None:
64
+ # Task setup applies the answer-leak blocklist to /etc/hosts at the environment level (so it holds for any
65
+ # agent). The OpenCode download needs github, which is on that list, so lift the blocklist for the install
66
+ # (restore the pre-blocklist /etc/hosts the setup saved) and re-apply it right after.
67
+ await environment.exec(f"[ -f {MIMO}/hosts.preblock ] && cp {MIMO}/hosts.preblock /etc/hosts || true", user="root")
68
+ await super().install(environment)
69
+ res = await environment.exec(
70
+ f"if [ -f {MIMO}/blocklist ]; then grep -q '^# mimo answer-leak blocklist' /etc/hosts || cat {MIMO}/blocklist >> /etc/hosts; "
71
+ f"grep -c '^0.0.0.0' /etc/hosts; else echo none; fi", user="root")
72
+ if res.return_code != 0:
73
+ raise RuntimeError("could not install the answer-leak blocklist in /etc/hosts: " + (res.stderr or res.stdout or "")[-300:])
74
+ out = (res.stdout or "").strip()
75
+ self.logger.info("answer-leak blocklist: " + ("none for this task" if out == "none" else f"{out} hosts blocked in /etc/hosts"))
data/tasks.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
jobs/code.daytona.yaml ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Same, on Daytona: builds the Dockerfile and runs the agent as the task's unprivileged user natively.
2
+ # Needs DAYTONA_API_KEY / DAYTONA_API_URL and `pip install 'harbor[daytona]'`.
3
+ # From the repo root: PYTHONPATH=agents HF_TOKEN=... harbor run -y -c jobs/code.daytona.yaml
4
+ jobs_dir: jobs/code
5
+ n_attempts: 1
6
+ timeout_multiplier: 1.0
7
+ orchestrator:
8
+ type: local
9
+ n_concurrent_trials: 4
10
+ environment:
11
+ type: daytona
12
+ delete: true
13
+ agents:
14
+ - import_path: mimo_opencode:MimoOpenCode
15
+ model_name: hf/zai-org/GLM-5.3:deepinfra
16
+ kwargs:
17
+ version: 1.18.32
18
+ opencode_config:
19
+ autoupdate: false
20
+ share: disabled
21
+ provider:
22
+ hf:
23
+ npm: '@ai-sdk/openai-compatible'
24
+ name: Hugging Face Inference Providers
25
+ options:
26
+ baseURL: https://router.huggingface.co/v1
27
+ apiKey: '{env:HF_TOKEN}'
28
+ models:
29
+ zai-org/GLM-5.3:deepinfra:
30
+ name: zai-org/GLM-5.3
31
+ tool_call: true
32
+ limit:
33
+ context: 1000000
34
+ output: 65536
35
+ options:
36
+ reasoningEffort: low
37
+ agent:
38
+ build:
39
+ steps: 500
40
+ snapshot: true
41
+ lsp: true
42
+ formatter: true
43
+ permission:
44
+ webfetch: deny
45
+ websearch: deny
46
+ bash: allow
47
+ edit: allow
48
+ env:
49
+ HF_TOKEN: ${HF_TOKEN}
50
+ OPENCODE_DISABLE_MODELS_FETCH: '1'
51
+ OPENCODE_DISABLE_AUTOUPDATE: '1'
52
+ OPENCODE_DISABLE_LSP_DOWNLOAD: '1'
53
+ OPENCODE_DISABLE_SHARE: '1'
54
+ datasets:
55
+ - path: tasks
jobs/code.yaml ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MiMo-V2.6-RL code on Harbor with the reference agent settings.
2
+ # From the repo root: PYTHONPATH=agents HF_TOKEN=... harbor run -y -c jobs/code.yaml
3
+ jobs_dir: jobs/code
4
+ n_attempts: 1
5
+ timeout_multiplier: 1.0
6
+ orchestrator:
7
+ type: local
8
+ n_concurrent_trials: 4
9
+ environment:
10
+ type: hf-sandbox
11
+ delete: true
12
+ kwargs:
13
+ flavor: cpu-basic
14
+ job_timeout: 1h
15
+ agents:
16
+ - import_path: mimo_opencode:MimoOpenCode
17
+ model_name: hf/zai-org/GLM-5.3:deepinfra
18
+ kwargs:
19
+ version: 1.18.32
20
+ opencode_config:
21
+ autoupdate: false
22
+ share: disabled
23
+ provider:
24
+ hf:
25
+ npm: '@ai-sdk/openai-compatible'
26
+ name: Hugging Face Inference Providers
27
+ options:
28
+ baseURL: https://router.huggingface.co/v1
29
+ apiKey: '{env:HF_TOKEN}'
30
+ models:
31
+ zai-org/GLM-5.3:deepinfra:
32
+ name: zai-org/GLM-5.3
33
+ tool_call: true
34
+ limit:
35
+ context: 1000000
36
+ output: 65536
37
+ options:
38
+ reasoningEffort: low
39
+ agent:
40
+ build:
41
+ steps: 500
42
+ snapshot: true
43
+ lsp: true
44
+ formatter: true
45
+ permission:
46
+ webfetch: deny
47
+ websearch: deny
48
+ bash: allow
49
+ edit: allow
50
+ env:
51
+ HF_TOKEN: ${HF_TOKEN}
52
+ OPENCODE_DISABLE_MODELS_FETCH: '1'
53
+ OPENCODE_DISABLE_AUTOUPDATE: '1'
54
+ OPENCODE_DISABLE_LSP_DOWNLOAD: '1'
55
+ OPENCODE_DISABLE_SHARE: '1'
56
+ datasets:
57
+ - path: tasks
manifest.json ADDED
The diff for this file is too large to render. See raw diff
 
parity.md ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Parity: explorer (original) vs Harbor
2
+
3
+ **Original side:** the MiMo RL Environment Explorer's runner (`app/runner/domains.py`), which follows Xiaomi's
4
+ harness.
5
+
6
+ **Harbor side:** the tasks this adapter generates, run with `agents/mimo_opencode.py` and `jobs/*.yaml`.
7
+
8
+ Both sides use the same settings:
9
+ - Agent: OpenCode 1.18.32.
10
+ - Model: `zai-org/GLM-5.3` via deepinfra, thinking low, replies up to 65,536 tokens.
11
+ - Step limit: the reference limit for each dataset.
12
+ - Sandbox: HF Sandbox, same flavors.
13
+ - Judges: Inkling (text) and Llama-4-Maverick (vision).
14
+ - Graders: the same vendored code.
15
+
16
+ ## Sanity check: 1 task per dataset, 1 run per side (2026-09-26)
17
+
18
+ The first parity task of each dataset, chosen by `--split parity`.
19
+
20
+ | Dataset | Task | Explorer | Harbor | Notes |
21
+ |---|---|---:|---:|---|
22
+ | code | format-code-task-000192 | 0.0 | 0.0 | hidden tests fail on both sides |
23
+ | cyber | arvo_13428 | 1.0 | 1.0 | Harbor's earlier valid run scored 0: the model patched the bug instead of submitting a PoC |
24
+ | general | s3k_0057_accounting_audit_tax_en_t2_rl_008 | 0.625 | 0.625 | the same rubric score |
25
+ | terminal | candidate-0109-science-robotics | 0.0 | 1.0 | the explorer run passed 6 of 7 tests (one edge case failed); the task scores all or nothing |
26
+ | webdev | dasyn_260630_00561 | 0.76 | 0.747 | the same judge on two different sites |
27
+ | music | music-gK-0229 | 0.0 | 0.0 | both rejected by the validity gate for bars of the wrong length |
28
+
29
+ These runs cost about $2.40 on the explorer side and about the same on Harbor.
30
+
31
+ This is one run per side. It shows that both sides set up, run and grade each dataset the same way. It doesn't yet
32
+ measure parity, which Harbor defines as overlapping score ranges over at least 2 runs per side.
33
+
34
+ ### What the sanity runs found and fixed
35
+
36
+ - **Webdev's grader couldn't import its rubric.** The vendored files use package-relative imports, so they now ship
37
+ as the `webdev` package.
38
+ - **General's verifier printed the first characters of the judge key.** Harbor scrubs whole secrets only, so the
39
+ grader now redacts key-shaped text in its output and in every verifier file.
40
+ - **Harbor blanked every `65536` in the results.** It treats env vars named `*TOKEN*` as secrets, and
41
+ `OPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX` qualifies. The agent class now sets that variable itself.
42
+ - **A trial with no model access still records reward 0.** Harbor keeps the trial and scores it 0, with no verifier
43
+ error. When comparing, look at `agent/opencode.txt`: 0 steps with an auth error means an infrastructure failure,
44
+ not a model result.
45
+ - **The explorer's Music runner had been broken since the security audit** (`httpx.stream` with `extensions=`).
46
+ It is fixed in `app/runner/domains.py`.
47
+
48
+ ## Full parity: 36 tasks, 3 runs per side (2026-09-27)
49
+
50
+ The parity subset (`--split parity`): 6 tasks per dataset, fixed by the sha256 of the task id. Run 1 was done on both
51
+ sides before runs 2 and 3, as Harbor's parity guide asks. Each run's score is the mean reward over the tasks that side
52
+ scored. Scores are mean ± sample SEM over the three runs.
53
+
54
+ | Dataset | Tasks | Original (mean ± SEM) | Harbor (mean ± SEM) | Original runs | Harbor runs | Ranges overlap |
55
+ |---|---:|---:|---:|---|---|:---:|
56
+ | Code | 6 | 0.556 ± 0.056 | 0.556 ± 0.056 | 0.667, 0.500, 0.500 | 0.667, 0.500, 0.500 | yes |
57
+ | Cyber | 6 | 0.822 ± 0.011 | 0.833 ± 0.096 | 0.800, 0.833, 0.833 | 1.000, 0.667, 0.833 | yes |
58
+ | General | 6 | 0.844 ± 0.008 | 0.844 ± 0.024 | 0.842, 0.832, 0.859 | 0.890, 0.811, 0.832 | yes |
59
+ | Music | 6 | 0.111 ± 0.063 | 0.317 ± 0.093 | 0.000, 0.114, 0.219 | 0.138, 0.449, 0.363 | yes |
60
+ | Terminal | 6 | 0.278 ± 0.056 | 0.111 ± 0.056 | 0.333, 0.333, 0.167 | 0.167, 0.167, 0.000 | yes |
61
+ | Webdev | 6 | 0.749 ± 0.049 | 0.738 ± 0.054 | 0.650, 0.803, 0.793 | 0.799, 0.631, 0.785 | yes |
62
+
63
+ **All six datasets meet Harbor's criterion: the run-score ranges overlap.** Code, Cyber, General and Webdev agree
64
+ closely.
65
+
66
+ - **Terminal (0.278 vs 0.111):** each task is all or nothing, and outcomes flip in both directions on both sides
67
+ (for example `candidate-0109` scored 0/1/1 in the explorer and 0/1/0 in Harbor). With six tasks, that is noise.
68
+ - **Music (0.111 vs 0.317):** the validity gate makes each piece close to pass or fail, and it flips run to run on
69
+ both sides. Harbor passes the gate more often (7 of 18 pieces vs 4 of 18). That fits Music's one intended
70
+ difference: in Harbor the agent writes its reply to a file with up to 4 steps, where the original is a single
71
+ completion.
72
+
73
+ **Infrastructure failures were rerun, not counted.**
74
+ - Some first attempts timed out talking to the sandbox API (about 26 sandboxes ran at once): 9 original-side and 6
75
+ Harbor-side tasks in run 1, fewer in later runs. Those were rerun at lower concurrency.
76
+ - `arvo_49407` run 1 failed on both sides the same way: the agent started 16 parallel fuzzers on a 2-vCPU
77
+ `cpu-basic` sandbox and starved the sandbox server. It is excluded from run 1 on both sides.
78
+
79
+ The explorer side of these runs cost about $77; the Harbor side about the same. `parity_experiment.json` has the raw
80
+ numbers in Harbor's format.
parity_experiment.json ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "adapter_name": "mimo-v2.6-rl",
4
+ "agent": "opencode@1.18.32 (mimo_opencode)",
5
+ "model": "zai-org/GLM-5.3 via deepinfra, reasoning_effort low",
6
+ "date": "2026-09-27",
7
+ "adapted_benchmark_size": 7780,
8
+ "parity_benchmark_size": 36,
9
+ "number_of_runs": 3,
10
+ "notes": "Original side: the MiMo RL Environment Explorer runner (Xiaomi's harness: XiaomiMiMo/verl a2ad9f6 + mimoagent 467f0a1). Parity subset: 6 tasks per dataset, fixed by sha256(task id) (--split parity). Same agent version, model, provider, thinking level, step limits, 65,536-token replies, judges (Inkling, Llama-4-Maverick) and sandbox flavors on both sides. Per-run score = mean reward over the tasks that side scored; trials that failed for infrastructure reasons (sandbox API timeouts) were rerun, and arvo_49407 run 1 failed on both sides (the agent starved a 2-vCPU sandbox) and is excluded on both. Music differs by design: one completion on the original side, up to 4 write-only steps in Harbor.",
11
+ "original_parity_repo": "https://github.com/adithya-s-k/FineEnvs/tree/mimo-explorer-rollouts/mimo-explorer",
12
+ "adapter_pr": [],
13
+ "dataset_pr": [],
14
+ "parity_pr": [],
15
+ "metrics": [
16
+ {
17
+ "benchmark_name": "MiMo-V2.6-RL Code",
18
+ "metric": "mean reward",
19
+ "original": "0.556 ± 0.056",
20
+ "harbor": "0.556 ± 0.056",
21
+ "original_runs": [
22
+ 0.6667,
23
+ 0.5,
24
+ 0.5
25
+ ],
26
+ "harbor_runs": [
27
+ 0.6667,
28
+ 0.5,
29
+ 0.5
30
+ ]
31
+ },
32
+ {
33
+ "benchmark_name": "MiMo-V2.6-RL Cyber",
34
+ "metric": "mean reward",
35
+ "original": "0.822 ± 0.011",
36
+ "harbor": "0.833 ± 0.096",
37
+ "original_runs": [
38
+ 0.8,
39
+ 0.8333,
40
+ 0.8333
41
+ ],
42
+ "harbor_runs": [
43
+ 1.0,
44
+ 0.6667,
45
+ 0.8333
46
+ ]
47
+ },
48
+ {
49
+ "benchmark_name": "MiMo-V2.6-RL General",
50
+ "metric": "mean reward",
51
+ "original": "0.844 ± 0.008",
52
+ "harbor": "0.844 ± 0.024",
53
+ "original_runs": [
54
+ 0.8423,
55
+ 0.8315,
56
+ 0.8591
57
+ ],
58
+ "harbor_runs": [
59
+ 0.8899,
60
+ 0.8107,
61
+ 0.8315
62
+ ]
63
+ },
64
+ {
65
+ "benchmark_name": "MiMo-V2.6-RL Music",
66
+ "metric": "mean reward",
67
+ "original": "0.111 ± 0.063",
68
+ "harbor": "0.317 ± 0.093",
69
+ "original_runs": [
70
+ 0.0,
71
+ 0.1135,
72
+ 0.2193
73
+ ],
74
+ "harbor_runs": [
75
+ 0.1382,
76
+ 0.4493,
77
+ 0.3633
78
+ ]
79
+ },
80
+ {
81
+ "benchmark_name": "MiMo-V2.6-RL Terminal",
82
+ "metric": "mean reward",
83
+ "original": "0.278 ± 0.056",
84
+ "harbor": "0.111 ± 0.056",
85
+ "original_runs": [
86
+ 0.3333,
87
+ 0.3333,
88
+ 0.1667
89
+ ],
90
+ "harbor_runs": [
91
+ 0.1667,
92
+ 0.1667,
93
+ 0.0
94
+ ]
95
+ },
96
+ {
97
+ "benchmark_name": "MiMo-V2.6-RL Webdev",
98
+ "metric": "mean reward",
99
+ "original": "0.749 ± 0.049",
100
+ "harbor": "0.738 ± 0.054",
101
+ "original_runs": [
102
+ 0.6505,
103
+ 0.8033,
104
+ 0.7933
105
+ ],
106
+ "harbor_runs": [
107
+ 0.7994,
108
+ 0.6306,
109
+ 0.7852
110
+ ]
111
+ }
112
+ ]
113
+ }
114
+ ]
registry.json ADDED
The diff for this file is too large to render. See raw diff
 
tasks/format-code-task-000001/environment/Dockerfile ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ # The task's image, pinned by digest (the same as [environment].docker_image).
2
+ # Setup runs at start from [environment.healthcheck]; environment/setup/ is its readable copy.
3
+ FROM docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:f0701aeb7d0813fe06c2b72bb6b558df48cefb21be6a283fbb0250b317b45e12
tasks/format-code-task-000001/environment/setup/files/blocklist ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # mimo answer-leak blocklist (mimoagent)
2
+ 0.0.0.0 github.com
3
+ 0.0.0.0 www.github.com
4
+ 0.0.0.0 api.github.com
5
+ 0.0.0.0 raw.githubusercontent.com
6
+ 0.0.0.0 codeload.github.com
7
+ 0.0.0.0 objects.githubusercontent.com
8
+ 0.0.0.0 gist.github.com
9
+ 0.0.0.0 gist.githubusercontent.com
10
+ 0.0.0.0 gitlab.com
11
+ 0.0.0.0 bitbucket.org
12
+ 0.0.0.0 sourceforge.net
13
+ 0.0.0.0 git.kernel.org
14
+ 0.0.0.0 chromium.googlesource.com
15
+ 0.0.0.0 android.googlesource.com
16
+ 0.0.0.0 sourcegraph.com
17
+ 0.0.0.0 bugs.chromium.org
18
+ 0.0.0.0 issues.oss-fuzz.com
19
+ 0.0.0.0 oss-fuzz.com
20
+ 0.0.0.0 osv.dev
21
+ 0.0.0.0 api.osv.dev
22
+ 0.0.0.0 bugzilla.mozilla.org
23
+ 0.0.0.0 proxy.golang.org
24
+ 0.0.0.0 sum.golang.org
25
+ 0.0.0.0 pkg.go.dev
26
+ 0.0.0.0 google.com
27
+ 0.0.0.0 www.google.com
28
+ 0.0.0.0 bing.com
29
+ 0.0.0.0 www.bing.com
30
+ 0.0.0.0 duckduckgo.com
31
+ 0.0.0.0 html.duckduckgo.com
32
+ 0.0.0.0 search.brave.com
33
+ 0.0.0.0 stackoverflow.com
34
+ 0.0.0.0 huggingface.co
35
+ 0.0.0.0 www.huggingface.co
36
+ 0.0.0.0 hf.co
37
+ 0.0.0.0 datasets-server.huggingface.co
38
+ 0.0.0.0 cdn-lfs.huggingface.co
39
+ 0.0.0.0 cdn-lfs-us-1.huggingface.co
40
+ 0.0.0.0 cdn-lfs-eu-1.huggingface.co
41
+ 0.0.0.0 xethub.hf.co
42
+ 0.0.0.0 cas-bridge.xethub.hf.co
43
+ 0.0.0.0 cas-server.xethub.hf.co
44
+ 0.0.0.0 transfer.xethub.hf.co
45
+ 0.0.0.0 pypi.org
46
+ 0.0.0.0 files.pythonhosted.org
47
+ 0.0.0.0 registry.npmjs.org
48
+ 0.0.0.0 registry.yarnpkg.com
49
+ 0.0.0.0 crates.io
50
+ 0.0.0.0 static.crates.io
51
+ 0.0.0.0 rubygems.org
52
+ 0.0.0.0 repo1.maven.org
53
+ 0.0.0.0 search.maven.org
54
+ 0.0.0.0 nuget.org
55
+ 0.0.0.0 api.nuget.org
56
+ 0.0.0.0 packagist.org
57
+ 0.0.0.0 repo.packagist.org
58
+ 0.0.0.0 hex.pm
59
+ 0.0.0.0 cdn.jsdelivr.net
60
+ 0.0.0.0 unpkg.com
61
+ 0.0.0.0 esm.sh
62
+ 0.0.0.0 cdnjs.cloudflare.com
tasks/format-code-task-000001/environment/setup/setup.sh ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Runs once, as root, before the agent starts: Harbor's [environment.healthcheck] unpacks this folder into
3
+ # /var/lib/mimo and runs it. Generated by mimo_harbor; see its README for how each step maps to Xiaomi's harness.
4
+ M=/var/lib/mimo
5
+ [ -f "$M/ready" ] && exit 0
6
+ chmod 700 "$M"
7
+ fail() { echo "setup: $*" >&2; exit 1; }
8
+ # the answer-leak blocklist (mimoagent). write_blocklist only STAGES the list (so the order of setup steps is never
9
+ # affected — General, for one, downloads its workplace files from the Hub after staging); it is applied to /etc/hosts
10
+ # at the very end of setup (POSTAMBLE), which protects any agent, not only the reference one.
11
+ write_blocklist() { cp "$M/files/blocklist" "$M/blocklist"; }
12
+
13
+ # Code: mimoagent environments/datasets/opensource_code.py + base.py, as the explorer runs it (app/runner/domains.py Code).
14
+ CWD=/testbed
15
+ git config --global --add safe.directory "$CWD"
16
+ cd "$CWD" || fail "no working directory $CWD"
17
+ if ! git rev-parse --git-dir >/dev/null 2>&1; then # a bare source tree: give it a baseline commit
18
+ git init -q && git add -A && git -c user.name=mimo -c user.email=mimo@localhost commit -q -m baseline --allow-empty
19
+ fi
20
+ BASE=$(git rev-parse HEAD 2>/dev/null)
21
+ [ ${#BASE} -eq 40 ] || fail "could not resolve the base commit in $CWD"
22
+ echo "$BASE" > "$M/base"
23
+ # Images are built with history truncated at the base. If one is not, the fix could be read out of git log,
24
+ # so .git is hidden while the agent works and put back for grading.
25
+ LATER=$(git rev-list --all --not "$BASE" 2>/dev/null | head -n 5 | grep -c . || true)
26
+ rm -rf /testbed/node_modules/.cache /testbed/node_modules/.vitest 2>/dev/null; true
27
+ rm -f /tmp/fail.log /tmp/pass.log /tmp/patch.diff /tmp/test_patch.diff /tmp/*.log 2>/dev/null; rm -rf /tmp/claude-0 /tmp/claude-* /tmp/testem-* /tmp/puppeteer_dev_chrome_profile-* 2>/dev/null; rm -f /tmp/test_files.json 2>/dev/null; rm -rf /tmp/jest_* /tmp/jest-* /tmp/build /tmp/build_env 2>/dev/null; rm -rf /tmp/pytest-of-root /tmp/pytest-* /tmp/.pytest_cache /tmp/__pycache__ 2>/dev/null; rm -rf /tmp/go-build* /tmp/standards /tmp/wordpress /tmp/zig-* /tmp/testbase /tmp/testbed 2>/dev/null; rm -f /tmp/tmp*.tmp /tmp/*.bak /tmp/expect* /tmp/butwas* 2>/dev/null; rm -rf /root/.cache/go-build 2>/dev/null; rm -rf /tests 2>/dev/null; find /logs -mindepth 1 -delete 2>/dev/null; mkdir -p /logs/agent /logs/verifier /logs/artifacts; chmod 777 /logs/agent /logs/verifier /logs/artifacts; find /var/log -type f -delete 2>/dev/null || true; rm -rf /var/lib/postgresql/*/*/log /var/lib/postgresql/*/*/pg_log 2>/dev/null || true; find /var/lib/mysql /var/lib/mongodb -type f -name '*.log' -delete 2>/dev/null || true; rm -rf /root/.npm/_logs /root/.babel.json /root/.pytest_cache 2>/dev/null || true; find / -maxdepth 4 -xdev -name task_description.md -path '*/.build_env/*' -delete 2>/dev/null || true; true
28
+ git clean -fdx --exclude=node_modules --exclude=bower_components --exclude=.husky --exclude=vendor --exclude=third_party --exclude=_deps --exclude=vcpkg_installed --exclude=.venv --exclude=venv --exclude=.gradle --exclude=target --exclude=.build --exclude=lib --exclude=.bundle --exclude=Manifest.toml --exclude=_build --exclude=.stack-work --exclude=dist-newstyle >/dev/null 2>&1
29
+ find /root/.m2 -type f \( -name '*-SNAPSHOT.jar' -o -name '*-SNAPSHOT-sources.jar' -o -name '*-SNAPSHOT-tests.jar' -o -name '*-SNAPSHOT-test-sources.jar' \) -delete 2>/dev/null; rm -rf /root/.julia/compiled 2>/dev/null; rm -rf /root/.gradle/caches/build-cache-* /root/.gradle/daemon 2>/dev/null; rm -rf /root/.gradle/caches/*/scripts /root/.gradle/caches/jars-* 2>/dev/null; rm -rf /root/.cache/bazel 2>/dev/null; true
30
+ if [ "$LATER" -gt 0 ]; then
31
+ # mimoagent's default git_leak_prevention is "strip": physically remove the fix-bearing future commits in place so
32
+ # .git stays usable and nothing leaks, even to a root agent. Hide .git only if the strip can't be verified; grading
33
+ # (code_test.sh) restores a hidden .git before it applies the test patch.
34
+ if ( set -eo pipefail
35
+ git checkout --detach $BASE 2>/dev/null || true
36
+ git for-each-ref --format="%(refname)" refs/heads | while read r; do git update-ref -d "$r" 2>/dev/null; done || true
37
+ git remote | xargs -r -n1 git remote remove 2>/dev/null || true
38
+ git for-each-ref --format="%(refname)" refs/replace refs/notes refs/stash refs/remotes refs/pull 2>/dev/null | while read r; do git update-ref -d "$r" 2>/dev/null; done || true
39
+ git for-each-ref --format="%(refname)" refs/tags | while read t; do if ! git merge-base --is-ancestor "$t" $BASE 2>/dev/null; then git tag -d "${t#refs/tags/}" >/dev/null 2>&1; fi; done || true
40
+ git reflog expire --expire=now --all 2>/dev/null || true
41
+ git -c gc.pruneExpire=now -c gc.cruftPacks=false gc --prune=now 2>/dev/null || true
42
+ set -euo pipefail
43
+ TARGET_TIMESTAMP=$(git show -s --format=%ci $BASE)
44
+ AFTER_TIMESTAMP=$(date -d "$TARGET_TIMESTAMP + 1 second" '+%Y-%m-%d %H:%M:%S')
45
+ COMMIT_COUNT=$(git log --oneline --all --since="$AFTER_TIMESTAMP" | wc -l)
46
+ [ "$COMMIT_COUNT" -eq 0 ] ); then
47
+ echo "history not truncated at ${BASE:0:12}: future commits stripped in place"
48
+ else
49
+ mv "$CWD/.git" "$M/git-hidden" && echo "history not truncated and unstrippable: .git hidden while the agent works"
50
+ fi
51
+ fi
52
+ write_blocklist
53
+
54
+ if [ -f "$M/blocklist" ]; then
55
+ [ -f "$M/hosts.preblock" ] || cp /etc/hosts "$M/hosts.preblock"
56
+ grep -q '^# mimo answer-leak blocklist' /etc/hosts 2>/dev/null || cat "$M/blocklist" >> /etc/hosts
57
+ fi
58
+ touch "$M/ready"
59
+ echo "setup done"
tasks/format-code-task-000001/instruction.md ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Fix the following issue:
2
+
3
+ # Stuck transactions caused by excessive gas limits
4
+
5
+ We're hitting a nasty bug: a transaction submitted with an absurdly large gas
6
+ limit (well above the block gas limit) gets permanently stuck, and worse, it
7
+ blocks every later transaction from the same account.
8
+
9
+ Here's what happens. When the block builder pops a transaction and writes it
10
+ into the block being assembled, the write fails because the requested gas can
11
+ never fit in a block. But the builder treats *every* write failure identically:
12
+ it puts the transaction back and tries again on the next block. So this
13
+ transaction is retried forever, and since the pool already advanced the
14
+ account's expected nonce when it accepted the transaction, no later transaction
15
+ from that account can ever be processed.
16
+
17
+ The underlying problem is two-fold and I'd like both addressed:
18
+
19
+ 1. **The state executor's transaction-write path doesn't distinguish "retry"
20
+ from "discard" failures.** When writing a transaction to a block fails, the
21
+ caller needs to know whether the failure is *recoverable* — the transaction
22
+ might succeed in a later block, so it should be retried — or *non-recoverable*
23
+ — the transaction can never be included and must be dropped.
24
+
25
+ A write failure is **non-recoverable** precisely when the transaction's gas
26
+ requirement exceeds the block's gas limit (no block could ever hold it).
27
+ Every other failure encountered while writing is **recoverable**, including:
28
+ an incorrect nonce, the sender not being able to afford the gas cost, and a
29
+ transaction that would fit a full block but not the gas remaining in the
30
+ current (already partly filled) one.
31
+
32
+ Expose this through the value returned by the write call: it must still
33
+ behave as an `error` (and be `nil` on success), but when non-nil it must
34
+ carry an exported `IsRecoverable` boolean field reporting the above.
35
+
36
+ 2. **The pool can't roll back an account's expected nonce.** The pool tracks the
37
+ next expected nonce per account. When a transaction it tracked is discarded,
38
+ that counter has to be rolled back, otherwise the account stays blocked. Add
39
+ a method `DecreaseAccountNonce(tx *types.Transaction)` to the transaction pool
40
+ that decrements by one the next expected nonce it tracks for the sender of
41
+ `tx`. If the pool isn't tracking that account, it must be a safe no-op.
42
+
43
+ With these in place, the block builder can drop a permanently-invalid
44
+ transaction (and roll back the account nonce) while still retrying transactions
45
+ that merely didn't fit the current block.
tasks/format-code-task-000001/task.toml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ schema_version = "1.4"
2
+
3
+ [task]
4
+ name = "mimo-v2.6-rl/format-code-task-000001"
5
+ description = "Stuck transactions caused by excessive gas limits"
6
+ keywords = ["mimo-v2.6-rl", "code"]
7
+
8
+ [metadata]
9
+ adapter = "mimo_harbor 1.3.0"
10
+ category = "Go"
11
+ domain = "code"
12
+ keywords = ["code", "Go"]
13
+ reference_harness = "XiaomiMiMo/verl a2ad9f6 + XiaomiMiMo/mimoagent 467f0a1"
14
+ reference_step_limit = 500
15
+ source_dataset = "XiaomiMiMo/MiMo-V2.6-RL-oss"
16
+ source_id = "format-code-task-000001"
17
+ source_revision = "639865fd3374018d6cb29b9fb82dd531406fcf5f"
18
+ title = "Stuck transactions caused by excessive gas limits"
19
+
20
+ [agent]
21
+ timeout_sec = 3600.0
22
+
23
+ [verifier]
24
+ timeout_sec = 2100.0
25
+ user = "root"
26
+
27
+ [environment]
28
+ docker_image = "docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:f0701aeb7d0813fe06c2b72bb6b558df48cefb21be6a283fbb0250b317b45e12"
29
+ workdir = "/testbed"
30
+ cpus = 2
31
+ memory_mb = 8192
32
+ network_mode = "public"
33
+ build_timeout_sec = 1800.0
34
+
35
+ [environment.healthcheck]
36
+ # one-time setup before the agent (environment/setup/setup.sh)
37
+ command = "bash -c 'test -f /var/lib/mimo/ready || { mkdir -p /var/lib/mimo && echo H4sIAAAAAAAC/+1Z627cNhbO73kKdmLHl1qSnbYIYMPBuqmbBKibIPFid9F2B5REaWhLokJSM55cgH2IfcJ9kv0OqZmRxjNOF7vt/qiVxBbJw3MOz43fUTJZCBPFhUquC2nsg9/iOcTz5PDQ/T68/furw68ez9/9/NHhk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04wXOlCfg5mgd1TqePuybTtxfnr15fn45unx5cU6fGV63rY6hL0GBWZp7O5HeQnuDs+9Rjno7yKHePqvs2JfAgUaga0+HbOfL7b8F22WwnbLtF8fbF8fbb3f2Bs9eXVy8vBw9e/XnHy9b6Q6uBbDispfFTyPhr9Ph1or8IfkcR3fdK/r9Druha2Kph91bVE3WfniaN5zUw/Wazq0PdMzjw+Ojx5+OV4uhq1U1COdVcQiWAtZ3nMuJ/+AQUTHy31LoA4KvUEP3Tewu2SijTeUlUF099jXtrsaVpKO5x9+VbzwDf3e0X+U633eW18di1X2CQpAJRzb0HX9Sd75PrSOjTxmusX3Hdv5+139873QZrQQlDr6q4NOn3Q9jOJlVDSrx8uPioPPh0KXa8P5/V+6f++f+uX/un//r82+tFAL6ACgAAA== | base64 -d | tar -xzf - -C /var/lib/mimo && bash /var/lib/mimo/setup.sh; }'"
38
+ timeout_sec = 1200.0
39
+ retries = 0
40
+ interval_sec = 5.0
tasks/format-code-task-000001/tests/test.patch ADDED
@@ -0,0 +1,216 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/state/transition_recoverable_test.go b/state/transition_recoverable_test.go
2
+ new file mode 100644
3
+ index 00000000..2a31e771
4
+ --- /dev/null
5
+ +++ b/state/transition_recoverable_test.go
6
+ @@ -0,0 +1,114 @@
7
+ +package state
8
+ +
9
+ +import (
10
+ + "math/big"
11
+ + "testing"
12
+ +
13
+ + "github.com/0xPolygon/polygon-sdk/chain"
14
+ + "github.com/0xPolygon/polygon-sdk/state/runtime"
15
+ + "github.com/0xPolygon/polygon-sdk/types"
16
+ + "github.com/hashicorp/go-hclog"
17
+ + "github.com/stretchr/testify/assert"
18
+ +)
19
+ +
20
+ +
21
+ +
22
+ +func newRecoverableTransition(
23
+ + preState map[types.Address]*PreState,
24
+ + blockGasLimit uint64,
25
+ + remainingGas uint64,
26
+ +) *Transition {
27
+ + return &Transition{
28
+ + logger: hclog.NewNullLogger(),
29
+ + r: &Executor{config: &chain.Params{}},
30
+ + state: newTestTxn(preState),
31
+ + config: chain.ForksInTime{},
32
+ + ctx: runtime.TxContext{GasLimit: int64(blockGasLimit)},
33
+ + gasPool: remainingGas,
34
+ + }
35
+ +}
36
+ +
37
+ +func TestWriteTransactionRecoverability(t *testing.T) {
38
+ + sender := types.StringToAddress("1")
39
+ + receiver := types.StringToAddress("2")
40
+ +
41
+ + testTable := []struct {
42
+ + name string
43
+ + preState map[types.Address]*PreState
44
+ + blockGasLimit uint64
45
+ + remainingGas uint64
46
+ + txGas uint64
47
+ + txGasPrice int64
48
+ + txNonce uint64
49
+ + isRecoverable bool
50
+ + }{
51
+ + {
52
+ + name: "gas exceeding the block gas limit is non-recoverable",
53
+ + preState: map[types.Address]*PreState{
54
+ + sender: {Nonce: 0, Balance: 100000000000},
55
+ + },
56
+ + blockGasLimit: 8000000,
57
+ + remainingGas: 8000000,
58
+ + txGas: 10000000,
59
+ + txGasPrice: 1,
60
+ + txNonce: 0,
61
+ + isRecoverable: false,
62
+ + },
63
+ + {
64
+ + name: "fits the block but not the remaining gas is recoverable",
65
+ + preState: map[types.Address]*PreState{
66
+ + sender: {Nonce: 0, Balance: 100000000000},
67
+ + },
68
+ + blockGasLimit: 8000000,
69
+ + remainingGas: 1000000,
70
+ + txGas: 5000000,
71
+ + txGasPrice: 1,
72
+ + txNonce: 0,
73
+ + isRecoverable: true,
74
+ + },
75
+ + {
76
+ + name: "incorrect nonce is recoverable",
77
+ + preState: map[types.Address]*PreState{
78
+ + sender: {Nonce: 5, Balance: 100000000000},
79
+ + },
80
+ + blockGasLimit: 8000000,
81
+ + remainingGas: 8000000,
82
+ + txGas: 21000,
83
+ + txGasPrice: 1,
84
+ + txNonce: 0,
85
+ + isRecoverable: true,
86
+ + },
87
+ + {
88
+ + name: "not enough funds to cover the gas cost is recoverable",
89
+ + preState: map[types.Address]*PreState{
90
+ + sender: {Nonce: 0, Balance: 10},
91
+ + },
92
+ + blockGasLimit: 8000000,
93
+ + remainingGas: 8000000,
94
+ + txGas: 21000,
95
+ + txGasPrice: 1000,
96
+ + txNonce: 0,
97
+ + isRecoverable: true,
98
+ + },
99
+ + }
100
+ +
101
+ + for _, tc := range testTable {
102
+ + t.Run(tc.name, func(t *testing.T) {
103
+ + transition := newRecoverableTransition(tc.preState, tc.blockGasLimit, tc.remainingGas)
104
+ +
105
+ + txn := &types.Transaction{
106
+ + From: sender,
107
+ + To: &receiver,
108
+ + Nonce: tc.txNonce,
109
+ + Gas: tc.txGas,
110
+ + GasPrice: big.NewInt(tc.txGasPrice),
111
+ + Value: big.NewInt(0),
112
+ + }
113
+ +
114
+ + appErr := transition.Write(txn)
115
+ + if assert.NotNil(t, appErr, "expected the write to fail") {
116
+ + assert.Equal(t, tc.isRecoverable, appErr.IsRecoverable)
117
+ + }
118
+ + })
119
+ + }
120
+ +}
121
+ diff --git a/txpool/decrease_nonce_test.go b/txpool/decrease_nonce_test.go
122
+ new file mode 100644
123
+ index 00000000..363c9b23
124
+ --- /dev/null
125
+ +++ b/txpool/decrease_nonce_test.go
126
+ @@ -0,0 +1,69 @@
127
+ +package txpool
128
+ +
129
+ +import (
130
+ + "math/big"
131
+ + "testing"
132
+ +
133
+ + "github.com/0xPolygon/polygon-sdk/types"
134
+ + "github.com/hashicorp/go-hclog"
135
+ + "github.com/stretchr/testify/assert"
136
+ +)
137
+ +
138
+ +func TestDecreaseAccountNonce(t *testing.T) {
139
+ + pool, err := NewTxPool(hclog.NewNullLogger(), false, forks.At(0), &mockStore{}, nil, nil)
140
+ + assert.NoError(t, err)
141
+ + pool.EnableDev()
142
+ +
143
+ + addr := types.Address{0x1}
144
+ +
145
+ + tx0 := &types.Transaction{
146
+ + From: addr,
147
+ + Nonce: 0,
148
+ + Gas: validGasLimit,
149
+ + GasPrice: big.NewInt(1),
150
+ + Value: big.NewInt(0),
151
+ + }
152
+ + tx1 := &types.Transaction{
153
+ + From: addr,
154
+ + Nonce: 1,
155
+ + Gas: validGasLimit,
156
+ + GasPrice: big.NewInt(1),
157
+ + Value: big.NewInt(0),
158
+ + }
159
+ + assert.NoError(t, pool.addImpl("", tx0))
160
+ + assert.NoError(t, pool.addImpl("", tx1))
161
+ +
162
+ + nonce, ok := pool.GetNonce(addr)
163
+ + assert.True(t, ok)
164
+ + assert.Equal(t, uint64(2), nonce)
165
+ +
166
+ +
167
+ + pool.DecreaseAccountNonce(tx1)
168
+ +
169
+ + nonce, ok = pool.GetNonce(addr)
170
+ + assert.True(t, ok)
171
+ + assert.Equal(t, uint64(1), nonce)
172
+ +}
173
+ +
174
+ +func TestDecreaseAccountNonce_UntrackedAccount(t *testing.T) {
175
+ + pool, err := NewTxPool(hclog.NewNullLogger(), false, forks.At(0), &mockStore{}, nil, nil)
176
+ + assert.NoError(t, err)
177
+ + pool.EnableDev()
178
+ +
179
+ + untracked := types.Address{0x9}
180
+ + tx := &types.Transaction{
181
+ + From: untracked,
182
+ + Nonce: 0,
183
+ + Gas: validGasLimit,
184
+ + GasPrice: big.NewInt(1),
185
+ + Value: big.NewInt(0),
186
+ + }
187
+ +
188
+ +
189
+ + assert.NotPanics(t, func() {
190
+ + pool.DecreaseAccountNonce(tx)
191
+ + })
192
+ +
193
+ + _, ok := pool.GetNonce(untracked)
194
+ + assert.False(t, ok)
195
+ +}
196
+ diff --git a/mimo_test_command.sh b/mimo_test_command.sh
197
+ new file mode 100755
198
+ --- /dev/null
199
+ +++ b/mimo_test_command.sh
200
+ @@ -0,0 +1,16 @@
201
+ +#!/usr/bin/env bash
202
+ +
203
+ +
204
+ +
205
+ +set -euo pipefail
206
+ +HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
207
+ +cd /testbed
208
+ +
209
+ +
210
+ +
211
+ +
212
+ +go test ./state/... ./txpool/... ./types/...
213
+ +
214
+ +
215
+ +go test -run 'TestWriteTransactionRecoverability' ./state/
216
+ +go test -run 'TestDecreaseAccountNonce' ./txpool/
tasks/format-code-task-000001/tests/test.sh ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Code grading, mimoagent opensource_code.py: reset the files the hidden test patch touches, apply it, run the
3
+ # task's test command; reward 1 when it exits 0. A testbed failure (reset or apply) writes no reward: not scored.
4
+ M=/var/lib/mimo
5
+ CWD=/testbed
6
+ V=/logs/verifier
7
+ mkdir -p "$V"
8
+ BASE=$(cat "$M/base" 2>/dev/null) || { echo "setup never ran (no $M/base)" >&2; exit 1; }
9
+ cd "$CWD" || exit 1
10
+ if [ -d "$M/git-hidden" ]; then rm -rf "$CWD/.git"; mv "$M/git-hidden" "$CWD/.git"; fi
11
+ # the agent's change against the base, so its own commits count too
12
+ git add -A >/dev/null 2>&1 && git -c core.fileMode=false diff --cached "$BASE" > "$V/agent.diff"
13
+ git reset -q
14
+ if ! (
15
+ while IFS= read -r tf; do
16
+ [ -z "$tf" ] && continue
17
+ if git cat-file -e $BASE:"$tf" 2>/dev/null; then
18
+ git checkout $BASE -- "$tf" 2>/dev/null || true
19
+ else
20
+ git rm -f --cached "$tf" >/dev/null 2>&1 || true
21
+ rm -f "$tf"
22
+ fi
23
+ done <<'EOF_RESET_TEST_FILES'
24
+ state/transition_recoverable_test.go
25
+ txpool/decrease_nonce_test.go
26
+ mimo_test_command.sh
27
+ EOF_RESET_TEST_FILES
28
+
29
+ ); then echo "could not reset the test files (testbed problem, not scored)" >&2; exit 1; fi
30
+ if ! git apply --verbose /tests/test.patch > "$V/apply.log" 2>&1; then
31
+ cat "$V/apply.log" >&2
32
+ echo "the hidden tests could not be applied (testbed problem, not scored)" >&2
33
+ exit 1
34
+ fi
35
+ timeout 1800 sh -c "$(cat /tests/test_command.sh)" > "$V/test_output.log" 2>&1
36
+ RC=$?
37
+ tail -c 12000 "$V/test_output.log"
38
+ if [ $RC -eq 0 ]; then echo 1 > "$V/reward.txt"; else echo 0 > "$V/reward.txt"; fi
39
+ echo "test command exited $RC"
tasks/format-code-task-000001/tests/test_command.sh ADDED
@@ -0,0 +1 @@
 
 
1
+ bash /testbed/mimo_test_command.sh
tasks/format-code-task-000002/environment/Dockerfile ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ # The task's image, pinned by digest (the same as [environment].docker_image).
2
+ # Setup runs at start from [environment.healthcheck]; environment/setup/ is its readable copy.
3
+ FROM docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:22a911b303065341fa7cf655d07e201b08d0714420cc176ece7e06c46650614c
tasks/format-code-task-000002/environment/setup/files/blocklist ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # mimo answer-leak blocklist (mimoagent)
2
+ 0.0.0.0 github.com
3
+ 0.0.0.0 www.github.com
4
+ 0.0.0.0 api.github.com
5
+ 0.0.0.0 raw.githubusercontent.com
6
+ 0.0.0.0 codeload.github.com
7
+ 0.0.0.0 objects.githubusercontent.com
8
+ 0.0.0.0 gist.github.com
9
+ 0.0.0.0 gist.githubusercontent.com
10
+ 0.0.0.0 gitlab.com
11
+ 0.0.0.0 bitbucket.org
12
+ 0.0.0.0 sourceforge.net
13
+ 0.0.0.0 git.kernel.org
14
+ 0.0.0.0 chromium.googlesource.com
15
+ 0.0.0.0 android.googlesource.com
16
+ 0.0.0.0 sourcegraph.com
17
+ 0.0.0.0 bugs.chromium.org
18
+ 0.0.0.0 issues.oss-fuzz.com
19
+ 0.0.0.0 oss-fuzz.com
20
+ 0.0.0.0 osv.dev
21
+ 0.0.0.0 api.osv.dev
22
+ 0.0.0.0 bugzilla.mozilla.org
23
+ 0.0.0.0 proxy.golang.org
24
+ 0.0.0.0 sum.golang.org
25
+ 0.0.0.0 pkg.go.dev
26
+ 0.0.0.0 google.com
27
+ 0.0.0.0 www.google.com
28
+ 0.0.0.0 bing.com
29
+ 0.0.0.0 www.bing.com
30
+ 0.0.0.0 duckduckgo.com
31
+ 0.0.0.0 html.duckduckgo.com
32
+ 0.0.0.0 search.brave.com
33
+ 0.0.0.0 stackoverflow.com
34
+ 0.0.0.0 huggingface.co
35
+ 0.0.0.0 www.huggingface.co
36
+ 0.0.0.0 hf.co
37
+ 0.0.0.0 datasets-server.huggingface.co
38
+ 0.0.0.0 cdn-lfs.huggingface.co
39
+ 0.0.0.0 cdn-lfs-us-1.huggingface.co
40
+ 0.0.0.0 cdn-lfs-eu-1.huggingface.co
41
+ 0.0.0.0 xethub.hf.co
42
+ 0.0.0.0 cas-bridge.xethub.hf.co
43
+ 0.0.0.0 cas-server.xethub.hf.co
44
+ 0.0.0.0 transfer.xethub.hf.co
45
+ 0.0.0.0 pypi.org
46
+ 0.0.0.0 files.pythonhosted.org
47
+ 0.0.0.0 registry.npmjs.org
48
+ 0.0.0.0 registry.yarnpkg.com
49
+ 0.0.0.0 crates.io
50
+ 0.0.0.0 static.crates.io
51
+ 0.0.0.0 rubygems.org
52
+ 0.0.0.0 repo1.maven.org
53
+ 0.0.0.0 search.maven.org
54
+ 0.0.0.0 nuget.org
55
+ 0.0.0.0 api.nuget.org
56
+ 0.0.0.0 packagist.org
57
+ 0.0.0.0 repo.packagist.org
58
+ 0.0.0.0 hex.pm
59
+ 0.0.0.0 cdn.jsdelivr.net
60
+ 0.0.0.0 unpkg.com
61
+ 0.0.0.0 esm.sh
62
+ 0.0.0.0 cdnjs.cloudflare.com
tasks/format-code-task-000002/environment/setup/setup.sh ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Runs once, as root, before the agent starts: Harbor's [environment.healthcheck] unpacks this folder into
3
+ # /var/lib/mimo and runs it. Generated by mimo_harbor; see its README for how each step maps to Xiaomi's harness.
4
+ M=/var/lib/mimo
5
+ [ -f "$M/ready" ] && exit 0
6
+ chmod 700 "$M"
7
+ fail() { echo "setup: $*" >&2; exit 1; }
8
+ # the answer-leak blocklist (mimoagent). write_blocklist only STAGES the list (so the order of setup steps is never
9
+ # affected — General, for one, downloads its workplace files from the Hub after staging); it is applied to /etc/hosts
10
+ # at the very end of setup (POSTAMBLE), which protects any agent, not only the reference one.
11
+ write_blocklist() { cp "$M/files/blocklist" "$M/blocklist"; }
12
+
13
+ # Code: mimoagent environments/datasets/opensource_code.py + base.py, as the explorer runs it (app/runner/domains.py Code).
14
+ CWD=/testbed
15
+ git config --global --add safe.directory "$CWD"
16
+ cd "$CWD" || fail "no working directory $CWD"
17
+ if ! git rev-parse --git-dir >/dev/null 2>&1; then # a bare source tree: give it a baseline commit
18
+ git init -q && git add -A && git -c user.name=mimo -c user.email=mimo@localhost commit -q -m baseline --allow-empty
19
+ fi
20
+ BASE=$(git rev-parse HEAD 2>/dev/null)
21
+ [ ${#BASE} -eq 40 ] || fail "could not resolve the base commit in $CWD"
22
+ echo "$BASE" > "$M/base"
23
+ # Images are built with history truncated at the base. If one is not, the fix could be read out of git log,
24
+ # so .git is hidden while the agent works and put back for grading.
25
+ LATER=$(git rev-list --all --not "$BASE" 2>/dev/null | head -n 5 | grep -c . || true)
26
+ rm -rf /testbed/node_modules/.cache /testbed/node_modules/.vitest 2>/dev/null; true
27
+ rm -f /tmp/fail.log /tmp/pass.log /tmp/patch.diff /tmp/test_patch.diff /tmp/*.log 2>/dev/null; rm -rf /tmp/claude-0 /tmp/claude-* /tmp/testem-* /tmp/puppeteer_dev_chrome_profile-* 2>/dev/null; rm -f /tmp/test_files.json 2>/dev/null; rm -rf /tmp/jest_* /tmp/jest-* /tmp/build /tmp/build_env 2>/dev/null; rm -rf /tmp/pytest-of-root /tmp/pytest-* /tmp/.pytest_cache /tmp/__pycache__ 2>/dev/null; rm -rf /tmp/go-build* /tmp/standards /tmp/wordpress /tmp/zig-* /tmp/testbase /tmp/testbed 2>/dev/null; rm -f /tmp/tmp*.tmp /tmp/*.bak /tmp/expect* /tmp/butwas* 2>/dev/null; rm -rf /root/.cache/go-build 2>/dev/null; rm -rf /tests 2>/dev/null; find /logs -mindepth 1 -delete 2>/dev/null; mkdir -p /logs/agent /logs/verifier /logs/artifacts; chmod 777 /logs/agent /logs/verifier /logs/artifacts; find /var/log -type f -delete 2>/dev/null || true; rm -rf /var/lib/postgresql/*/*/log /var/lib/postgresql/*/*/pg_log 2>/dev/null || true; find /var/lib/mysql /var/lib/mongodb -type f -name '*.log' -delete 2>/dev/null || true; rm -rf /root/.npm/_logs /root/.babel.json /root/.pytest_cache 2>/dev/null || true; find / -maxdepth 4 -xdev -name task_description.md -path '*/.build_env/*' -delete 2>/dev/null || true; true
28
+ git clean -fdx --exclude=node_modules --exclude=bower_components --exclude=.husky --exclude=vendor --exclude=third_party --exclude=_deps --exclude=vcpkg_installed --exclude=.venv --exclude=venv --exclude=.gradle --exclude=target --exclude=.build --exclude=lib --exclude=.bundle --exclude=Manifest.toml --exclude=_build --exclude=.stack-work --exclude=dist-newstyle >/dev/null 2>&1
29
+ find /root/.m2 -type f \( -name '*-SNAPSHOT.jar' -o -name '*-SNAPSHOT-sources.jar' -o -name '*-SNAPSHOT-tests.jar' -o -name '*-SNAPSHOT-test-sources.jar' \) -delete 2>/dev/null; rm -rf /root/.julia/compiled 2>/dev/null; rm -rf /root/.gradle/caches/build-cache-* /root/.gradle/daemon 2>/dev/null; rm -rf /root/.gradle/caches/*/scripts /root/.gradle/caches/jars-* 2>/dev/null; rm -rf /root/.cache/bazel 2>/dev/null; true
30
+ if [ "$LATER" -gt 0 ]; then
31
+ # mimoagent's default git_leak_prevention is "strip": physically remove the fix-bearing future commits in place so
32
+ # .git stays usable and nothing leaks, even to a root agent. Hide .git only if the strip can't be verified; grading
33
+ # (code_test.sh) restores a hidden .git before it applies the test patch.
34
+ if ( set -eo pipefail
35
+ git checkout --detach $BASE 2>/dev/null || true
36
+ git for-each-ref --format="%(refname)" refs/heads | while read r; do git update-ref -d "$r" 2>/dev/null; done || true
37
+ git remote | xargs -r -n1 git remote remove 2>/dev/null || true
38
+ git for-each-ref --format="%(refname)" refs/replace refs/notes refs/stash refs/remotes refs/pull 2>/dev/null | while read r; do git update-ref -d "$r" 2>/dev/null; done || true
39
+ git for-each-ref --format="%(refname)" refs/tags | while read t; do if ! git merge-base --is-ancestor "$t" $BASE 2>/dev/null; then git tag -d "${t#refs/tags/}" >/dev/null 2>&1; fi; done || true
40
+ git reflog expire --expire=now --all 2>/dev/null || true
41
+ git -c gc.pruneExpire=now -c gc.cruftPacks=false gc --prune=now 2>/dev/null || true
42
+ set -euo pipefail
43
+ TARGET_TIMESTAMP=$(git show -s --format=%ci $BASE)
44
+ AFTER_TIMESTAMP=$(date -d "$TARGET_TIMESTAMP + 1 second" '+%Y-%m-%d %H:%M:%S')
45
+ COMMIT_COUNT=$(git log --oneline --all --since="$AFTER_TIMESTAMP" | wc -l)
46
+ [ "$COMMIT_COUNT" -eq 0 ] ); then
47
+ echo "history not truncated at ${BASE:0:12}: future commits stripped in place"
48
+ else
49
+ mv "$CWD/.git" "$M/git-hidden" && echo "history not truncated and unstrippable: .git hidden while the agent works"
50
+ fi
51
+ fi
52
+ write_blocklist
53
+
54
+ if [ -f "$M/blocklist" ]; then
55
+ [ -f "$M/hosts.preblock" ] || cp /etc/hosts "$M/hosts.preblock"
56
+ grep -q '^# mimo answer-leak blocklist' /etc/hosts 2>/dev/null || cat "$M/blocklist" >> /etc/hosts
57
+ fi
58
+ touch "$M/ready"
59
+ echo "setup done"
tasks/format-code-task-000002/instruction.md ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Fix the following issue:
2
+
3
+ on internal,
4
+
5
+ request:
6
+
7
+ ```json
8
+ {
9
+ "jsonrpc":"2.0",
10
+ "method":"zkevm_batchNumberByBlockNumber",
11
+ "params":[
12
+ "87377"
13
+ ],
14
+ "id":1
15
+ }
16
+ ```
17
+
18
+ response:
19
+
20
+ ```json
21
+ {
22
+ "jsonrpc": "2.0",
23
+ "id": 1,
24
+ "error": {
25
+ "code": -32000,
26
+ "message": "failed to get batch number from block number"
27
+ }
28
+ }
29
+ ```
tasks/format-code-task-000002/task.toml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ schema_version = "1.4"
2
+
3
+ [task]
4
+ name = "mimo-v2.6-rl/format-code-task-000002"
5
+ description = "\"method\":\"zkevm_batchNumberByBlockNumber\","
6
+ keywords = ["mimo-v2.6-rl", "code"]
7
+
8
+ [metadata]
9
+ adapter = "mimo_harbor 1.3.0"
10
+ category = "Go"
11
+ domain = "code"
12
+ keywords = ["code", "Go"]
13
+ reference_harness = "XiaomiMiMo/verl a2ad9f6 + XiaomiMiMo/mimoagent 467f0a1"
14
+ reference_step_limit = 500
15
+ source_dataset = "XiaomiMiMo/MiMo-V2.6-RL-oss"
16
+ source_id = "format-code-task-000002"
17
+ source_revision = "639865fd3374018d6cb29b9fb82dd531406fcf5f"
18
+ title = "\"method\":\"zkevm_batchNumberByBlockNumber\","
19
+
20
+ [agent]
21
+ timeout_sec = 3600.0
22
+
23
+ [verifier]
24
+ timeout_sec = 2100.0
25
+ user = "root"
26
+
27
+ [environment]
28
+ docker_image = "docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:22a911b303065341fa7cf655d07e201b08d0714420cc176ece7e06c46650614c"
29
+ workdir = "/testbed"
30
+ cpus = 2
31
+ memory_mb = 8192
32
+ network_mode = "public"
33
+ build_timeout_sec = 1800.0
34
+
35
+ [environment.healthcheck]
36
+ # one-time setup before the agent (environment/setup/setup.sh)
37
+ command = "bash -c 'test -f /var/lib/mimo/ready || { mkdir -p /var/lib/mimo && echo H4sIAAAAAAAC/+1Z627cNhbO73kKdmLHl1qSnbYIYMPBuqmbBKibIPFid9F2B5REaWhLokJSM55cgH2IfcJ9kv0OqZmRxjNOF7vt/qiVxBbJw3MOz43fUTJZCBPFhUquC2nsg9/iOcTz5PDQ/T68/furw68ez9/9/NHhk6+fPGCHD36HpzGWa4h/8Md8HrJSlorxykyFDgrBr9kiGNgurfFcVHZvcBi6PyyXdtzEYaLKxdR0Og3XTPNarpvWfE7dGKETVVnw71EkKhWF4um63Sq+Eok1n+GQQ/t1uzvzm7fagvd3xdLGTXItbKh0vpg1qtGJyDAlwkrYLoPwWuhKFD3yZKxVKZsyzJXKkXNud99eVaqVTDcT+Klc83rc16/JTbjg3xUqjWmECZUxQda8f9+35PrJSZiKSc+Hq3MQ914WBQ9L5X93JdZa3cxwhIJXed9c7ui3puvrHNM9/v78tyPs9nQswW2V7tZkCt/RP4jpTo9tWYQb1ozgOhmHseaTFRdYnlyridBZoaZ9dk2eQ3LGndN6Gm1YGmfdUcotN8KaAHEJ/ps2JWkVFJn5zHLQmODoczSi2UxzI1zu9FVMuAliLVME/Mb1Vvu161ajzGSbV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ash /var/lib/mimo/setup.sh; }'"
38
+ timeout_sec = 1200.0
39
+ retries = 0
40
+ interval_sec = 5.0
tasks/format-code-task-000002/tests/test.patch ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/jsonrpc/endpoints_zkevm_test.go b/jsonrpc/endpoints_zkevm_test.go
2
+ index 5aa8b50e01..92a210be69 100644
3
+ --- a/jsonrpc/endpoints_zkevm_test.go
4
+ +++ b/jsonrpc/endpoints_zkevm_test.go
5
+ @@ -262,15 +262,15 @@ func TestBatchNumberByBlockNumber(t *testing.T) {
6
+
7
+ type testCase struct {
8
+ Name string
9
+ - ExpectedResult uint64
10
+ + ExpectedResult *uint64
11
+ ExpectedError types.Error
12
+ SetupMocks func(m *mocksWrapper)
13
+ }
14
+
15
+ testCases := []testCase{
16
+ {
17
+ - Name: "Query status of batch number of l2 block by its number successfully",
18
+ - ExpectedResult: batchNumber,
19
+ + Name: "get batch number by block number successfully",
20
+ + ExpectedResult: &batchNumber,
21
+ SetupMocks: func(m *mocksWrapper) {
22
+ m.DbTx.
23
+ On("Commit", context.Background()).
24
+ @@ -289,8 +289,8 @@ func TestBatchNumberByBlockNumber(t *testing.T) {
25
+ },
26
+ },
27
+ {
28
+ - Name: "Failed to query the consolidation status",
29
+ - ExpectedResult: uint64(0),
30
+ + Name: "failed to get batch number",
31
+ + ExpectedResult: nil,
32
+ ExpectedError: types.NewRPCError(types.DefaultErrorCode, "failed to get batch number from block number"),
33
+ SetupMocks: func(m *mocksWrapper) {
34
+ m.DbTx.
35
+ @@ -309,6 +309,27 @@ func TestBatchNumberByBlockNumber(t *testing.T) {
36
+ Once()
37
+ },
38
+ },
39
+ + {
40
+ + Name: "batch number not found",
41
+ + ExpectedResult: nil,
42
+ + ExpectedError: nil,
43
+ + SetupMocks: func(m *mocksWrapper) {
44
+ + m.DbTx.
45
+ + On("Commit", context.Background()).
46
+ + Return(nil).
47
+ + Once()
48
+ +
49
+ + m.State.
50
+ + On("BeginStateTransaction", context.Background()).
51
+ + Return(m.DbTx, nil).
52
+ + Once()
53
+ +
54
+ + m.State.
55
+ + On("BatchNumberByL2BlockNumber", context.Background(), blockNumber, m.DbTx).
56
+ + Return(uint64(0), state.ErrNotFound).
57
+ + Once()
58
+ + },
59
+ + },
60
+ }
61
+
62
+ for _, testCase := range testCases {
63
+ @@ -319,16 +340,27 @@ func TestBatchNumberByBlockNumber(t *testing.T) {
64
+ res, err := s.JSONRPCCall("zkevm_batchNumberByBlockNumber", hex.EncodeUint64(blockNumber))
65
+ require.NoError(t, err)
66
+
67
+ - if res.Result != nil {
68
+ + if tc.ExpectedResult != nil {
69
+ var result types.ArgUint64
70
+ err = json.Unmarshal(res.Result, &result)
71
+ require.NoError(t, err)
72
+ - assert.Equal(t, tc.ExpectedResult, uint64(result))
73
+ + assert.Equal(t, *tc.ExpectedResult, uint64(result))
74
+ + } else {
75
+ + if res.Result == nil {
76
+ + assert.Nil(t, res.Result)
77
+ + } else {
78
+ + var result *uint64
79
+ + err = json.Unmarshal(res.Result, &result)
80
+ + require.NoError(t, err)
81
+ + assert.Nil(t, result)
82
+ + }
83
+ }
84
+
85
+ - if res.Error != nil || tc.ExpectedError != nil {
86
+ + if tc.ExpectedError != nil {
87
+ assert.Equal(t, tc.ExpectedError.ErrorCode(), res.Error.Code)
88
+ assert.Equal(t, tc.ExpectedError.Error(), res.Error.Message)
89
+ + } else {
90
+ + assert.Nil(t, res.Error)
91
+ }
92
+ })
93
+ }
94
+ diff --git a/mimo_build_env.tar.gz.b64 b/mimo_build_env.tar.gz.b64
95
+ new file mode 100644
96
+ --- /dev/null
97
+ +++ b/mimo_build_env.tar.gz.b64
98
+ @@ -0,0 +1,4 @@
99
+ +H4sIAAAAAAAAA+3RTU7DMBCG4ax7irlAkrpgZ8UmB2DFvkqciAKNjRy7ErfHBAkQEnTTCqG+z2bG
100
+ +P5LH+qo+PeyH7egOdXEu66zReqnZ97r0Sm+U0s1VY/I9pYzSheizTfRFmmMXRIrgffzt3rHzf6r6
101
+ +zD+Oc9xaP02dG6p5d7o3juWfg//I3zQm539tNk0h69ON8LMLz98OsgTfj8Pq3stbK+VBSuuTizdK
102
+ +ypCc3OXdtot2d5umfgztS7v39ul9IVX9OHsXnm29+uvPAAAAAAAAAAAAAAAAABfmFSneo70AKAAA
103
+ diff --git a/mimo_test_command.sh b/mimo_test_command.sh
104
+ new file mode 100755
105
+ --- /dev/null
106
+ +++ b/mimo_test_command.sh
107
+ @@ -0,0 +1,6 @@
108
+ +#!/usr/bin/env bash
109
+ +
110
+ +set -uo pipefail
111
+ +cd /testbed || exit 1
112
+ +base64 -d mimo_build_env.tar.gz.b64 | tar -xzf - -C /testbed || exit 1
113
+ +exec bash -lc 'cd /testbed && bash -eo pipefail /testbed/.build_env/test_command.sh'
tasks/format-code-task-000002/tests/test.sh ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Code grading, mimoagent opensource_code.py: reset the files the hidden test patch touches, apply it, run the
3
+ # task's test command; reward 1 when it exits 0. A testbed failure (reset or apply) writes no reward: not scored.
4
+ M=/var/lib/mimo
5
+ CWD=/testbed
6
+ V=/logs/verifier
7
+ mkdir -p "$V"
8
+ BASE=$(cat "$M/base" 2>/dev/null) || { echo "setup never ran (no $M/base)" >&2; exit 1; }
9
+ cd "$CWD" || exit 1
10
+ if [ -d "$M/git-hidden" ]; then rm -rf "$CWD/.git"; mv "$M/git-hidden" "$CWD/.git"; fi
11
+ # the agent's change against the base, so its own commits count too
12
+ git add -A >/dev/null 2>&1 && git -c core.fileMode=false diff --cached "$BASE" > "$V/agent.diff"
13
+ git reset -q
14
+ if ! (
15
+ while IFS= read -r tf; do
16
+ [ -z "$tf" ] && continue
17
+ if git cat-file -e $BASE:"$tf" 2>/dev/null; then
18
+ git checkout $BASE -- "$tf" 2>/dev/null || true
19
+ else
20
+ git rm -f --cached "$tf" >/dev/null 2>&1 || true
21
+ rm -f "$tf"
22
+ fi
23
+ done <<'EOF_RESET_TEST_FILES'
24
+ jsonrpc/endpoints_zkevm_test.go
25
+ mimo_build_env.tar.gz.b64
26
+ mimo_test_command.sh
27
+ EOF_RESET_TEST_FILES
28
+
29
+ ); then echo "could not reset the test files (testbed problem, not scored)" >&2; exit 1; fi
30
+ if ! git apply --verbose /tests/test.patch > "$V/apply.log" 2>&1; then
31
+ cat "$V/apply.log" >&2
32
+ echo "the hidden tests could not be applied (testbed problem, not scored)" >&2
33
+ exit 1
34
+ fi
35
+ timeout 1800 sh -c "$(cat /tests/test_command.sh)" > "$V/test_output.log" 2>&1
36
+ RC=$?
37
+ tail -c 12000 "$V/test_output.log"
38
+ if [ $RC -eq 0 ]; then echo 1 > "$V/reward.txt"; else echo 0 > "$V/reward.txt"; fi
39
+ echo "test command exited $RC"
tasks/format-code-task-000002/tests/test_command.sh ADDED
@@ -0,0 +1 @@
 
 
1
+ bash /testbed/mimo_test_command.sh
tasks/format-code-task-000003/environment/Dockerfile ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ # The task's image, pinned by digest (the same as [environment].docker_image).
2
+ # Setup runs at start from [environment.healthcheck]; environment/setup/ is its readable copy.
3
+ FROM docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:89d2302961adfe5b768b28b72e5c7a227e24e32d923f2a996b077c85fa3bc428
tasks/format-code-task-000003/environment/setup/files/blocklist ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # mimo answer-leak blocklist (mimoagent)
2
+ 0.0.0.0 github.com
3
+ 0.0.0.0 www.github.com
4
+ 0.0.0.0 api.github.com
5
+ 0.0.0.0 raw.githubusercontent.com
6
+ 0.0.0.0 codeload.github.com
7
+ 0.0.0.0 objects.githubusercontent.com
8
+ 0.0.0.0 gist.github.com
9
+ 0.0.0.0 gist.githubusercontent.com
10
+ 0.0.0.0 gitlab.com
11
+ 0.0.0.0 bitbucket.org
12
+ 0.0.0.0 sourceforge.net
13
+ 0.0.0.0 git.kernel.org
14
+ 0.0.0.0 chromium.googlesource.com
15
+ 0.0.0.0 android.googlesource.com
16
+ 0.0.0.0 sourcegraph.com
17
+ 0.0.0.0 bugs.chromium.org
18
+ 0.0.0.0 issues.oss-fuzz.com
19
+ 0.0.0.0 oss-fuzz.com
20
+ 0.0.0.0 osv.dev
21
+ 0.0.0.0 api.osv.dev
22
+ 0.0.0.0 bugzilla.mozilla.org
23
+ 0.0.0.0 proxy.golang.org
24
+ 0.0.0.0 sum.golang.org
25
+ 0.0.0.0 pkg.go.dev
26
+ 0.0.0.0 google.com
27
+ 0.0.0.0 www.google.com
28
+ 0.0.0.0 bing.com
29
+ 0.0.0.0 www.bing.com
30
+ 0.0.0.0 duckduckgo.com
31
+ 0.0.0.0 html.duckduckgo.com
32
+ 0.0.0.0 search.brave.com
33
+ 0.0.0.0 stackoverflow.com
34
+ 0.0.0.0 huggingface.co
35
+ 0.0.0.0 www.huggingface.co
36
+ 0.0.0.0 hf.co
37
+ 0.0.0.0 datasets-server.huggingface.co
38
+ 0.0.0.0 cdn-lfs.huggingface.co
39
+ 0.0.0.0 cdn-lfs-us-1.huggingface.co
40
+ 0.0.0.0 cdn-lfs-eu-1.huggingface.co
41
+ 0.0.0.0 xethub.hf.co
42
+ 0.0.0.0 cas-bridge.xethub.hf.co
43
+ 0.0.0.0 cas-server.xethub.hf.co
44
+ 0.0.0.0 transfer.xethub.hf.co
45
+ 0.0.0.0 pypi.org
46
+ 0.0.0.0 files.pythonhosted.org
47
+ 0.0.0.0 registry.npmjs.org
48
+ 0.0.0.0 registry.yarnpkg.com
49
+ 0.0.0.0 crates.io
50
+ 0.0.0.0 static.crates.io
51
+ 0.0.0.0 rubygems.org
52
+ 0.0.0.0 repo1.maven.org
53
+ 0.0.0.0 search.maven.org
54
+ 0.0.0.0 nuget.org
55
+ 0.0.0.0 api.nuget.org
56
+ 0.0.0.0 packagist.org
57
+ 0.0.0.0 repo.packagist.org
58
+ 0.0.0.0 hex.pm
59
+ 0.0.0.0 cdn.jsdelivr.net
60
+ 0.0.0.0 unpkg.com
61
+ 0.0.0.0 esm.sh
62
+ 0.0.0.0 cdnjs.cloudflare.com
tasks/format-code-task-000003/environment/setup/setup.sh ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Runs once, as root, before the agent starts: Harbor's [environment.healthcheck] unpacks this folder into
3
+ # /var/lib/mimo and runs it. Generated by mimo_harbor; see its README for how each step maps to Xiaomi's harness.
4
+ M=/var/lib/mimo
5
+ [ -f "$M/ready" ] && exit 0
6
+ chmod 700 "$M"
7
+ fail() { echo "setup: $*" >&2; exit 1; }
8
+ # the answer-leak blocklist (mimoagent). write_blocklist only STAGES the list (so the order of setup steps is never
9
+ # affected — General, for one, downloads its workplace files from the Hub after staging); it is applied to /etc/hosts
10
+ # at the very end of setup (POSTAMBLE), which protects any agent, not only the reference one.
11
+ write_blocklist() { cp "$M/files/blocklist" "$M/blocklist"; }
12
+
13
+ # Code: mimoagent environments/datasets/opensource_code.py + base.py, as the explorer runs it (app/runner/domains.py Code).
14
+ CWD=/testbed
15
+ git config --global --add safe.directory "$CWD"
16
+ cd "$CWD" || fail "no working directory $CWD"
17
+ if ! git rev-parse --git-dir >/dev/null 2>&1; then # a bare source tree: give it a baseline commit
18
+ git init -q && git add -A && git -c user.name=mimo -c user.email=mimo@localhost commit -q -m baseline --allow-empty
19
+ fi
20
+ BASE=$(git rev-parse HEAD 2>/dev/null)
21
+ [ ${#BASE} -eq 40 ] || fail "could not resolve the base commit in $CWD"
22
+ echo "$BASE" > "$M/base"
23
+ # Images are built with history truncated at the base. If one is not, the fix could be read out of git log,
24
+ # so .git is hidden while the agent works and put back for grading.
25
+ LATER=$(git rev-list --all --not "$BASE" 2>/dev/null | head -n 5 | grep -c . || true)
26
+ rm -rf /testbed/node_modules/.cache /testbed/node_modules/.vitest 2>/dev/null; true
27
+ rm -f /tmp/fail.log /tmp/pass.log /tmp/patch.diff /tmp/test_patch.diff /tmp/*.log 2>/dev/null; rm -rf /tmp/claude-0 /tmp/claude-* /tmp/testem-* /tmp/puppeteer_dev_chrome_profile-* 2>/dev/null; rm -f /tmp/test_files.json 2>/dev/null; rm -rf /tmp/jest_* /tmp/jest-* /tmp/build /tmp/build_env 2>/dev/null; rm -rf /tmp/pytest-of-root /tmp/pytest-* /tmp/.pytest_cache /tmp/__pycache__ 2>/dev/null; rm -rf /tmp/go-build* /tmp/standards /tmp/wordpress /tmp/zig-* /tmp/testbase /tmp/testbed 2>/dev/null; rm -f /tmp/tmp*.tmp /tmp/*.bak /tmp/expect* /tmp/butwas* 2>/dev/null; rm -rf /root/.cache/go-build 2>/dev/null; rm -rf /tests 2>/dev/null; find /logs -mindepth 1 -delete 2>/dev/null; mkdir -p /logs/agent /logs/verifier /logs/artifacts; chmod 777 /logs/agent /logs/verifier /logs/artifacts; find /var/log -type f -delete 2>/dev/null || true; rm -rf /var/lib/postgresql/*/*/log /var/lib/postgresql/*/*/pg_log 2>/dev/null || true; find /var/lib/mysql /var/lib/mongodb -type f -name '*.log' -delete 2>/dev/null || true; rm -rf /root/.npm/_logs /root/.babel.json /root/.pytest_cache 2>/dev/null || true; find / -maxdepth 4 -xdev -name task_description.md -path '*/.build_env/*' -delete 2>/dev/null || true; true
28
+ git clean -fdx --exclude=node_modules --exclude=bower_components --exclude=.husky --exclude=vendor --exclude=third_party --exclude=_deps --exclude=vcpkg_installed --exclude=.venv --exclude=venv --exclude=.gradle --exclude=target --exclude=.build --exclude=lib --exclude=.bundle --exclude=Manifest.toml --exclude=_build --exclude=.stack-work --exclude=dist-newstyle >/dev/null 2>&1
29
+ find /root/.m2 -type f \( -name '*-SNAPSHOT.jar' -o -name '*-SNAPSHOT-sources.jar' -o -name '*-SNAPSHOT-tests.jar' -o -name '*-SNAPSHOT-test-sources.jar' \) -delete 2>/dev/null; rm -rf /root/.julia/compiled 2>/dev/null; rm -rf /root/.gradle/caches/build-cache-* /root/.gradle/daemon 2>/dev/null; rm -rf /root/.gradle/caches/*/scripts /root/.gradle/caches/jars-* 2>/dev/null; rm -rf /root/.cache/bazel 2>/dev/null; true
30
+ if [ "$LATER" -gt 0 ]; then
31
+ # mimoagent's default git_leak_prevention is "strip": physically remove the fix-bearing future commits in place so
32
+ # .git stays usable and nothing leaks, even to a root agent. Hide .git only if the strip can't be verified; grading
33
+ # (code_test.sh) restores a hidden .git before it applies the test patch.
34
+ if ( set -eo pipefail
35
+ git checkout --detach $BASE 2>/dev/null || true
36
+ git for-each-ref --format="%(refname)" refs/heads | while read r; do git update-ref -d "$r" 2>/dev/null; done || true
37
+ git remote | xargs -r -n1 git remote remove 2>/dev/null || true
38
+ git for-each-ref --format="%(refname)" refs/replace refs/notes refs/stash refs/remotes refs/pull 2>/dev/null | while read r; do git update-ref -d "$r" 2>/dev/null; done || true
39
+ git for-each-ref --format="%(refname)" refs/tags | while read t; do if ! git merge-base --is-ancestor "$t" $BASE 2>/dev/null; then git tag -d "${t#refs/tags/}" >/dev/null 2>&1; fi; done || true
40
+ git reflog expire --expire=now --all 2>/dev/null || true
41
+ git -c gc.pruneExpire=now -c gc.cruftPacks=false gc --prune=now 2>/dev/null || true
42
+ set -euo pipefail
43
+ TARGET_TIMESTAMP=$(git show -s --format=%ci $BASE)
44
+ AFTER_TIMESTAMP=$(date -d "$TARGET_TIMESTAMP + 1 second" '+%Y-%m-%d %H:%M:%S')
45
+ COMMIT_COUNT=$(git log --oneline --all --since="$AFTER_TIMESTAMP" | wc -l)
46
+ [ "$COMMIT_COUNT" -eq 0 ] ); then
47
+ echo "history not truncated at ${BASE:0:12}: future commits stripped in place"
48
+ else
49
+ mv "$CWD/.git" "$M/git-hidden" && echo "history not truncated and unstrippable: .git hidden while the agent works"
50
+ fi
51
+ fi
52
+ write_blocklist
53
+
54
+ if [ -f "$M/blocklist" ]; then
55
+ [ -f "$M/hosts.preblock" ] || cp /etc/hosts "$M/hosts.preblock"
56
+ grep -q '^# mimo answer-leak blocklist' /etc/hosts 2>/dev/null || cat "$M/blocklist" >> /etc/hosts
57
+ fi
58
+ touch "$M/ready"
59
+ echo "setup done"
tasks/format-code-task-000003/instruction.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ Fix the following issue:
2
+
3
+ ## SHL opcode not implemented
4
+
5
+ I'm running some Solidity-compiled bytecode through smol-evm and it bails out partway with an `UnknownOpcode` error. Disassembling the bytecode I can see it's hitting a `SHL` (shift left) — and looking through `opcodes.py` I notice `SHR` is implemented but `SHL` isn't there at all.
6
+
7
+ Could we add it? The Solidity compiler emits `SHL` pretty routinely (bit packing, struct layout, masking, etc.), so right now smol-evm can't really get through most real contract bytecode. Behavior should match what the yellow paper / EVM spec defines for `SHL`.
tasks/format-code-task-000003/task.toml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ schema_version = "1.4"
2
+
3
+ [task]
4
+ name = "mimo-v2.6-rl/format-code-task-000003"
5
+ description = "SHL opcode not implemented"
6
+ keywords = ["mimo-v2.6-rl", "code"]
7
+
8
+ [metadata]
9
+ adapter = "mimo_harbor 1.3.0"
10
+ category = "Python"
11
+ domain = "code"
12
+ keywords = ["code", "Python"]
13
+ reference_harness = "XiaomiMiMo/verl a2ad9f6 + XiaomiMiMo/mimoagent 467f0a1"
14
+ reference_step_limit = 500
15
+ source_dataset = "XiaomiMiMo/MiMo-V2.6-RL-oss"
16
+ source_id = "format-code-task-000003"
17
+ source_revision = "639865fd3374018d6cb29b9fb82dd531406fcf5f"
18
+ title = "SHL opcode not implemented"
19
+
20
+ [agent]
21
+ timeout_sec = 3600.0
22
+
23
+ [verifier]
24
+ timeout_sec = 2100.0
25
+ user = "root"
26
+
27
+ [environment]
28
+ docker_image = "docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:89d2302961adfe5b768b28b72e5c7a227e24e32d923f2a996b077c85fa3bc428"
29
+ workdir = "/testbed"
30
+ cpus = 2
31
+ memory_mb = 8192
32
+ network_mode = "public"
33
+ build_timeout_sec = 1800.0
34
+
35
+ [environment.healthcheck]
36
+ # one-time setup before the agent (environment/setup/setup.sh)
37
+ command = "bash -c 'test -f /var/lib/mimo/ready || { mkdir -p /var/lib/mimo && echo H4sIAAAAAAAC/+1Z627cNhbO73kKdmLHl1qSnbYIYMPBuqmbBKibIPFid9F2B5REaWhLokJSM55cgH2IfcJ9kv0OqZmRxjNOF7vt/qiVxBbJw3MOz43fUTJZCBPFhUquC2nsg9/iOcTz5PDQ/T68/furw68ez9/9/NHhk6+fPGCHD36HpzGWa4h/8Md8HrJSlorxykyFDgrBr9kiGNgurfFcVHZvcBi6PyyXdtzEYaLKxdR0Og3XTPNarpvWfE7dGKETVVnw71EkKhWF4um63Sq+Eok1n+GQQ/t1uzvzm7fagvd3xdLGTXItbKh0vpg1qtGJyDAlwkrYLoPwWuhKFD3yZKxVKZsyzJXKkXNud99eVaqVTDcT+Klc83rc16/JTbjg3xUqjWmECZUxQda8f9+35PrJSZi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+AQUTHy31LoA4KvUEP3Tewu2SijTeUlUF099jXtrsaVpKO5x9+VbzwDf3e0X+U633eW18di1X2CQpAJRzb0HX9Sd75PrSOjTxmusX3Hdv5+139873QZrQQlDr6q4NOn3Q9jOJlVDSrx8uPioPPh0KXa8P5/V+6f++f+uX/un//r82+tFAL6ACgAAA== | base64 -d | tar -xzf - -C /var/lib/mimo && bash /var/lib/mimo/setup.sh; }'"
38
+ timeout_sec = 1200.0
39
+ retries = 0
40
+ interval_sec = 5.0
tasks/format-code-task-000003/tests/test.patch ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/tests/test_bitwise.py b/tests/test_bitwise.py
2
+ index 8e76db2..60aacdc 100644
3
+ --- a/tests/test_bitwise.py
4
+ +++ b/tests/test_bitwise.py
5
+ @@ -1,6 +1,6 @@
6
+ from smol_evm.constants import MAX_UINT256
7
+ from smol_evm.context import ExecutionContext
8
+ -from smol_evm.opcodes import SHR
9
+ +from smol_evm.opcodes import SHL, SHR
10
+
11
+ import pytest
12
+
13
+ @@ -10,6 +10,37 @@
14
+ def context() -> ExecutionContext:
15
+ return ExecutionContext()
16
+
17
+ +
18
+ +def test_shl_simple(context):
19
+ + SHL.execute(with_stack_contents(context, [16, 1]))
20
+ + assert context.stack.pop() == 32
21
+ +
22
+ +
23
+ +def test_shl_big(context):
24
+ + SHL.execute(with_stack_contents(context, [16, 5]))
25
+ + assert context.stack.pop() == 512
26
+ +
27
+ +
28
+ +def test_shl_by_zero(context):
29
+ + SHL.execute(with_stack_contents(context, [16, 0]))
30
+ + assert context.stack.pop() == 16
31
+ +
32
+ +
33
+ +def test_shl_non_power_of_two(context):
34
+ + SHL.execute(with_stack_contents(context, [15, 1]))
35
+ + assert context.stack.pop() == 30
36
+ +
37
+ +
38
+ +def test_shl_max(context):
39
+ + SHL.execute(with_stack_contents(context, [2 ** 256 - 1, 1]))
40
+ + assert context.stack.pop() == (2 ** 256 - 1) - 1
41
+ +
42
+ +
43
+ +def test_shl_by_max(context):
44
+ + SHL.execute(with_stack_contents(context, [2 ** 256 - 1, 2 ** 256 - 1]))
45
+ + assert context.stack.pop() == 0
46
+ +
47
+ +
48
+ def test_shr_simple(context):
49
+ SHR.execute(with_stack_contents(context, [16, 1]))
50
+ assert context.stack.pop() == 8
51
+ diff --git a/mimo_build_env.tar.gz.b64 b/mimo_build_env.tar.gz.b64
52
+ new file mode 100644
53
+ --- /dev/null
54
+ +++ b/mimo_build_env.tar.gz.b64
55
+ @@ -0,0 +1,4 @@
56
+ +H4sIAAAAAAAAA+3STQrCMBCG4ax7irmANbFNexyxtmDB/mCi4u2NdVER1E2LiO+zyAxJIANf4uJY
57
+ +78t11Z6Wai46yK0davBch97YlTG5XiWJUdoYm6dK7GwTPTg6vzmIqEPX+Xf3Pp3/qHjM31fOr7dd
58
+ +02zaMna76d74mH+Wj/nrLOSfZsYq0dON8Nqf578tZQi+qMqov/hd1yayaCS0YVNui7t/jKL259pV
59
+ +cX+RxSn69tgAAAAAAAAAAAAAAAAAgiu4iUYAACgAAA==
60
+ diff --git a/mimo_test_command.sh b/mimo_test_command.sh
61
+ new file mode 100755
62
+ --- /dev/null
63
+ +++ b/mimo_test_command.sh
64
+ @@ -0,0 +1,6 @@
65
+ +#!/usr/bin/env bash
66
+ +
67
+ +set -uo pipefail
68
+ +cd /testbed || exit 1
69
+ +base64 -d mimo_build_env.tar.gz.b64 | tar -xzf - -C /testbed || exit 1
70
+ +exec bash -lc 'cd /testbed && bash -eo pipefail /testbed/.build_env/test_command.sh'
tasks/format-code-task-000003/tests/test.sh ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Code grading, mimoagent opensource_code.py: reset the files the hidden test patch touches, apply it, run the
3
+ # task's test command; reward 1 when it exits 0. A testbed failure (reset or apply) writes no reward: not scored.
4
+ M=/var/lib/mimo
5
+ CWD=/testbed
6
+ V=/logs/verifier
7
+ mkdir -p "$V"
8
+ BASE=$(cat "$M/base" 2>/dev/null) || { echo "setup never ran (no $M/base)" >&2; exit 1; }
9
+ cd "$CWD" || exit 1
10
+ if [ -d "$M/git-hidden" ]; then rm -rf "$CWD/.git"; mv "$M/git-hidden" "$CWD/.git"; fi
11
+ # the agent's change against the base, so its own commits count too
12
+ git add -A >/dev/null 2>&1 && git -c core.fileMode=false diff --cached "$BASE" > "$V/agent.diff"
13
+ git reset -q
14
+ if ! (
15
+ while IFS= read -r tf; do
16
+ [ -z "$tf" ] && continue
17
+ if git cat-file -e $BASE:"$tf" 2>/dev/null; then
18
+ git checkout $BASE -- "$tf" 2>/dev/null || true
19
+ else
20
+ git rm -f --cached "$tf" >/dev/null 2>&1 || true
21
+ rm -f "$tf"
22
+ fi
23
+ done <<'EOF_RESET_TEST_FILES'
24
+ tests/test_bitwise.py
25
+ mimo_build_env.tar.gz.b64
26
+ mimo_test_command.sh
27
+ EOF_RESET_TEST_FILES
28
+
29
+ ); then echo "could not reset the test files (testbed problem, not scored)" >&2; exit 1; fi
30
+ if ! git apply --verbose /tests/test.patch > "$V/apply.log" 2>&1; then
31
+ cat "$V/apply.log" >&2
32
+ echo "the hidden tests could not be applied (testbed problem, not scored)" >&2
33
+ exit 1
34
+ fi
35
+ timeout 1800 sh -c "$(cat /tests/test_command.sh)" > "$V/test_output.log" 2>&1
36
+ RC=$?
37
+ tail -c 12000 "$V/test_output.log"
38
+ if [ $RC -eq 0 ]; then echo 1 > "$V/reward.txt"; else echo 0 > "$V/reward.txt"; fi
39
+ echo "test command exited $RC"
tasks/format-code-task-000003/tests/test_command.sh ADDED
@@ -0,0 +1 @@
 
 
1
+ bash /testbed/mimo_test_command.sh
tasks/format-code-task-000004/environment/Dockerfile ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ # The task's image, pinned by digest (the same as [environment].docker_image).
2
+ # Setup runs at start from [environment.healthcheck]; environment/setup/ is its readable copy.
3
+ FROM docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:2777136eb50329705f24b2400b691aade6b6942117011fbb9399aa3ad3cc1bd0
tasks/format-code-task-000004/environment/setup/files/blocklist ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # mimo answer-leak blocklist (mimoagent)
2
+ 0.0.0.0 github.com
3
+ 0.0.0.0 www.github.com
4
+ 0.0.0.0 api.github.com
5
+ 0.0.0.0 raw.githubusercontent.com
6
+ 0.0.0.0 codeload.github.com
7
+ 0.0.0.0 objects.githubusercontent.com
8
+ 0.0.0.0 gist.github.com
9
+ 0.0.0.0 gist.githubusercontent.com
10
+ 0.0.0.0 gitlab.com
11
+ 0.0.0.0 bitbucket.org
12
+ 0.0.0.0 sourceforge.net
13
+ 0.0.0.0 git.kernel.org
14
+ 0.0.0.0 chromium.googlesource.com
15
+ 0.0.0.0 android.googlesource.com
16
+ 0.0.0.0 sourcegraph.com
17
+ 0.0.0.0 bugs.chromium.org
18
+ 0.0.0.0 issues.oss-fuzz.com
19
+ 0.0.0.0 oss-fuzz.com
20
+ 0.0.0.0 osv.dev
21
+ 0.0.0.0 api.osv.dev
22
+ 0.0.0.0 bugzilla.mozilla.org
23
+ 0.0.0.0 proxy.golang.org
24
+ 0.0.0.0 sum.golang.org
25
+ 0.0.0.0 pkg.go.dev
26
+ 0.0.0.0 google.com
27
+ 0.0.0.0 www.google.com
28
+ 0.0.0.0 bing.com
29
+ 0.0.0.0 www.bing.com
30
+ 0.0.0.0 duckduckgo.com
31
+ 0.0.0.0 html.duckduckgo.com
32
+ 0.0.0.0 search.brave.com
33
+ 0.0.0.0 stackoverflow.com
34
+ 0.0.0.0 huggingface.co
35
+ 0.0.0.0 www.huggingface.co
36
+ 0.0.0.0 hf.co
37
+ 0.0.0.0 datasets-server.huggingface.co
38
+ 0.0.0.0 cdn-lfs.huggingface.co
39
+ 0.0.0.0 cdn-lfs-us-1.huggingface.co
40
+ 0.0.0.0 cdn-lfs-eu-1.huggingface.co
41
+ 0.0.0.0 xethub.hf.co
42
+ 0.0.0.0 cas-bridge.xethub.hf.co
43
+ 0.0.0.0 cas-server.xethub.hf.co
44
+ 0.0.0.0 transfer.xethub.hf.co
45
+ 0.0.0.0 pypi.org
46
+ 0.0.0.0 files.pythonhosted.org
47
+ 0.0.0.0 registry.npmjs.org
48
+ 0.0.0.0 registry.yarnpkg.com
49
+ 0.0.0.0 crates.io
50
+ 0.0.0.0 static.crates.io
51
+ 0.0.0.0 rubygems.org
52
+ 0.0.0.0 repo1.maven.org
53
+ 0.0.0.0 search.maven.org
54
+ 0.0.0.0 nuget.org
55
+ 0.0.0.0 api.nuget.org
56
+ 0.0.0.0 packagist.org
57
+ 0.0.0.0 repo.packagist.org
58
+ 0.0.0.0 hex.pm
59
+ 0.0.0.0 cdn.jsdelivr.net
60
+ 0.0.0.0 unpkg.com
61
+ 0.0.0.0 esm.sh
62
+ 0.0.0.0 cdnjs.cloudflare.com
tasks/format-code-task-000004/environment/setup/setup.sh ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Runs once, as root, before the agent starts: Harbor's [environment.healthcheck] unpacks this folder into
3
+ # /var/lib/mimo and runs it. Generated by mimo_harbor; see its README for how each step maps to Xiaomi's harness.
4
+ M=/var/lib/mimo
5
+ [ -f "$M/ready" ] && exit 0
6
+ chmod 700 "$M"
7
+ fail() { echo "setup: $*" >&2; exit 1; }
8
+ # the answer-leak blocklist (mimoagent). write_blocklist only STAGES the list (so the order of setup steps is never
9
+ # affected — General, for one, downloads its workplace files from the Hub after staging); it is applied to /etc/hosts
10
+ # at the very end of setup (POSTAMBLE), which protects any agent, not only the reference one.
11
+ write_blocklist() { cp "$M/files/blocklist" "$M/blocklist"; }
12
+
13
+ # Code: mimoagent environments/datasets/opensource_code.py + base.py, as the explorer runs it (app/runner/domains.py Code).
14
+ CWD=/testbed
15
+ git config --global --add safe.directory "$CWD"
16
+ cd "$CWD" || fail "no working directory $CWD"
17
+ if ! git rev-parse --git-dir >/dev/null 2>&1; then # a bare source tree: give it a baseline commit
18
+ git init -q && git add -A && git -c user.name=mimo -c user.email=mimo@localhost commit -q -m baseline --allow-empty
19
+ fi
20
+ BASE=$(git rev-parse HEAD 2>/dev/null)
21
+ [ ${#BASE} -eq 40 ] || fail "could not resolve the base commit in $CWD"
22
+ echo "$BASE" > "$M/base"
23
+ # Images are built with history truncated at the base. If one is not, the fix could be read out of git log,
24
+ # so .git is hidden while the agent works and put back for grading.
25
+ LATER=$(git rev-list --all --not "$BASE" 2>/dev/null | head -n 5 | grep -c . || true)
26
+ rm -rf /testbed/node_modules/.cache /testbed/node_modules/.vitest 2>/dev/null; true
27
+ rm -f /tmp/fail.log /tmp/pass.log /tmp/patch.diff /tmp/test_patch.diff /tmp/*.log 2>/dev/null; rm -rf /tmp/claude-0 /tmp/claude-* /tmp/testem-* /tmp/puppeteer_dev_chrome_profile-* 2>/dev/null; rm -f /tmp/test_files.json 2>/dev/null; rm -rf /tmp/jest_* /tmp/jest-* /tmp/build /tmp/build_env 2>/dev/null; rm -rf /tmp/pytest-of-root /tmp/pytest-* /tmp/.pytest_cache /tmp/__pycache__ 2>/dev/null; rm -rf /tmp/go-build* /tmp/standards /tmp/wordpress /tmp/zig-* /tmp/testbase /tmp/testbed 2>/dev/null; rm -f /tmp/tmp*.tmp /tmp/*.bak /tmp/expect* /tmp/butwas* 2>/dev/null; rm -rf /root/.cache/go-build 2>/dev/null; rm -rf /tests 2>/dev/null; find /logs -mindepth 1 -delete 2>/dev/null; mkdir -p /logs/agent /logs/verifier /logs/artifacts; chmod 777 /logs/agent /logs/verifier /logs/artifacts; find /var/log -type f -delete 2>/dev/null || true; rm -rf /var/lib/postgresql/*/*/log /var/lib/postgresql/*/*/pg_log 2>/dev/null || true; find /var/lib/mysql /var/lib/mongodb -type f -name '*.log' -delete 2>/dev/null || true; rm -rf /root/.npm/_logs /root/.babel.json /root/.pytest_cache 2>/dev/null || true; find / -maxdepth 4 -xdev -name task_description.md -path '*/.build_env/*' -delete 2>/dev/null || true; true
28
+ git clean -fdx --exclude=node_modules --exclude=bower_components --exclude=.husky --exclude=vendor --exclude=third_party --exclude=_deps --exclude=vcpkg_installed --exclude=.venv --exclude=venv --exclude=.gradle --exclude=target --exclude=.build --exclude=lib --exclude=.bundle --exclude=Manifest.toml --exclude=_build --exclude=.stack-work --exclude=dist-newstyle >/dev/null 2>&1
29
+ find /root/.m2 -type f \( -name '*-SNAPSHOT.jar' -o -name '*-SNAPSHOT-sources.jar' -o -name '*-SNAPSHOT-tests.jar' -o -name '*-SNAPSHOT-test-sources.jar' \) -delete 2>/dev/null; rm -rf /root/.julia/compiled 2>/dev/null; rm -rf /root/.gradle/caches/build-cache-* /root/.gradle/daemon 2>/dev/null; rm -rf /root/.gradle/caches/*/scripts /root/.gradle/caches/jars-* 2>/dev/null; rm -rf /root/.cache/bazel 2>/dev/null; true
30
+ if [ "$LATER" -gt 0 ]; then
31
+ # mimoagent's default git_leak_prevention is "strip": physically remove the fix-bearing future commits in place so
32
+ # .git stays usable and nothing leaks, even to a root agent. Hide .git only if the strip can't be verified; grading
33
+ # (code_test.sh) restores a hidden .git before it applies the test patch.
34
+ if ( set -eo pipefail
35
+ git checkout --detach $BASE 2>/dev/null || true
36
+ git for-each-ref --format="%(refname)" refs/heads | while read r; do git update-ref -d "$r" 2>/dev/null; done || true
37
+ git remote | xargs -r -n1 git remote remove 2>/dev/null || true
38
+ git for-each-ref --format="%(refname)" refs/replace refs/notes refs/stash refs/remotes refs/pull 2>/dev/null | while read r; do git update-ref -d "$r" 2>/dev/null; done || true
39
+ git for-each-ref --format="%(refname)" refs/tags | while read t; do if ! git merge-base --is-ancestor "$t" $BASE 2>/dev/null; then git tag -d "${t#refs/tags/}" >/dev/null 2>&1; fi; done || true
40
+ git reflog expire --expire=now --all 2>/dev/null || true
41
+ git -c gc.pruneExpire=now -c gc.cruftPacks=false gc --prune=now 2>/dev/null || true
42
+ set -euo pipefail
43
+ TARGET_TIMESTAMP=$(git show -s --format=%ci $BASE)
44
+ AFTER_TIMESTAMP=$(date -d "$TARGET_TIMESTAMP + 1 second" '+%Y-%m-%d %H:%M:%S')
45
+ COMMIT_COUNT=$(git log --oneline --all --since="$AFTER_TIMESTAMP" | wc -l)
46
+ [ "$COMMIT_COUNT" -eq 0 ] ); then
47
+ echo "history not truncated at ${BASE:0:12}: future commits stripped in place"
48
+ else
49
+ mv "$CWD/.git" "$M/git-hidden" && echo "history not truncated and unstrippable: .git hidden while the agent works"
50
+ fi
51
+ fi
52
+ write_blocklist
53
+
54
+ if [ -f "$M/blocklist" ]; then
55
+ [ -f "$M/hosts.preblock" ] || cp /etc/hosts "$M/hosts.preblock"
56
+ grep -q '^# mimo answer-leak blocklist' /etc/hosts 2>/dev/null || cat "$M/blocklist" >> /etc/hosts
57
+ fi
58
+ touch "$M/ready"
59
+ echo "setup done"
tasks/format-code-task-000004/instruction.md ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Fix the following issue:
2
+
3
+ ## Problème
4
+
5
+ Dans Pix Admin, sur l'écran de recherche d'organisations, quand je saisis du texte (par exemple `foo`) dans le champ ID puis que je lance la recherche, l'interface affiche le message générique **« Erreur dans Ember »** et aucun résultat ne s'affiche.
6
+
7
+ ## Reproduction
8
+
9
+ 1. Se connecter à Pix Admin avec un compte Pix Master
10
+ 2. Aller sur la liste des organisations
11
+ 3. Dans le filtre par ID, saisir une valeur non numérique (ex. `foo`)
12
+ 4. Lancer la recherche
13
+
14
+ → L'appel à `GET /api/organizations?filter[id]=foo` part vers l'API et la réponse fait planter l'UI ("Erreur dans Ember").
15
+
16
+ ## Comportement attendu
17
+
18
+ Saisir un ID non numérique est une simple erreur de frappe côté utilisateur ; ça ne devrait pas faire planter quoi que ce soit. La requête devrait être rejetée proprement par l'API au lieu d'aller jusqu'au bout du traitement.
19
+
20
+ Les autres cas de recherche doivent continuer à fonctionner normalement :
21
+ - aucun critère de recherche
22
+ - ID numérique existant
23
+ - recherche par nom
tasks/format-code-task-000004/task.toml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ schema_version = "1.4"
2
+
3
+ [task]
4
+ name = "mimo-v2.6-rl/format-code-task-000004"
5
+ description = "Dans Pix Admin, sur l'écran de recherche d'organisations, quand je saisis du texte (par exemple `foo`) dans…"
6
+ keywords = ["mimo-v2.6-rl", "code"]
7
+
8
+ [metadata]
9
+ adapter = "mimo_harbor 1.3.0"
10
+ category = "JavaScript"
11
+ domain = "code"
12
+ keywords = ["code", "JavaScript"]
13
+ reference_harness = "XiaomiMiMo/verl a2ad9f6 + XiaomiMiMo/mimoagent 467f0a1"
14
+ reference_step_limit = 500
15
+ source_dataset = "XiaomiMiMo/MiMo-V2.6-RL-oss"
16
+ source_id = "format-code-task-000004"
17
+ source_revision = "639865fd3374018d6cb29b9fb82dd531406fcf5f"
18
+ title = "Dans Pix Admin, sur l'écran de recherche d'organisations, quand je saisis du texte (par exemple `foo`) dans…"
19
+
20
+ [agent]
21
+ timeout_sec = 3600.0
22
+
23
+ [verifier]
24
+ timeout_sec = 2100.0
25
+ user = "root"
26
+
27
+ [environment]
28
+ docker_image = "docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:2777136eb50329705f24b2400b691aade6b6942117011fbb9399aa3ad3cc1bd0"
29
+ workdir = "/testbed"
30
+ cpus = 2
31
+ memory_mb = 8192
32
+ network_mode = "public"
33
+ build_timeout_sec = 1800.0
34
+
35
+ [environment.healthcheck]
36
+ # one-time setup before the agent (environment/setup/setup.sh)
37
+ command = "bash -c 'test -f /var/lib/mimo/ready || { mkdir -p /var/lib/mimo && echo H4sIAAAAAAAC/+1Z627cNhbO73kKdmLHl1qSnbYIYMPBuqmbBKibIPFid9F2B5REaWhLokJSM55cgH2IfcJ9kv0OqZmRxjNOF7vt/qiVxBbJw3MOz43fUTJZCBPFhUquC2nsg9/iOcTz5PDQ/T68/furw68ez9/9/NHhk6+fPGCHD36HpzGWa4h/8Md8HrJSlorxykyFDgrBr9kiGNgurfFcVHZvcBi6PyyXdtzEYaLKxdR0Og3XTPNarpvWfE7dGKETVVnw71EkKhWF4um63Sq+Eok1n+GQQ/t1uzvzm7fagvd3xdLGTXItbKh0vpg1qtGJyDAlwkrYLoPwWuhKFD3yZKxVKZsyzJXKkXNud99eVaqVTDcT+Klc83rc16/JTbjg3xUqjWmECZUxQda8f9+35PrJSZiKSc+Hq3MQ914WBQ9L5X93JdZa3cxwhIJXed9c7ui3puvrHNM9/v78tyPs9nQswW2V7tZkCt/RP4jpTo9tWYQb1ozgOhmHseaTFRdYnlyridBZoaZ9dk2eQ3LGndN6Gm1YGmfdUcotN8KaAHEJ/ps2JWkVFJn5zHLQmODoczSi2UxzI1zu9FVMuAliLVME/Mb1Vvu161ajzGSbVusZxVonNDK6msJ6ZseqGitjRdpb1oKyWc/Cqi6vzPqlGdcVRVivumhuwVeqrlOtTMLbC7qJZ7koV5nX6igsERlVP8B9zNxeqJp8pXRQVt2erRFa3FWoVXHh+qWxuAnrsuvX8MqgdMqJ7lWk5pYNhClDM+7uhAWTQjVpVnDtQ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M4a2+g5pDOE6XyPY5QT6gAV4m1mgEp5XAiHngCFxrSZRJsDRqKpx+Gu7/VYK2QvZCr8fteq4Hgk22nGEl7tWIJybT1PT+YgzEndpZZiRLESmvEeAVDARYKRc2Dn2LbtNWFq12f5nsMBJg9xwAtSd6m3AsBVrJa1ILTkSxH12QQiA4SfpTbYYbt1BczRQ1ZA3XKAfgt7MCy5PR1u72JMYb43pE7MRAQGDYCgx54OqqL9TpVDqk2NBkp4FtSv6GE/EFLCvV2p5DVkxkd2g/qC0oUaVx2xzkrr1v9Wa6BW53Y3gHthTPcK15vxnKRczte+snRR8P/mwL9WYXTaK1a2TuiisSsFCnLgYFUQSBNwdMgURlACne8tX7dNHu0Ea6/sB/twISv6NLzdF2ZyrcsyggZAY+g5XYGmF9xy07aV2OQrdA15EtboicR5Z4+bTXST2df0Reg04wXOlCfg5mgd1TqePuybTtxfnr15fn45unx5cU6fGV63rY6hL0GBWZp7O5HeQnuDs+9Rjno7yKHePqvs2JfAgUaga0+HbOfL7b8F22WwnbLtF8fbF8fbb3f2Bs9eXVy8vBw9e/XnHy9b6Q6uBbDispfFTyPhr9Ph1or8IfkcR3fdK/r9Druha2Kph91bVE3WfniaN5zUw/Wazq0PdMzjw+Ojx5+OV4uhq1U1COdVcQiWAtZ3nMuJ/+AQUTHy31LoA4KvUEP3Tewu2SijTeUlUF099jXtrsaVpKO5x9+VbzwDf3e0X+U633eW18di1X2CQpAJRzb0HX9Sd75PrSOjTxmusX3Hdv5+139873QZrQQlDr6q4NOn3Q9jOJlVDSrx8uPioPPh0KXa8P5/V+6f++f+uX/un//r82+tFAL6ACgAAA== | base64 -d | tar -xzf - -C /var/lib/mimo && bash /var/lib/mimo/setup.sh; }'"
38
+ timeout_sec = 1200.0
39
+ retries = 0
40
+ interval_sec = 5.0
tasks/format-code-task-000004/tests/test.patch ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/api/tests/unit/application/organizations/index_test.js b/api/tests/unit/application/organizations/index_test.js
2
+ index 7617d3b3ca3..070ae31847e 100644
3
+ --- a/api/tests/unit/application/organizations/index_test.js
4
+ +++ b/api/tests/unit/application/organizations/index_test.js
5
+ @@ -26,10 +26,10 @@ describe('Unit | Router | organization-router', () => {
6
+
7
+ describe('GET /api/organizations', () => {
8
+
9
+ - it('should exist', async () => {
10
+ + it('should return OK (200) when request is valid', async () => {
11
+ // given
12
+ const method = 'GET';
13
+ - const url = '/api/organizations?filter[name]=DRA&filter[type]=AZ&filter[type]=SCO&page[number]=3&page[size]=25';
14
+ + const url = '/api/organizations?filter[id]=&filter[name]=DRA&filter[type]=SCO&page[number]=3&page[size]=25';
15
+
16
+ // when
17
+ const response = await httpTestServer.request(method, url);
18
+ @@ -37,6 +37,19 @@ describe('Unit | Router | organization-router', () => {
19
+ // then
20
+ expect(response.statusCode).to.equal(200);
21
+ });
22
+ +
23
+ + it('should return BadRequest (400) when request is invalid', async () => {
24
+ +
25
+ + const method = 'GET';
26
+ + const idNotNumeric = 'foo';
27
+ + const url = `/api/organizations?filter[id]=${idNotNumeric}`;
28
+ +
29
+ +
30
+ + const response = await httpTestServer.request(method, url);
31
+ +
32
+ +
33
+ + expect(response.statusCode).to.equal(400);
34
+ + });
35
+ });
36
+
37
+ describe('POST /api/organizations/{id}/invitations', () => {
38
+ diff --git a/mimo_build_env.tar.gz.b64 b/mimo_build_env.tar.gz.b64
39
+ new file mode 100644
40
+ --- /dev/null
41
+ +++ b/mimo_build_env.tar.gz.b64
42
+ @@ -0,0 +1,6 @@
43
+ +H4sIAAAAAAAAA+3SQU+DMBgGYM77FTWeRweBceKAGTczE4dem0Ibqdla0haz+OvtOKgx0V22LIvv
44
+ +c/kK/Voa3sbtqLaCSf1Go3NZBEWeTzX4WadxkqdJssyyrAh9YZSkEcnPdqJvRue5JSSyxvi/+o7N
45
+ +X6n4K38vnWed2e24FrHrT/eNY/mnafGZ/yLNQv7ZMskjsjjdEX73z/O/vaGt0rTlrp91gkyXoJWC
46
+ +8kHN1g+rmtXr5/LwkjT1pmGrqqnuqk3Nnh7vy5YLNtot0cOe7EzXczKfy73yoVg5GOulLYXx5LDc
47
+ +0VErH7YdtqrjXhlNjX3hWr1PD44qLeSeHVrjVze79G8BAAAAAAAAAAAAAAAAAAAAALgKH3/Xkb4A
48
+ +KAAA
49
+ diff --git a/mimo_test_command.sh b/mimo_test_command.sh
50
+ new file mode 100755
51
+ --- /dev/null
52
+ +++ b/mimo_test_command.sh
53
+ @@ -0,0 +1,6 @@
54
+ +#!/usr/bin/env bash
55
+ +
56
+ +set -uo pipefail
57
+ +cd /testbed || exit 1
58
+ +base64 -d mimo_build_env.tar.gz.b64 | tar -xzf - -C /testbed || exit 1
59
+ +exec bash -lc 'cd /testbed && bash -eo pipefail /testbed/.build_env/test_command.sh'
tasks/format-code-task-000004/tests/test.sh ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Code grading, mimoagent opensource_code.py: reset the files the hidden test patch touches, apply it, run the
3
+ # task's test command; reward 1 when it exits 0. A testbed failure (reset or apply) writes no reward: not scored.
4
+ M=/var/lib/mimo
5
+ CWD=/testbed
6
+ V=/logs/verifier
7
+ mkdir -p "$V"
8
+ BASE=$(cat "$M/base" 2>/dev/null) || { echo "setup never ran (no $M/base)" >&2; exit 1; }
9
+ cd "$CWD" || exit 1
10
+ if [ -d "$M/git-hidden" ]; then rm -rf "$CWD/.git"; mv "$M/git-hidden" "$CWD/.git"; fi
11
+ # the agent's change against the base, so its own commits count too
12
+ git add -A >/dev/null 2>&1 && git -c core.fileMode=false diff --cached "$BASE" > "$V/agent.diff"
13
+ git reset -q
14
+ if ! (
15
+ while IFS= read -r tf; do
16
+ [ -z "$tf" ] && continue
17
+ if git cat-file -e $BASE:"$tf" 2>/dev/null; then
18
+ git checkout $BASE -- "$tf" 2>/dev/null || true
19
+ else
20
+ git rm -f --cached "$tf" >/dev/null 2>&1 || true
21
+ rm -f "$tf"
22
+ fi
23
+ done <<'EOF_RESET_TEST_FILES'
24
+ api/tests/unit/application/organizations/index_test.js
25
+ mimo_build_env.tar.gz.b64
26
+ mimo_test_command.sh
27
+ EOF_RESET_TEST_FILES
28
+
29
+ ); then echo "could not reset the test files (testbed problem, not scored)" >&2; exit 1; fi
30
+ if ! git apply --verbose /tests/test.patch > "$V/apply.log" 2>&1; then
31
+ cat "$V/apply.log" >&2
32
+ echo "the hidden tests could not be applied (testbed problem, not scored)" >&2
33
+ exit 1
34
+ fi
35
+ timeout 1800 sh -c "$(cat /tests/test_command.sh)" > "$V/test_output.log" 2>&1
36
+ RC=$?
37
+ tail -c 12000 "$V/test_output.log"
38
+ if [ $RC -eq 0 ]; then echo 1 > "$V/reward.txt"; else echo 0 > "$V/reward.txt"; fi
39
+ echo "test command exited $RC"
tasks/format-code-task-000004/tests/test_command.sh ADDED
@@ -0,0 +1 @@
 
 
1
+ bash /testbed/mimo_test_command.sh
tasks/format-code-task-000007/environment/Dockerfile ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ # The task's image, pinned by digest (the same as [environment].docker_image).
2
+ # Setup runs at start from [environment.healthcheck]; environment/setup/ is its readable copy.
3
+ FROM docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:39abf5a6f56accf125a99c5047a0c738af4ff1b920c29267a64b2a0901854f73
tasks/format-code-task-000007/environment/setup/files/blocklist ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # mimo answer-leak blocklist (mimoagent)
2
+ 0.0.0.0 github.com
3
+ 0.0.0.0 www.github.com
4
+ 0.0.0.0 api.github.com
5
+ 0.0.0.0 raw.githubusercontent.com
6
+ 0.0.0.0 codeload.github.com
7
+ 0.0.0.0 objects.githubusercontent.com
8
+ 0.0.0.0 gist.github.com
9
+ 0.0.0.0 gist.githubusercontent.com
10
+ 0.0.0.0 gitlab.com
11
+ 0.0.0.0 bitbucket.org
12
+ 0.0.0.0 sourceforge.net
13
+ 0.0.0.0 git.kernel.org
14
+ 0.0.0.0 chromium.googlesource.com
15
+ 0.0.0.0 android.googlesource.com
16
+ 0.0.0.0 sourcegraph.com
17
+ 0.0.0.0 bugs.chromium.org
18
+ 0.0.0.0 issues.oss-fuzz.com
19
+ 0.0.0.0 oss-fuzz.com
20
+ 0.0.0.0 osv.dev
21
+ 0.0.0.0 api.osv.dev
22
+ 0.0.0.0 bugzilla.mozilla.org
23
+ 0.0.0.0 proxy.golang.org
24
+ 0.0.0.0 sum.golang.org
25
+ 0.0.0.0 pkg.go.dev
26
+ 0.0.0.0 google.com
27
+ 0.0.0.0 www.google.com
28
+ 0.0.0.0 bing.com
29
+ 0.0.0.0 www.bing.com
30
+ 0.0.0.0 duckduckgo.com
31
+ 0.0.0.0 html.duckduckgo.com
32
+ 0.0.0.0 search.brave.com
33
+ 0.0.0.0 stackoverflow.com
34
+ 0.0.0.0 huggingface.co
35
+ 0.0.0.0 www.huggingface.co
36
+ 0.0.0.0 hf.co
37
+ 0.0.0.0 datasets-server.huggingface.co
38
+ 0.0.0.0 cdn-lfs.huggingface.co
39
+ 0.0.0.0 cdn-lfs-us-1.huggingface.co
40
+ 0.0.0.0 cdn-lfs-eu-1.huggingface.co
41
+ 0.0.0.0 xethub.hf.co
42
+ 0.0.0.0 cas-bridge.xethub.hf.co
43
+ 0.0.0.0 cas-server.xethub.hf.co
44
+ 0.0.0.0 transfer.xethub.hf.co
45
+ 0.0.0.0 pypi.org
46
+ 0.0.0.0 files.pythonhosted.org
47
+ 0.0.0.0 registry.npmjs.org
48
+ 0.0.0.0 registry.yarnpkg.com
49
+ 0.0.0.0 crates.io
50
+ 0.0.0.0 static.crates.io
51
+ 0.0.0.0 rubygems.org
52
+ 0.0.0.0 repo1.maven.org
53
+ 0.0.0.0 search.maven.org
54
+ 0.0.0.0 nuget.org
55
+ 0.0.0.0 api.nuget.org
56
+ 0.0.0.0 packagist.org
57
+ 0.0.0.0 repo.packagist.org
58
+ 0.0.0.0 hex.pm
59
+ 0.0.0.0 cdn.jsdelivr.net
60
+ 0.0.0.0 unpkg.com
61
+ 0.0.0.0 esm.sh
62
+ 0.0.0.0 cdnjs.cloudflare.com
tasks/format-code-task-000007/environment/setup/setup.sh ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Runs once, as root, before the agent starts: Harbor's [environment.healthcheck] unpacks this folder into
3
+ # /var/lib/mimo and runs it. Generated by mimo_harbor; see its README for how each step maps to Xiaomi's harness.
4
+ M=/var/lib/mimo
5
+ [ -f "$M/ready" ] && exit 0
6
+ chmod 700 "$M"
7
+ fail() { echo "setup: $*" >&2; exit 1; }
8
+ # the answer-leak blocklist (mimoagent). write_blocklist only STAGES the list (so the order of setup steps is never
9
+ # affected — General, for one, downloads its workplace files from the Hub after staging); it is applied to /etc/hosts
10
+ # at the very end of setup (POSTAMBLE), which protects any agent, not only the reference one.
11
+ write_blocklist() { cp "$M/files/blocklist" "$M/blocklist"; }
12
+
13
+ # Code: mimoagent environments/datasets/opensource_code.py + base.py, as the explorer runs it (app/runner/domains.py Code).
14
+ CWD=/testbed
15
+ git config --global --add safe.directory "$CWD"
16
+ cd "$CWD" || fail "no working directory $CWD"
17
+ if ! git rev-parse --git-dir >/dev/null 2>&1; then # a bare source tree: give it a baseline commit
18
+ git init -q && git add -A && git -c user.name=mimo -c user.email=mimo@localhost commit -q -m baseline --allow-empty
19
+ fi
20
+ BASE=$(git rev-parse HEAD 2>/dev/null)
21
+ [ ${#BASE} -eq 40 ] || fail "could not resolve the base commit in $CWD"
22
+ echo "$BASE" > "$M/base"
23
+ # Images are built with history truncated at the base. If one is not, the fix could be read out of git log,
24
+ # so .git is hidden while the agent works and put back for grading.
25
+ LATER=$(git rev-list --all --not "$BASE" 2>/dev/null | head -n 5 | grep -c . || true)
26
+ rm -rf /testbed/node_modules/.cache /testbed/node_modules/.vitest 2>/dev/null; true
27
+ rm -f /tmp/fail.log /tmp/pass.log /tmp/patch.diff /tmp/test_patch.diff /tmp/*.log 2>/dev/null; rm -rf /tmp/claude-0 /tmp/claude-* /tmp/testem-* /tmp/puppeteer_dev_chrome_profile-* 2>/dev/null; rm -f /tmp/test_files.json 2>/dev/null; rm -rf /tmp/jest_* /tmp/jest-* /tmp/build /tmp/build_env 2>/dev/null; rm -rf /tmp/pytest-of-root /tmp/pytest-* /tmp/.pytest_cache /tmp/__pycache__ 2>/dev/null; rm -rf /tmp/go-build* /tmp/standards /tmp/wordpress /tmp/zig-* /tmp/testbase /tmp/testbed 2>/dev/null; rm -f /tmp/tmp*.tmp /tmp/*.bak /tmp/expect* /tmp/butwas* 2>/dev/null; rm -rf /root/.cache/go-build 2>/dev/null; rm -rf /tests 2>/dev/null; find /logs -mindepth 1 -delete 2>/dev/null; mkdir -p /logs/agent /logs/verifier /logs/artifacts; chmod 777 /logs/agent /logs/verifier /logs/artifacts; find /var/log -type f -delete 2>/dev/null || true; rm -rf /var/lib/postgresql/*/*/log /var/lib/postgresql/*/*/pg_log 2>/dev/null || true; find /var/lib/mysql /var/lib/mongodb -type f -name '*.log' -delete 2>/dev/null || true; rm -rf /root/.npm/_logs /root/.babel.json /root/.pytest_cache 2>/dev/null || true; find / -maxdepth 4 -xdev -name task_description.md -path '*/.build_env/*' -delete 2>/dev/null || true; true
28
+ git clean -fdx --exclude=node_modules --exclude=bower_components --exclude=.husky --exclude=vendor --exclude=third_party --exclude=_deps --exclude=vcpkg_installed --exclude=.venv --exclude=venv --exclude=.gradle --exclude=target --exclude=.build --exclude=lib --exclude=.bundle --exclude=Manifest.toml --exclude=_build --exclude=.stack-work --exclude=dist-newstyle >/dev/null 2>&1
29
+ find /root/.m2 -type f \( -name '*-SNAPSHOT.jar' -o -name '*-SNAPSHOT-sources.jar' -o -name '*-SNAPSHOT-tests.jar' -o -name '*-SNAPSHOT-test-sources.jar' \) -delete 2>/dev/null; rm -rf /root/.julia/compiled 2>/dev/null; rm -rf /root/.gradle/caches/build-cache-* /root/.gradle/daemon 2>/dev/null; rm -rf /root/.gradle/caches/*/scripts /root/.gradle/caches/jars-* 2>/dev/null; rm -rf /root/.cache/bazel 2>/dev/null; true
30
+ if [ "$LATER" -gt 0 ]; then
31
+ # mimoagent's default git_leak_prevention is "strip": physically remove the fix-bearing future commits in place so
32
+ # .git stays usable and nothing leaks, even to a root agent. Hide .git only if the strip can't be verified; grading
33
+ # (code_test.sh) restores a hidden .git before it applies the test patch.
34
+ if ( set -eo pipefail
35
+ git checkout --detach $BASE 2>/dev/null || true
36
+ git for-each-ref --format="%(refname)" refs/heads | while read r; do git update-ref -d "$r" 2>/dev/null; done || true
37
+ git remote | xargs -r -n1 git remote remove 2>/dev/null || true
38
+ git for-each-ref --format="%(refname)" refs/replace refs/notes refs/stash refs/remotes refs/pull 2>/dev/null | while read r; do git update-ref -d "$r" 2>/dev/null; done || true
39
+ git for-each-ref --format="%(refname)" refs/tags | while read t; do if ! git merge-base --is-ancestor "$t" $BASE 2>/dev/null; then git tag -d "${t#refs/tags/}" >/dev/null 2>&1; fi; done || true
40
+ git reflog expire --expire=now --all 2>/dev/null || true
41
+ git -c gc.pruneExpire=now -c gc.cruftPacks=false gc --prune=now 2>/dev/null || true
42
+ set -euo pipefail
43
+ TARGET_TIMESTAMP=$(git show -s --format=%ci $BASE)
44
+ AFTER_TIMESTAMP=$(date -d "$TARGET_TIMESTAMP + 1 second" '+%Y-%m-%d %H:%M:%S')
45
+ COMMIT_COUNT=$(git log --oneline --all --since="$AFTER_TIMESTAMP" | wc -l)
46
+ [ "$COMMIT_COUNT" -eq 0 ] ); then
47
+ echo "history not truncated at ${BASE:0:12}: future commits stripped in place"
48
+ else
49
+ mv "$CWD/.git" "$M/git-hidden" && echo "history not truncated and unstrippable: .git hidden while the agent works"
50
+ fi
51
+ fi
52
+ write_blocklist
53
+
54
+ if [ -f "$M/blocklist" ]; then
55
+ [ -f "$M/hosts.preblock" ] || cp /etc/hosts "$M/hosts.preblock"
56
+ grep -q '^# mimo answer-leak blocklist' /etc/hosts 2>/dev/null || cat "$M/blocklist" >> /etc/hosts
57
+ fi
58
+ touch "$M/ready"
59
+ echo "setup done"
tasks/format-code-task-000007/instruction.md ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Fix the following issue:
2
+
3
+ ## Filling an order against a non-contract takerAsset silently "succeeds"
4
+
5
+ I was stress-testing edge cases against `fillOrderArgs` and noticed that the protocol does not behave like SafeERC20 when the taker asset address has no contract code at it.
6
+
7
+ ### Repro
8
+
9
+ 1. Build a regular order, but set `takerAsset` to an address that has no code deployed at it on the current network. Realistic ways this happens:
10
+ - typo in the token address,
11
+ - signing an order on mainnet for a token that only exists on another chain,
12
+ - a token that has been self-destructed.
13
+ 2. Maker signs and the order goes on the book.
14
+ 3. A taker calls `fillOrderArgs` for that order.
15
+
16
+ ### What I see
17
+
18
+ The fill goes through. `OrderFilled` is emitted, the maker's `makerAsset` is transferred out to the taker, and on the maker side I see no `takerAsset` arrived (which makes sense — there's no token contract there to actually move balances). From the maker's point of view they just gave funds away for nothing.
19
+
20
+ ### What I expected
21
+
22
+ The taker→maker transfer leg should be treated as failed and the whole `fillOrderArgs` call should revert (with the existing `TransferFromTakerToMakerFailed`), so the maker's asset is never moved. That's what OpenZeppelin's `SafeERC20.safeTransferFrom` does — if the call to `transferFrom` returns no data, it still requires the callee to actually be a contract; otherwise the "success" is meaningless.
23
+
24
+ ### Why I think this is in scope here
25
+
26
+ The protocol uses an internal helper (`_callTransferFromWithSuffix`) for the taker→maker transfer instead of the standard SafeERC20 path, presumably so it can append the taker asset suffix. That helper's success check is more permissive than SafeERC20's — calling into an EOA returns no return data and is being accepted as a successful ERC20 transfer. The helper should have the same "no code, no deal" guarantee that SafeERC20 has, otherwise orders against bogus / non-existent token addresses will keep draining makers.
tasks/format-code-task-000007/task.toml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ schema_version = "1.4"
2
+
3
+ [task]
4
+ name = "mimo-v2.6-rl/format-code-task-000007"
5
+ description = "Filling an order against a non-contract takerAsset silently \"succeeds\""
6
+ keywords = ["mimo-v2.6-rl", "code"]
7
+
8
+ [metadata]
9
+ adapter = "mimo_harbor 1.3.0"
10
+ category = "JavaScript"
11
+ domain = "code"
12
+ keywords = ["code", "JavaScript"]
13
+ reference_harness = "XiaomiMiMo/verl a2ad9f6 + XiaomiMiMo/mimoagent 467f0a1"
14
+ reference_step_limit = 500
15
+ source_dataset = "XiaomiMiMo/MiMo-V2.6-RL-oss"
16
+ source_id = "format-code-task-000007"
17
+ source_revision = "639865fd3374018d6cb29b9fb82dd531406fcf5f"
18
+ title = "Filling an order against a non-contract takerAsset silently \"succeeds\""
19
+
20
+ [agent]
21
+ timeout_sec = 3600.0
22
+
23
+ [verifier]
24
+ timeout_sec = 2100.0
25
+ user = "root"
26
+
27
+ [environment]
28
+ docker_image = "docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:39abf5a6f56accf125a99c5047a0c738af4ff1b920c29267a64b2a0901854f73"
29
+ workdir = "/testbed"
30
+ cpus = 2
31
+ memory_mb = 8192
32
+ network_mode = "public"
33
+ build_timeout_sec = 1800.0
34
+
35
+ [environment.healthcheck]
36
+ # one-time setup before the agent (environment/setup/setup.sh)
37
+ command = "bash -c 'test -f /var/lib/mimo/ready || { mkdir -p /var/lib/mimo && echo H4sIAAAAAAAC/+1Z627cNhbO73kKdmLHl1qSnbYIYMPBuqmbBKibIPFid9F2B5REaWhLokJSM55cgH2IfcJ9kv0OqZmRxjNOF7vt/qiVxBbJw3MOz43fUTJZCBPFhUquC2nsg9/iOcTz5PDQ/T68/furw68ez9/9/NHhk6+fPGCHD36HpzGWa4h/8Md8HrJSlorxykyFDgrBr9kiGNgurfFcVHZvcBi6PyyXdtzEYaLKxdR0Og3XTPNarpvWfE7dGKETVVnw71EkKhWF4um63Sq+Eok1n+GQQ/t1uzvzm7fagvd3xdLGTXItbKh0vpg1qtGJyDAlwkrYLoPwWuhKFD3yZKxVKZsyzJXKkXNud99eVaqVTDcT+Klc83rc16/JTbjg3xUqjWmECZUxQda8f9+35PrJSZiKSc+Hq3MQ914WBQ9L5X93JdZa3cxwhIJXed9c7ui3puvrHNM9/v78tyPs9nQswW2V7tZkCt/RP4jpTo9tWYQb1ozgOhmHseaTFRdYnlyridBZoaZ9dk2eQ3LGndN6Gm1YGmfdUcotN8KaAHEJ/ps2JWkVFJn5zHLQmODoczSi2UxzI1zu9FVMuAliLVME/Mb1Vvu161ajzGSbVusZxVonNDK6msJ6ZseqGitjRdpb1oKyWc/Cqi6vzPqlGdcVRVivumhuwVeqrlOtTMLbC7qJZ7koV5nX6igsERlVP8B9zNxeqJp8pXRQVt2erRFa3FWoVXHh+qWxuAnrsuvX8MqgdMqJ7lWk5pYNhClDM+7uhAWTQjVpVnDtQ/7B/fMHeFBymhqx8FvKuBv/HT3+5slhH/8B/n11j/9+H/z3RYQLM4o5ysFD9qapDFNVIg4YN0wrZQ9YTBhHMDsWzEFBKpfammP2gutY6R3DfhLVRGpVlYSlxoIXdpyMRXL9C1UeVC6DzdKwTBWp0ExWVkFUNOE6KmQctfgzRbWFcIA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fpTbYYbt1BczRQ1ZA3XKAfgt7MCy5PR1u72JMYb43pE7MRAQGDYCgx54OqqL9TpVDqk2NBkp4FtSv6GE/EFLCvV2p5DVkxkd2g/qC0oUaVx2xzkrr1v9Wa6BW53Y3gHthTPcK15vxnKRczte+snRR8P/mwL9WYXTaK1a2TuiisSsFCnLgYFUQSBNwdMgURlACne8tX7dNHu0Ea6/sB/twISv6NLzdF2ZyrcsyggZAY+g5XYGmF9xy07aV2OQrdA15EtboicR5Z4+bTXST2df0Reg04wXOlCfg5mgd1TqePuybTtxfnr15fn45unx5cU6fGV63rY6hL0GBWZp7O5HeQnuDs+9Rjno7yKHePqvs2JfAgUaga0+HbOfL7b8F22WwnbLtF8fbF8fbb3f2Bs9eXVy8vBw9e/XnHy9b6Q6uBbDispfFTyPhr9Ph1or8IfkcR3fdK/r9Druha2Kph91bVE3WfniaN5zUw/Wazq0PdMzjw+Ojx5+OV4uhq1U1COdVcQiWAtZ3nMuJ/+AQUTHy31LoA4KvUEP3Tewu2SijTeUlUF099jXtrsaVpKO5x9+VbzwDf3e0X+U633eW18di1X2CQpAJRzb0HX9Sd75PrSOjTxmusX3Hdv5+139873QZrQQlDr6q4NOn3Q9jOJlVDSrx8uPioPPh0KXa8P5/V+6f++f+uX/un//r82+tFAL6ACgAAA== | base64 -d | tar -xzf - -C /var/lib/mimo && bash /var/lib/mimo/setup.sh; }'"
38
+ timeout_sec = 1200.0
39
+ retries = 0
40
+ interval_sec = 5.0