Meta Brings Code Review Auto-Approval More Mainstream with PyTorch GreenLight

PyTorch now lets an AI reviewer approve pull requests from its own maintainers. GreenLight is an open-source take on RADAR, the system Meta uses to auto-land low-risk diffs after safety checks, a risk score and an LLM review. OpenAI, Anthropic and Sonar describe similar ways to automate approval while keeping humans on risky changes.

Tác giả
Andrew Hoblitzell Show moreShow less
Đăng bởi
InfoQ
Ngày đăng
Độ dài
845 từ · 4 phút
Meta Brings Code Review Auto-Approval More Mainstream with PyTorch GreenLight

GreenLight has started letting a PyTorch AI reviewer approve pull requests from its own maintainers. It is an open-source take on RADAR, the system Meta uses to land low-risk code changes without waiting on a human. The move comes as Meta, OpenAI, Anthropic and Sonar all describe ways to automate approval itself.

RADAR stands for Risk Aware Diff Auto Review. Meta described it in a paper published in May. The paper starts from a capacity problem. Significant lines of code per human-landed diff rose 105.9% year over year, and diffs per developer per month rose 51%.

Meta attributes more than 80% of that increase to agentic AI assistance. Review has not kept pace, and the share of diffs reviewed within 24 hours is dropping. The authors describe their response in narrow terms.

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

RADAR sorts each diff by author and source before anything else. Deterministic codemods can be approved through a blanket policy and skip per-diff AI review. AI-generated codemods and automated runbooks go through a pipeline of safety checks, a Diff Risk Score and an LLM reviewer. Any failure sends the diff to a human.

RADAR pipeline for AI and bot diffs. Source: Meta, "Automating Low-Risk Code Review at Meta" (arXiv2605.30208)

The safety checks are hard limits. Open-source code, SOX-scoped code and code that needs extra review are never eligible. Runbooks must show a clean 60-day record, with zero production incidents and low revert and rejection rates. They are also capped at up to 2,000 diffs per day.

The Diff Risk Score works as a percentile gate. Allowlisted runbooks can land diffs up to the 50th percentile of risk. Other AI and bot sources stop at the 20th. Human-authored diffs default to the 5th, and each organization can tune its own thresholds.

The last gate is the RADAR Review Agent, which reads the actual change. It looks for safe patterns such as dead code removal, refactoring without behavior change, logging additions and new tests. The paper sets a strict bar for the agent.

For a diff to be auto-accepted, ACR requires a confidence score of at least 8 out of 10, with all changes classified into safe categories.

Approved bot diffs do not land at once. They wait in a landing queue for a configurable delay, shown as 24 hours in the paper's pipeline diagram. A human can still reject a diff during that window. Meta also monitors the funnel and tunes thresholds over time.

PyTorch said in May that it would rebuild RADAR in the open. In a PyTorch devlog, Edward Yang wrote that "the RADAR approves are good" in Meta's internal use. He also set the rule that shapes GreenLight today.

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.

GreenLight follows that rule. Its cohort comes from the people listed in PyTorch's merge rules. A PR only gets a real verdict when a merge rule names its author. Everyone else is reviewed in shadow mode, and those reviews never become approvals.

A scan runs every five minutes and sends eligible PRs to a reviewer workflow. A land verdict approves the PR and labels it. A no-land verdict withdraws any earlier GreenLight approval. The README adds that "a reverted PR is dropped from every path, permanently."

OpenAI described a similar policy at QCon San Francisco 2026. Brian Yang, member of technical staff at OpenAI, said a few engineers began building ChatGPT Ads with Codex in November 2025, and the codebase has zero human-written production code.

Yang matches approval to the change. Everyday changes are auto-approved once required checks pass. Critical changes must pass sandbox validation against a copy of production traffic, and then a human decides. His target is at least 90% auto-approval for routine PRs.

The team tunes its automated reviewer every week. Engineers read past approvals, blocks and missed breakages, then test new thresholds against history. When too many bad PRs open, they fix the agent. When bad PRs keep merging, they fix the checker. Anthropic applies the same idea to the actions an agent takes while it works with its Antique code review system.

Sonar frames approval as part of what it calls the agentic software factory. Manish Kapur, VP of product marketing and developer relations at Sonar, wrote that in a well-run factory "the factory knows which changes can pass on automated evidence and which require a person to decide." Sonar's latest developer survey shows the pressure behind that. Of more than 1,000 respondents, 76% said they generate AI code faster than they can verify it, and only 39% always check it before committing.

The common thread is scoped trust. Meta and PyTorch gate approval on author trust and a calibrated risk score. OpenAI gates it on the type of change, and Anthropic on what an action could break. In each case, reverts and misses feed back into the system.

Developers interested in learning more can read the RADAR paper here and find GreenLight's source here.

Bài viết này từ đâu mà có

Bài viết này do Andrew Hoblitzell Show moreShow less đưa tin và được InfoQ đăng lần đầu vào 27 tháng 11, 2026. HUE Legacy Ventures không phải tác giả của bài viết.

Carried in full with attribution and a link to the original. Rights remain with the publisher, who may request removal at any time.

Đọc tại infoq.com →