· AI dev tools

PyTorch GreenLight enables AI reviewer auto-approval for maintainers' pull requests

The system now allows an AI reviewer to grant approval for pull requests originating from its own maintainers within PyTorch, a development stemming from Meta's work on automating code review.


This capability, known as GreenLight, represents an open-source adaptation of RADAR, the proprietary system Meta employs to integrate low-risk code modifications without requiring human intervention. This advancement arrives as Meta, alongside OpenAI, Anthropic, and Sonar, are all discussing methods for automating the approval process itself.

RADAR, which stands for Risk Aware Diff Auto Review, was detailed by Meta in a publication released in May. The impetus for this development stemmed from a capacity crunch: the volume of code lines per human-accepted diff increased by 105.9% year-over-year, while the number of diffs submitted per developer each month rose by 51%. Meta attributes over 80% of this surge to assistance provided by agentic AI. Consequently, the pace of review has lagged, causing the percentage of diffs reviewed within a 24-hour window to decline.

The authors of the work describe their solution with specific limitations in mind. Instead of aiming to replace the entirety of code review, RADAR focuses its automation efforts on those diffs that meet stringent safety standards. Initially, RADAR categorizes every diff based on its author and origin. Certain changes, specifically deterministic codemods, can receive blanket policy approval, bypassing individual AI review. For AI-generated codemods and automated runbooks, they must traverse a sequence involving safety checks, a Diff Risk Score, and an LLM reviewer. Should any check fail, the diff is routed to a human reviewer.

The safety checks implemented are defined as absolute boundaries. Code designated as open-source, code falling under SOX regulations, and code requiring extra scrutiny are automatically excluded from consideration. Furthermore, runbooks must demonstrate a flawless 60-day track record, exhibiting no production incidents alongside low rates of rejection and reversion. These automated runbooks are also limited to a maximum of 2,000 diffs daily.

The Diff Risk Score functions as a percentile gatekeeper. Runbooks that have been pre-approved can push diffs up to the 50th percentile of risk. For other sources of AI and bot contributions, the limit is set at the 20th percentile. Human-submitted diffs are defaulted to the 5th percentile, though each organization maintains the ability to customize its own thresholds. The final checkpoint is the RADAR Review Agent, which examines the actual modifications. This agent searches for secure patterns, such as the removal of obsolete code, refactoring that maintains behavior, the addition of logging, and the inclusion of new tests.

The paper establishes a rigorous standard for this agent. For a diff to be accepted automatically, the ACR mandates a confidence score of no less than 8 out of 10, and every modification must be categorized within a safe class. Approved bot diffs do not immediately integrate; instead, they reside in a queue awaiting a configurable delay, which the paper illustrates as 24 hours in its pipeline diagram. During this waiting period, a human still retains the authority to reject the diff. Meta also continuously monitors this flow, adjusting its thresholds over time.

In May, PyTorch announced its intention to make RADAR available openly. In a devlog entry, Edward Yang noted that "the RADAR approves are good" when used internally by Meta, and he established the foundational principles that shape GreenLight presently. Because RADAR is built upon the premise of trusting the author, RADAR approvals are restricted to PyTorch maintainers who already possess approval rights for the files being altered. GreenLight adheres to this principle; its approved group consists of individuals listed in PyTorch's merge rules. A pull request only receives a definitive judgment when a merge rule names its author. All other submissions undergo a shadow review, and these shadow reviews never translate into actual approvals. A scan executes every five minutes, routing eligible PRs into a reviewer workflow. A "land verdict" officially approves and labels the PR, while a "no-land verdict" cancels any prior GreenLight approval. The README further specifies that "a reverted PR is dropped from every path, permanently."

OpenAI presented a comparable policy during QCon in San Francisco in 2026. Brian Yang, a member of technical staff at OpenAI, mentioned that some engineers started developing ChatGPT Ads utilizing Codex in November 2025, and the resulting codebase contains no human-written production code. Yang aligns approval with the nature of the alteration. Routine changes are automatically approved once the necessary checks are cleared, whereas critical alterations must undergo sandbox validation against a copy of production traffic before a human makes the final determination. His goal is to achieve at least 90% automated approval for standard PRs. The team refines its automated reviewer weekly by studying previous approvals, blocks, and instances of missed failures, then testing new thresholds against historical data. If an excessive number of substandard PRs are opened, they adjust the agent; if poor PRs continue to merge, they modify the checker.

Anthropic applies a similar concept to the actions performed by an agent within its Antique code review system. Sonar conceptualizes approval as an element within what it calls the agentic software factory. Manish Kapur, who serves as VP of product marketing and developer relations at Sonar, asserted that within a properly functioning factory, "the factory knows which changes can pass on automated evidence and which require a person to decide." The underlying rationale for this pressure is highlighted in Sonar's most recent developer survey. Out of over 1,000 respondents, 76% indicated they generate AI code faster than they can verify it, and only 39% consistently review it before committing.

The unifying concept across these approaches is scoped trust. Meta and PyTorch restrict approval based on author credibility and a calculated risk level. OpenAI bases its gate on the kind of modification, and Anthropic focuses on potential breakage from an action. In every instance described, system failures or rollbacks feed data back into the process. Those developers keen on exploring this subject matter further can consult the RADAR paper via this link, and GreenLight's source code is available here.

Why it matters

This development signals a broader trend in developer tooling where AI is taking on code review approval for routine changes. Developers should watch how these scoped trust models balance automation speed against the risk of merging flawed code.

Earlier coverage

Related coverage

Also worth reading

  1. next.js 16.6.0-canary.4 released, adding Go syntax highlighting and Node.js 24 unit tests
  2. TypeScript 7.1-rc released for developers to download on npm
  3. next.js 16.6.0-canary.2 released, adds file uploads, updates docs, and more
  4. next.js 16.6.0-canary.1 released with 405 for forbidden Route Handler methods
  5. Angular 21.2.27 released, fixes component template capture during compile