GreenLight AI Pull Request Reviews: What PyTorch Gets Right—and What Could Go Wrong
GreenLight automates selected pull-request approvals. It is an open-source PyTorch system that lets a tightly defined group of maintainers ask an AI reviewer to approve eligible changes, borrowing RADAR’s core rule: automate only low-risk work and send uncertainty back to people. That boundary matters.
I’m Ermenildo Valdez Castro, Jr., a Seattle-based engineer who has worked across large software organizations. I’ve seen review queues from both sides: a careful reviewer can protect users, but a pile of routine approvals can turn into a bottleneck. The hard part is deciding which changes are truly routine.
In my work at Google, Microsoft, Amazon, and Zulily, the important question was rarely whether software could produce a green check. It was whether the change deserved that check, who carried the risk, and what evidence could catch a mistake. GreenLight matters because its design makes those questions part of the process instead of pretending that an AI reviewer is always right.

What Is GreenLight?
GreenLight is an open-source system for reviewing and approving a limited set of PyTorch pull requests with a PyTorch-based AI reviewer. It does not offer automatic approval to every contributor, every file, or every change. Eligibility depends on PyTorch’s merge rules, which name maintainers who already have approval rights for the files they touch.
That restriction reflects a key premise of Meta’s RADAR system: the identity and trustworthiness of the change author matter. A model can inspect a code diff, but it cannot make an unfamiliar contributor trustworthy by itself. Frankly, that is a more grounded starting point than asking an AI to approve every pull request and hoping a confidence score catches the important exceptions.
Meta described RADAR, short for Risk Aware Diff Auto Review, in a paper published in May. The paper reports that significant lines of code per human-landed diff rose 105.9% year over year, while diffs per developer per month rose 51%. Meta attributes more than 80% of the increase to agentic AI assistance, and reports that the share of diffs reviewed within 24 hours is falling. The RADAR paper search on arXiv is a useful starting point for the reported system details.
RADAR’s response is deliberately narrow. It first sorts changes by author and source, then applies policy checks, a Diff Risk Score, and an AI review where appropriate. Some deterministic code changes can pass under a blanket policy; other automated changes have to clear the full set of gates. A failed check sends the change to a person, not to a more optimistic model prompt.
GreenLight brings the approach into PyTorch’s open-source work. A scheduled scan runs every five minutes and sends eligible pull requests into a reviewer workflow. A land verdict approves the PR and adds a label; a no-land verdict withdraws any previous GreenLight approval. The public description establishes those actions, but an approval should not be confused with a claim that GreenLight merges the code automatically.
People outside the eligible maintainer group still receive reviews in shadow mode. Those reviews can help assess the system, but they never count as approvals. The README also states that a reverted PR is removed from every path permanently. That is a tough rule, and a sensible one: a rollback is evidence that the system needs to treat that change as a failure, not just another example to learn from casually.
I have watched review queues grow when engineers were asked to approve safe, repetitive edits alongside changes with real behavioral risk. The backlog did not mean people had stopped caring; it often meant the process treated every diff as equally demanding. A clear safe lane can help, but only if the lane has guardrails and a simple exit back to human review.
Why Narrow AI Approval Matters
Automation can reduce review load without asking engineers to surrender judgment. The benefit comes from giving the AI a small, well-defined job, then checking whether it does that job reliably. Here’s the kicker: a smaller permission boundary can be more useful than a more powerful model with broad access.
- It returns time to reviewers. Maintainers can spend less effort on repetitive, low-risk changes and more time on design, security, behavior, and user impact. In large repositories, that division matters because every routine approval takes attention away from a change that may need careful thought.
- It puts trust rules in the open. GreenLight’s maintainer gate is visible and concrete: a real verdict depends on a merge rule that names the author. Teams can debate that policy directly instead of relying on vague claims that an AI system is smart enough.
- It offers a way to measure before granting power. Shadow mode lets teams compare AI decisions with human outcomes without turning the AI’s opinion into an approval. That is a useful brake. A system should earn permission with evidence, not receive it because a demo looked smooth.
- It can make routine work more consistent. A reviewer may be tired, distracted, or unfamiliar with a narrow pattern. A carefully bounded automated check can apply the same test each time, while routing uncertainty and failures to people who can investigate.
- It can preserve human attention for human problems. A reviewer should be able to focus on whether a feature helps users, whether a permission is fair, or whether a change risks private data. That stewardship of time and skill respects the dignity of the work; fewer clicks are not the goal by themselves.
I have watched review queues grow when engineers were asked to approve safe, repetitive edits alongside changes with real behavioral risk. The backlog did not mean people had stopped caring; it often meant the process treated every diff as equally demanding. A clear safe lane can help, but only if the lane has guardrails and a simple exit back to human review.
That last condition matters more than the sales pitch. A system that approves quickly but cannot explain who was eligible, what it checked, or why it stopped is not saving engineering time; it is moving risk somewhere harder to see. GreenLight’s visible rules and shadow reviews make it easier to ask for that evidence.

