AI
PyTorch GreenLight brings AI code review auto-approval into open source
Meta's RADAR system, which uses AI to approve low-risk code changes, is now being adapted by PyTorch as an open-source tool, as major tech companies race to automate code review workflows.
InfoQ
PyTorch has begun rolling out GreenLight, an open-source implementation of Meta's automated code review approach, allowing AI reviewers to approve pull requests from trusted maintainers without manual human review. The initiative reflects a broader industry shift toward automating approval workflows as teams struggle to keep pace with AI-assisted code generation.
The capacity challenge#
Code review has become a bottleneck. Meta reported that lines of code per developer grew 105.9% year-over-year, while the number of diffs (changes) per developer per month jumped 51%. More than 80% of that surge stems from agentic AI assistance—developers using tools like Codex to generate code faster than humans can review it. Despite this volume increase, review turnaround has slowed, with fewer diffs receiving feedback within a day.
Rather than attempting to replace human judgment entirely, Meta took a narrower approach: automating only changes that meet strict safety criteria.
How RADAR works#
Meta's RADAR (Risk Aware Diff Auto Review) system, published in a research paper in May, applies multiple gates before auto-approval:
- Hard safety limits block certain categories entirely: open-source code, SOX-scoped changes, and anything flagged for extra review never get automated approval
- Source-based rules treat deterministic codemods and vetted automation sources differently, with allowlisted bots eligible for higher risk thresholds
- Diff Risk Score acts as a percentile gate—allowlisted runbooks can land changes up to the 50th percentile of risk, while other AI and bot sources max out at the 20th percentile
- LLM reviewer examines actual code changes, looking for patterns known to be safe: dead code removal, refactoring without behavior change, logging additions, and new tests
- Confidence threshold requires at least 8 out of 10 confidence that all changes fit safe categories
Approved changes wait in a landing queue (24 hours in Meta's setup) during which humans can still reject them. The system continuously monitors outcomes and adjusts thresholds.
PyTorch's adaptation#
PyTorch is adapting RADAR as GreenLight, but with one crucial constraint: it limits auto-approval to PyTorch maintainers who already have merge rights. All other developers undergo "shadow mode" review—the AI reviews their code, but no auto-approval occurs. The system rescans every five minutes, with reverted PRs permanently dropped from approval consideration.

