Datasets:
instance_id stringlengths 10 64 | repo stringlengths 5 57 | pr_number int64 1 313k | task_type stringclasses 1
value | teacher_model stringclasses 1
value | turns int64 7 200 | messages stringlengths 57.9k 850k | tools stringclasses 1
value | review stringlengths 431 18.8k | judge_score int64 8 10 | judge_pass bool 1
class | judge_reason stringlengths 93 600 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Ahmad45123__workup__54 | Ahmad45123/workup | 54 | defect | GLM-5.3-Flash | 45 | "[{\"role\": \"system\", \"content\": \"# Tools\\n\\nYou have access to the following functions:\\n\(...TRUNCATED) | "[{\"type\": \"function\", \"function\": {\"name\": \"terminal\", \"description\": \"Execute a shell(...TRUNCATED) | "{\"findings\": [{\"title\": \"[P0] Duplicate repository interfaces crash users service startup (Bea(...TRUNCATED) | 9 | true | "The only human-raised defect (G0, P2) was found and matched by F0, and the review went far beyond i(...TRUNCATED) |
Automattic__node-canvas__2510 | Automattic/node-canvas | 2,510 | defect | GLM-5.3-Flash | 34 | "[{\"role\": \"system\", \"content\": \"# Tools\\n\\nYou have access to the following functions:\\n\(...TRUNCATED) | "[{\"type\": \"function\", \"function\": {\"name\": \"terminal\", \"description\": \"Execute a shell(...TRUNCATED) | "{\"findings\": [{\"title\": \"[P1] Deleting failing '2d.type class string' test masks Symbol.toStri(...TRUNCATED) | 8 | true | "There were no P0/P1 defects; the AI found all three supported P2 defects (G0, G1, G2) with detailed(...TRUNCATED) |
Azure__azure-libraries-for-java__50 | Azure/azure-libraries-for-java | 50 | defect | GLM-5.3-Flash | 91 | "[{\"role\": \"system\", \"content\": \"# Tools\\n\\nYou have access to the following functions:\\n\(...TRUNCATED) | "[{\"type\": \"function\", \"function\": {\"name\": \"terminal\", \"description\": \"Execute a shell(...TRUNCATED) | "{\"findings\": [{\"title\": \"[P1] Remove @Method from plain accessors: it turns C# properties into(...TRUNCATED) | 8 | true | "The only human defect (G0, P2, supported) was found and expanded with thorough evidence, and the un(...TRUNCATED) |
ChuckHend__pg_vectorize__262 | ChuckHend/pg_vectorize | 262 | defect | GLM-5.3-Flash | 35 | "[{\"role\": \"system\", \"content\": \"# Tools\\n\\nYou have access to the following functions:\\n\(...TRUNCATED) | "[{\"type\": \"function\", \"function\": {\"name\": \"terminal\", \"description\": \"Execute a shell(...TRUNCATED) | "{\"findings\": [{\"title\": \"[P2] Flattened semantic subquery evaluates the vector distance operat(...TRUNCATED) | 10 | true | "The review found the only defect that carried weight — the P2 supported duplication of the vector(...TRUNCATED) |
FasterXML__jackson-databind__5216 | FasterXML/jackson-databind | 5,216 | defect | GLM-5.3-Flash | 67 | "[{\"role\": \"system\", \"content\": \"# Tools\\n\\nYou have access to the following functions:\\n\(...TRUNCATED) | "[{\"type\": \"function\", \"function\": {\"name\": \"terminal\", \"description\": \"Execute a shell(...TRUNCATED) | "{\"findings\": [{\"title\": \"[P1] _sortProperties now eagerly resolves getter conflicts, breaking (...TRUNCATED) | 10 | true | "F0 found the only P1 defect (G0) and went further than the humans by pinpointing the root cause of (...TRUNCATED) |
GoogleCloudPlatform__ops-agent__1985 | GoogleCloudPlatform/ops-agent | 1,985 | defect | GLM-5.3-Flash | 66 | "[{\"role\": \"system\", \"content\": \"# Tools\\n\\nYou have access to the following functions:\\n\(...TRUNCATED) | "[{\"type\": \"function\", \"function\": {\"name\": \"terminal\", \"description\": \"Execute a shell(...TRUNCATED) | "{\"findings\": [{\"title\": \"[P1] New redis transformation test asserts every log line fails to pa(...TRUNCATED) | 10 | true | "The review found both human-raised defects: the P1 redis transformation-test testdata problem, whic(...TRUNCATED) |
LeelaChessZero__lc0__210 | LeelaChessZero/lc0 | 210 | defect | GLM-5.3-Flash | 55 | "[{\"role\": \"system\", \"content\": \"# Tools\\n\\nYou have access to the following functions:\\n\(...TRUNCATED) | "[{\"type\": \"function\", \"function\": {\"name\": \"terminal\", \"description\": \"Execute a shell(...TRUNCATED) | "{\"findings\": [{\"title\": \"[P2] Only the \\\"dead en-passant flag\\\" branch of the new ep logic(...TRUNCATED) | 10 | true | "The only human-raised defect was a supported, introduced P2 asking for a self-describing test plus (...TRUNCATED) |
Lightning-AI__LitServe__178 | Lightning-AI/LitServe | 178 | defect | GLM-5.3-Flash | 79 | "[{\"role\": \"system\", \"content\": \"# Tools\\n\\nYou have access to the following functions:\\n\(...TRUNCATED) | "[{\"type\": \"function\", \"function\": {\"name\": \"terminal\", \"description\": \"Execute a shell(...TRUNCATED) | "{\"findings\": [{\"title\": \"[P1] Blocking `mp.Queue.get` on non-daemon executor threads hangs the(...TRUNCATED) | 10 | true | "The review identified the only human-raised defect — the CI 'Test completed!' debug echo (F2 matc(...TRUNCATED) |
Lightning-AI__LitServe__618 | Lightning-AI/LitServe | 618 | defect | GLM-5.3-Flash | 78 | "[{\"role\": \"system\", \"content\": \"# Tools\\n\\nYou have access to the following functions:\\n\(...TRUNCATED) | "[{\"type\": \"function\", \"function\": {\"name\": \"terminal\", \"description\": \"Execute a shell(...TRUNCATED) | "{\"findings\": [{\"title\": \"[P1] Fix and new `track_requests` gating ship with no regression test(...TRUNCATED) | 9 | true | "The review found the only supported defect (the P2 comment issue, via F1) and the sole P1 (G0, the (...TRUNCATED) |
MemMachine__MemMachine__1004 | MemMachine/MemMachine | 1,004 | defect | GLM-5.3-Flash | 35 | "[{\"role\": \"system\", \"content\": \"# Tools\\n\\nYou have access to the following functions:\\n\(...TRUNCATED) | "[{\"type\": \"function\", \"function\": {\"name\": \"terminal\", \"description\": \"Execute a shell(...TRUNCATED) | "{\"findings\": [{\"title\": \"[P1] Search summary never sees episodes: dict branch reads non-existe(...TRUNCATED) | 9 | true | "The review found the only P1 (G0, via F4's dict-default TypeError — an independent second source (...TRUNCATED) |
LegoReview-Traj contains 154,412 teacher trajectories, including 59,338 verified for training, generated with GLM-5.3-Flash and OpenHands on LegoReview-Task. Each trajectory preserves code exploration, reasoning, tool use, and the final report for reviewer training.
| Configuration | Trajectories | Use |
|---|---|---|
trainable (default) |
59,338: 45,775 defect + 13,563 clean | Verified reviewer training data |
non_trainable |
95,074 | Additional teacher rollouts for analysis |
Both configurations have defect and clean splits.
Load
import json
from datasets import load_dataset
repo = "Lego-X/LegoReview-Traj"
defect = load_dataset(repo, "trainable", split="defect")
clean = load_dataset(repo, "trainable", split="clean")
messages = json.loads(defect[0]["messages"])
Format
| Fields | Contents |
|---|---|
instance_id, repo, pr_number, task_type |
Task identity; join tasks by instance_id |
teacher_model, turns |
Teacher and assistant-message count |
messages, tools, review |
JSON-encoded conversation, tool definitions, and structured review |
judge_score, judge_reason, judge_pass |
Finding-level score (0–10), rationale, and semantic admission result; score is null for clean tasks |
Defect reviews are checked against snapshot-aligned reference findings; clean reviews use a deterministic gate. Use trainable for training: it also checks message/report validity and the 196,608-token context limit.
See the trajectory guide and model card for generation and training.
License
Dataset annotations and project-owned files: Apache-2.0. Upstream code and PR text retain their respective licenses.
Acknowledgements
Built with SWE-Review, OpenHands, Harbor, LegoFlow, and Martian Code Review Benchmark.
Citation
If you use our code, data, or model, please cite the two papers below.
@misc{wang2026legoreviewscalingcodereview,
title={LegoReview: Scaling Code Review Data with Verification from Pull Request Histories},
author={Ruoyu Wang and Jierun Chen and Yuxin Jiang and Chaofan Tao and Shaowei Wang and Sidi Yang and Conghao Xiong and Yiming Du and Tiezheng Yu and Kim-Hui Yap and Lifeng Shang and Xiao-Hui Li and Haoli Bai},
year={2026},
eprint={2612.00862},
archivePrefix={arXiv},
primaryClass={cs.SE},
url={https://arxiv.org/abs/2612.00862},
}
@misc{wang2026swereview,
title = {SWE-Review: Closing the Loop on Issue Resolution with Agentic Code Review},
author = {Ruoyu Wang and Jierun Chen and Shaowei Wang and Chaofan Tao and Sidi Yang and Yuxin Jiang and Kim-Hui Yap and Lifeng Shang and Xiaohui Li and Haoli Bai},
year = {2026},
url = {https://github.com/LegoX/SWE-Review}
}
- Downloads last month
- 60