How to Implement a GreenLight-Style Review System
Start with policy, not a model. Teams often want to begin by choosing an LLM, but the harder questions are who may receive automated approval, which files are in scope, and what happens after the tool finds risk. A model cannot make those decisions for you.
- Write down the eligible author and file rules. Name the maintainers who already have approval rights, then make those rights specific to the files or code areas they own. Avoid a broad rule such as trusted engineers can use automation. In GreenLight, a merge rule naming the PR author is what makes the difference between a real verdict and shadow review.
- Choose a small first category of changes. Begin with changes that have a clear, limited effect, such as safe refactoring, dead-code removal, logging additions, or tests that do not alter production behavior. Meta’s RADAR paper describes these as examples of safe patterns. Do not quietly include dependency upgrades, permission changes, or changes to security-sensitive code just because the diff is short.
- Set hard exclusions before scoring risk. Decide which areas must always go to a human. Meta’s design excludes open-source code, SOX-scoped code, and code requiring extra review from automatic approval. It also applies strict history and volume conditions to runbooks. Your own protected areas may differ, but the rule should be written down and enforced before the AI reviewer weighs in.
- Use shadow mode to test decisions. Run the reviewer without granting approvals, then compare its calls with human reviews, reverts, and later incidents. Keep separate records for false approvals, needless human escalations, and changes the model missed. At Microsoft, I learned that a passing test is a clue, not proof that a system is safe under the real traffic and edge cases it will face.
- Add a risk gate that can reject work. RADAR uses a Diff Risk Score as a percentile gate: the paper describes a threshold up to the 50th percentile for allowlisted runbooks, 20th for other AI and bot sources, and 5th by default for human-authored diffs. Treat those figures as Meta’s reported settings, not universal magic numbers. A safe policy should let organizations tune thresholds and send borderline changes to people.
- Give the reviewer strict acceptance criteria. RADAR’s review agent examines the actual change and looks for safe categories. The paper sets a high bar: automatic acceptance requires a confidence score of at least 8 out of 10, with all changes classified as safe. Even then, confidence is not a guarantee. Require a clear reason for each decision and reject mixed or ambiguous changes.
- Keep a delay and a human escape hatch. Meta’s paper shows approved bot changes waiting in a configurable landing queue, with a 24-hour delay in its diagram, so a person can reject a change before it lands. A queue also gives maintainers time to inspect notifications and catch an obvious problem. Do not remove the review window until you have evidence that the risk is acceptable.
- Measure outcomes and tighten the rules when needed. Track the number of eligible PRs, approvals later withdrawn, reverts, human overrides, and incidents. GreenLight’s documented five-minute scan cadence and permanent exclusion of reverted PRs make system behavior easier to observe. Keep the scorecard understandable; if maintainers cannot tell what the system is doing, they cannot govern it well.
For teams using GitHub, its documentation explains how pull-request reviews and approvals work in the normal workflow. Google’s code review guidance is also a helpful reminder that review quality depends on the change, not just the button a reviewer clicks. Those practices do not replace RADAR-style risk controls, but they help define the human process automation must fit into.
GreenLight vs. Meta RADAR
GreenLight and RADAR share the same basic idea: automatic review should be reserved for carefully selected changes. They are not the same deployment, though. RADAR is Meta’s internal system as described in its paper; GreenLight is an open-source PyTorch implementation shaped around PyTorch’s own maintainers and merge rules.
| Area | GreenLight | Meta RADAR |
|---|
| Main setting | PyTorch open-source pull requests | Meta’s internal code-change workflow |
| Who can get a real approval | Maintainers named in the relevant merge rule | Eligibility depends on author, source, and internal policy |
| Review path | Five-minute scan, reviewer workflow, land or no-land verdict | Safety checks, Diff Risk Score, then RADAR Review Agent where required |
| Out-of-scope work | Non-eligible PRs stay in shadow mode | Open-source, SOX-scoped, and extra-review code is excluded from automation |
| Revert handling | Reverted PRs are permanently dropped from every path | The paper describes ongoing monitoring and threshold tuning |
| Landing protection | A land verdict approves and labels the PR; do not assume it merges the code | Approved bot diffs wait in a configurable queue; the paper diagram shows 24 hours |
The table shows a shared philosophy, not identical machinery. GreenLight’s public description makes its author gate, scan cadence, verdict behavior, and revert rule clear. Meta’s paper describes more of the risk-scoring pipeline, including source categories, percentile thresholds, and hard safety checks. Do not assume that every internal Meta control appears in GreenLight just because the project borrows RADAR’s name and core approach.
That distinction is useful for engineering teams considering a copy. An open-source implementation can help people inspect and adapt a design, but a repository does not prove that the design fits every organization’s legal, security, or reliability needs. The PyTorch GreenLight repository is the place to inspect its public behavior; Meta’s published paper is the better reference for RADAR’s reported internal controls.
For broader risk management, the NIST AI Risk Management Framework offers guidance on identifying and managing AI-related risks. It does not certify GreenLight or RADAR, and it should not be presented as doing so. It is useful because it reinforces a plain principle: define risk, assign responsibility, and keep checking results after deployment.

