PyTorch

Content type: News

6 min read

PyTorch GreenLight Starts Approving Maintainer PRs Without Human Review

The PyTorch project adapted RADAR, Meta's internal system for automatically approving low-risk diffs, and is already letting an AI approve maintainers' pull requests without human review.

News
Reading
6 min
Tables
1

The PyTorch project adapted RADAR, Meta's internal system for automatically approving low-risk diffs, and is already letting an AI approve maintainers' pull requests without human review.

The Problem Behind Meta's RADAR

In May 2026, Meta published a technical paper describing RADAR (Risk Aware Diff Auto Review), an internal system that approves low-risk code without waiting for a human reviewer. The starting point was a capacity bottleneck: the number of significant lines of code per human-approved diff rose 105.9% year over year, and the number of diffs per developer per month grew 51%. Meta attributes more than 80% of that increase to the use of agentic AI assistants, and the fraction of diffs reviewed within 24 hours has been declining.

Rather than attempting to replace code review broadly, RADAR targets automation to diffs that satisfy conservative safety criteria.

Paper "Automating Low-Risk Code Review at Meta" (arXiv 2605.30208)

That explains why RADAR doesn't try to replace code review broadly. It targets diffs that meet tightly restricted safety criteria, leaving the rest of the workflow with human reviewers as it always was.

How Meta Decides What an AI Can Approve on Its Own

RADAR's pipeline starts by sorting each diff by origin: human author, automated codemod, or AI runbook. Deterministic codemods can be approved under a blanket policy and don't even go through individual review. Diffs generated by AI or by automated runbooks go through a funnel with safety checks, a Diff Risk Score, and finally an LLM reviewer: any failure in that chain sends the diff to a human.

The safety checks are hard limits. Open source code, code within SOX scope, and code that requires extra review never enter the automated flow. Automation runbooks need to show 60 days without a production incident and a low revert or rejection rate, plus a cap of up to 2,000 diffs per day.

The Diff Risk Score works as a percentile cutoff, and each type of origin has a different ceiling:

Diff originRisk percentile ceiling
Allowlisted runbookup to the 50th percentile
Other AI or bot sourcesup to the 20th percentile
Human-written diffup to the 5th percentile (default, adjustable per team)

The last barrier is the RADAR Review Agent, which actually reads the change and looks for patterns considered safe, such as dead code removal, behavior-preserving refactoring, logging additions, and new tests. The bar is high: the agent only automatically approves diffs with a minimum confidence of 8 out of 10, with all changes classified into safe categories. Even once approved, the diff isn't merged right away: it sits in a "landing" queue for a configurable delay, 24 hours in the pipeline design described in the paper, during which a human can still reject the change.

GreenLight: The Open Version PyTorch Is Running

In May, the PyTorch team announced it would rebuild RADAR in the open, naming the result GreenLight. Edward Yang, of the PyTorch team, described in the project's devlog the rule that organizes the system to this day:

RADAR is predicated on trust of the author, so RADAR approves will be limited to PyTorch maintainers who otherwise already have approval rights on the files being changed.

Edward Yang, PyTorch team

GreenLight follows that rule to the letter. The eligible group comes straight from PyTorch's merge rules file: a pull request only gets a real verdict when a merge rule recognizes its author as someone with approval rights on that file path. Everything else is evaluated in "shadow" mode, and those evaluations never turn into real approvals, serving only to calibrate the system.

In practice, a scan runs every five minutes and sends eligible PRs to a review workflow. A "land" verdict approves the PR and applies a label; a "no-land" verdict revokes any previous GreenLight approval. The project's documentation is blunt about what happens when something goes wrong afterward:

A reverted PR is dropped from every path, permanently.

GreenLight README, PyTorch repository

That closes the trust loop: a revert isn't just an isolated event, it removes that PR from any automated approval path forever.

OpenAI, Anthropic, and Sonar Are Making the Same Bet

At QCon San Francisco 2026, Brian Yang, of OpenAI's technical team, said the ChatGPT Ads team started being built with Codex in November 2025 and today has no production code lines written by a human.

OpenAI's approach matches the type of approval to the type of change: routine changes are automatically approved as soon as the required checks pass, while critical changes must go through sandbox validation against a copy of production traffic before a human decides. Yang's goal is to keep at least 90% automatic approval for routine PRs, with the team adjusting the reviewer's thresholds every week based on approvals, blocks, and breakages that slipped through unnoticed.

Anthropic applies similar reasoning, but at a different level: instead of calibrating diff approval, its Antique system measures the risk of the actions an agent takes while working on the code. Sonar calls this set of practices the "agentic software factory." Manish Kapur, VP of product marketing and developer relations at Sonar, sums up the idea:

In a well-run factory, the factory knows which changes can pass on automated evidence and which require a person to decide.

Manish Kapur, VP of product marketing and developer relations at Sonar

Sonar's latest survey of more than 1,000 developers shows why this kind of triage matters: 76% said they generate AI code faster than they can verify it, and only 39% say they always review before committing.

What Changes for Software Builders in Brazil

The pattern repeated across Meta, OpenAI, Anthropic, and Sonar isn't "letting AI approve code": it's calibrating how much trust each combination of author, change type, and history deserves, and feeding that calibration with real reverts and errors. For a Brazilian team that already uses code agents daily, this is more replicable than it looks: the starting point isn't a sophisticated AI model, it's the audit trail, that is, who has the right to approve what, revert history by change type, and the required checks that already exist in CI.

GreenLight is open source and its code is published in the PyTorch repository, giving any team a concrete reference for how to build this kind of gate without depending on Meta's internal infrastructure. It's worth noting RADAR's documented exclusions: open source code, code within compliance scope, such as SOX, and changes that, under the project's own rules, require extra review never enter the automated flow.

GreenLight, in turn, restricts eligibility based on trust in the author: only those who already have approval rights on that file path, under the project's merge rules, enter the automated approval circuit. In both cases, automation targets repetitive, low-risk PRs, not architectural decisions.

For engineering leaders, the practical takeaway is that the bottleneck Meta describes (more diffs per developer, review that doesn't scale) tends to show up in any team that adopts code agents seriously. Sonar's numbers suggest a good part of the market already feels this friction without yet having a structured response like RADAR or GreenLight.

Translated from the Brazilian Portuguese original · Read the original