Common Mistakes to Avoid
The most common mistake is treating AI approval as a faster version of human approval. It is not. It is a separate permission that should be granted only to a narrow set of authors and changes, with clear rules for stopping the process. Let’s be real: if the policy is fuzzy, a better model will not fix it.
- Giving the model authority before measuring it. A clean demo can hide missed edge cases, weak tests, and uneven performance across code areas. Use shadow mode first, collect examples, and decide what counts as a bad decision before the system can approve changes. Otherwise, we will monitor it can become an excuse for skipping the hard work.
- Using confidence as the whole safety plan. A score of 8 out of 10 sounds precise, but it is only one condition in RADAR’s reported acceptance rule. Its agent also has to classify all changes into safe categories. Confidence should be one gate among several, not a magic stamp.
- Letting a trusted author make every change eligible. Trust in an author does not make every file or change low-risk. A maintainer can make a mistake, and a safe edit can become risky when it touches access control, customer data, or a release process. Separate author eligibility from change eligibility.
- Ignoring changes outside the approved group. Shadow reviews are not real approvals. Keep that distinction visible in dashboards and notifications so nobody mistakes a model comment for permission to merge. If the UI makes shadow mode look like a green light, the interface has weakened the policy.
- Treating a revert as a routine cleanup. A revert can reveal that a change caused harm, that a test missed something, or that the reviewer’s safe category was too broad. GreenLight’s permanent exclusion rule is strict for a reason. Investigate the failure and make the system safer before proposing a new path for similar changes.
- Skipping the waiting period. A delay gives maintainers a final chance to catch an issue. Removing it may save hours, but it also removes a human correction window. Keep the pause until real operational evidence supports a change, and be honest about what that evidence covers.
- Counting approvals instead of measuring harm. A high approval count is not a success measure. Track reversals, escaped defects, incidents, and reviewer overrides, then compare them with the work saved. I have seen teams celebrate faster throughput while the people fixing regressions quietly paid the bill later.
Good governance is not red tape for its own sake. It is the ordinary duty to protect users, coworkers, and the shared codebase from avoidable harm. A review system earns trust by showing what it can safely do, admitting where it cannot, and handing uncertain work to a human without fuss.
Frequently Asked Questions
Can any PyTorch contributor receive an automatic GreenLight approval?
No. A PR gets a real GreenLight verdict only when a PyTorch merge rule names its author. Other contributors’ PRs may receive reviews in shadow mode, but those reviews do not become approvals. That separation keeps the system within the authority maintainers already hold instead of using an AI model to grant new authority.
Does GreenLight merge a pull request automatically?
The reported GreenLight workflow says a land verdict approves the PR and adds a label, while a no-land verdict withdraws any earlier GreenLight approval. That description does not establish that GreenLight merges the code. Keep the terms separate: approval is one action, and merging is another part of a repository’s workflow.
How often does GreenLight check pull requests?
The documented scan runs every five minutes and sends eligible PRs to the reviewer workflow. A no-land verdict can remove an earlier approval. The README also says a reverted PR is dropped from every path permanently, so a reversion is not simply treated as a temporary failure to retry.
Is AI approval safe for production code?
It can be reasonable for a limited class of changes when eligibility is narrow, high-risk areas are excluded, the reviewer has strict criteria, and people can stop or reject the process. Meta’s RADAR design adds safety checks, risk thresholds, review, and a landing delay. None of that makes mistakes impossible; it makes the permission smaller and the failure paths clearer.
Final Thought
GreenLight is interesting not because it proves that AI can replace code reviewers, but because it refuses to make that claim. It asks a smaller question: can an AI reviewer safely approve a narrow class of changes by maintainers who already hold the relevant authority? That is a question teams can test with real outcomes, visible rules, and a way to stop when the evidence turns bad.
I’m glad to see an open-source project make the boundaries part of the story. In engineering, speed is useful only when it serves the people who rely on the software. A review system should take care of repetitive work without treating human judgment as waste, and it should protect the dignity of the work by leaving the hard calls to people who understand their consequences.
If a team adopts this approach, start small, measure carefully, and keep the human escape hatch easy to use. The best automated approval is not the one that says yes most often. It is the one that knows when to say no.