Revisiting commit-access criteria (2026)

This picks up a thread of discussion from RFC: Commit Access Criteria - #110 by MaskRay , which dblaikie reasonably suggested had run its course in its original context. Starting fresh here for a focused discussion.

Up front: I’m raising this because I think it matters, but I’m not in a position to drive it to a conclusion myself. I’m hoping the infra team or others who care about this can take it forward.

The current bar, 3 merged PRs + 2 supporters, is easy to satisfy in a way that doesn’t measure what the policy actually asks supporters to attest to. The Developer Policy says supporters confirm that “based on interactions on those reviews and elsewhere in the LLVM community they have no concern about you adhering to our Developer Policy and Code of Conduct.”

That’s a judgment about community interaction, IMO including: can this person identify the right domain reviewers, respond to review, and work with the project beyond their immediate goals. A merge count captures none of that. It’s possible to land three patches that needed substantial reviewer hand-holding and still not have demonstrated the thing supporters are signing off on.

A related point on single-employer vouching. When all supporters — and the likely future reviewers — come from one company, the community-interaction signal is structurally weak: coworkers can attest that someone collaborates well with coworkers, which isn’t the same thing. I don’t think this should be banned, but the criteria could acknowledge it as a weaker signal.

On “this hasn’t caused problems.” A common defense is that liberal commit access, including single-employer cases, has produced no developer-policy issues. I’d push back on what that measures. The costs of weak vouching mostly don’t surface as policy violations — they surface as maintainer burden.

  • Code that works for internal needs can land without engagement on broader architectural goals or edge cases the team doesn’t care about. I’ve been reviewing llvm-project for eight years, and across many modules I’ve seen the recurring pattern where contributors from a single company land code with company-specific assumptions, inconsistent style, or insufficient tests. This isn’t bad faith — it’s the natural consequence of a review loop that doesn’t extend beyond the team.
  • Vouching only from coworkers demonstrates the ability to collaborate with coworkers, not with the community.
  • With enough in-team committers, complex changes can land in a subsystem without the actual subsystem maintainer being engaged.

We should move toward a “substantial contribution” standard — demonstrated engagement with review rather than a merge count.

  • As a patch author: did you pick the right reviewers for the subsystem you’re touching? When you got review feedback, did you engage with it substantively, or wait for someone to fix things for you? Did your patches need heavy reviewer hand-holding to reach a landable state? Did you respond to post-merge problems your changes caused?
  • As a reviewer of others’ patches: do you review at all? Someone who only ever submits and never reviews hasn’t shown they understand the standards well enough to apply them to others, which is part of what commit access implicitly trusts you to do.

I don’t have a clean definition of “substantial”, which is part of why this needs more hands than mine. As an interim measure, even raising the fixed PR count would help.

In the agentic coding era, generating three patches that look landable is far cheaper than it used to be. A merge count was always a weak proxy for judgment.

13 Likes

IIRC, the reason we settled on a firm number (3 in this case) was because we previously couldn’t define what was sufficient, leading to inconsistencies. I would like us to have some form of fixed number, as a minimum for getting commit access. More commits might be required if the commits are low-quality/trivial/etc, but a hard minimum at least gives a level of clarity of how many might be needed.

I am broadly ambivalent on the exact number that is picked.

I have struggled with the wording here for many years and I support your efforts. I strongly agree that the static number of 3 in the era of agentic AI is basically equivalent to zero. Increasing the number would only benefit AI generated PRs and put an onus on real coding, which is the opposite that we want.

At some point we had a definition of substantial that wasn’t good enough, so we didn’t keep (and recently diluted) in the policy. At the time, “easy patches” were commits that only touched comments, or fixed typos, or mechanical refactorings (like changing a type or order of arguments) even if they touched thousands of files. Those were all considered “weak” evidence of developer quality.

Also back then, the criteria wasn’t to filter “nice people to work with”, but “responsible people to depend on to produce high quality code”. In the past, the “employer” route was not to promote nice co-workers, but a way to get a new joiner to contribute to LLVM after having passed some acceptable bar.

For a few months already, random developers are submitting LLM generated PRs and eventually merging and then requesting commit access as some kind of boy scout badge. They don’t come back to contribute to our project, just show it off on their Github page, presumably to impress future interviewers. I don’t blame them, this is on us.

There have been some recent examples of people being denied commit access because of this but it requires folks that know what’s going on to go and actively stop Tom from signing it off. This does not scale and it’s not reasonable to expect from the existing committers to filter that. That’s why we have policies and why we care so much about them.

LLVM has always been more open than any other large project that I know in that sense, and now we have thousands of active contributors and an increasing list of non-contributors. We clearly don’t have the problem of attracting talent, so IMHO, we need to start curbing abuse more strongly than we have been so far.

4 Likes

A few notes:

  • The 3 merged PRs are merely a minimum requirement to allow requesting commit access at all. The people reviewing the request can and should consider criteria beyond that. I don’t think we should be trying to determine “substantiveness” for the minimum requirement itself.
  • I do think that we should raise the minimum number of PRs, though not by much. It’s not easy to determine whether someone should be granted commit access based on a sample size of 3. I think commit access requests from people who only just meet the minimum also get rejected more often in practice.
  • We should probably be more clear on what reviewers should be looking for beyond the minimum PR requirement. For me “how burdensome was it to review PRs from this person” is probably the main criterion.
  • I would be careful about restricting single-employer vouching. Something to keep in mind is that a lot of corporate contributors to LLVM primarily contribute to a single backend. I think it’s expected and entirely reasonable that (for example) commit access for an AMD engineer working on the AMDGPU backend will be approved by other AMD engineers. I think it’s important to not add additional red tape for such cases.
8 Likes

The biggest problem so far has been how the expectations of different people affect the outcome. Without a check list, how can people consider criteria beyond number of commits? What criteria?

In the past what we have done is to describe potential examples being clear that was an incomplete list. This helps people from different backgrounds check for a similar set of criteria. As long as people can explain the rationale and it’s accepted by other members, we’re fine. We can also update the check-list as we go.

Some classic examples:

  • A non-substantial “fix-up” adds code that checks for a condition and bails, or adds a cast to a variable to silence a warning. When prompted, the developer reveals that the check was added after hours of debugging and extensive test was made to make sure it doesn’t break anything else around it. Is that now a substantial fix?
  • A substantial PR with changes to dozens of files adding a new target’s schedule. Upon inspection, this was just a copy-paste from another target with minimal changes to the values within. No tests beyond the new target were done/needed. Is this really substantial?

With agentic AI, both examples can be entirely done by copilots, in which case, should not count as substantial. Assisted, maybe fine?

Exactly. While burden is an interaction between two people without clear signal who’s generating the burden, if many people find the same author a burden to review, then it becomes a signal. However, 3 PRs merged is not enough to give any signal.

There are probably other checks we can do, but the key here is to add a check-list of these to the process before giving commit access. So, a developer may ask for access after N commits, but that doesn’t automatically qualify.

I’d word it in this way:

  • After N commits, a developer may ask for commit access, upon which extra checks will be done to make sure the developer and their code adhere to the LLVM standards & policies.
  • At least two existing committers must vouch for the developer and make clear why they’re vouching in the issue created.
  • (new) Maintainers will check against a list of requirements (explicit somewhere else in the same document) and should block the process if they find evidence of policy violation.
  • Infrastructure maintainers (currently only @tstellar) adds the developer to the committers list.
  • (changed) Committers without interaction (PR, review) for a year will have their access paused, after which a new substantial PR merged is necessary to re-gain access.
  • (changed) If the developer is found to breach the policy or code of conduct, their access will be rescinded and they must restart the process to gain access again. They must demonstrate that the issues have been resolved and won’t happen again.
  • (new) The existing committers that are approving new entries must be explicit why they’re accepting and must themselves verify that the conditions are met. Violations of this trust will be considered to have their own access removed.

This makes sure we don’t create a culture of quick inclusions than using this network to include more. Also demonstrates to the existing and new committers the expectations we have from their contribution. This will increase the number of “contributing members” and decrease the “badge collectors”, hopefully from the start.

In the age of Github PRs, there really isn’t a huge need for direct commit access to the repo to be a productive member of the project if you’re not going to invest a reasonable amount of time on it.

:+1:

4 Likes

It would be nice if we could let newer contributors assign reviewers without triage or commit access. I don’t know if Github actually lets you separate these actions however. I think if we want to tighten the commit access criteria it would be very beneficial to make it easier to work without it.

9 Likes

Another solution could be “review teams” which can be automatically assigned as reviewer by github if PR touches particular files.
E.g. libcxx review team is autoassigned if PR touches libcxx files.
Individual reviewers can be autoassigned through codeowners file as well.

1 Like

There are several people doing this now.

1 Like

“don’t surface as policy violations — they surface as maintainer burden.”

I can definitely attest to this as an issue, as someone who does a slightly broader set of reviews outside of my direct area I often come upon this issue. Usually post review commit gets them to fix things but I have definitely experienced strong push back on this in some rare cases and we don’t have good structural mechanism to deal with it. It stands out starkly b/c most of the time folks just do the right things and are good community members.

I don’t know if I have a good idea for what a better alternative criteria is though. Especially given the issues raised in other comments.

A few thoughts:

  • I think in most of these discussions, we tend to overrate commit access.

  • Any sort of evaluation of the ‘quality’ of a user’s contributions should be done by the two people who are supporting their commit access request and not by project admins. It is too much work for the admins to do this for each request.

  • I’ve been thinking that maybe any numerical criteria should be based on number of reviews conducted instead of number of commits. Some projects have a model where only the maintainers have commit access and I think moving towards this kind of model would be good for us.

2 Likes

Agree, and we need to hold these two to a higher standard, as they’re acting as gate-keepers to new committers. That’s why I think there should be consequences if they abuse of this trust by not verifying. The vouching needs to have a meaning, so that people do take all steps necessary and don’t just approve.

This is an interesting point.

With PRs and non-direct commits, the distinction becomes between “authors”, “reviewers” and “approvers”. Being a good author doesn’t make you a good reviewer, and a good reviewer doesn’t mean a good approver. Not sure if Github allows such a fine grained classification, though, and I’d hate to overstep.

Basically, anyone can be an author. Good reviewers spot problems and give good feedback / work items. But approvers (the equivalent of an old comitter) need to verify much more than just the code, and look at the broader implications, test coverage, hidden assumptions, etc.

Since there’s no evidence of the latter until you start approving things, I’d say a mix of good PRs and good reviews can be considered preliminary evidence. So, a larger N that can be matched against either authorship and reviews.

Number of reviews outside of their organization would be a better criteria IMHO b/c many only do reviewers for the fellow coworkers which feels like less of a good measure b/c we are back to the same problem originally raised. They know how to work well within their org but not with the rest of the community.

1 Like

+1: Personally I think “commit access” is too overloaded in the current PR workflow.

Similarly for merging: I don’t believe there’s any inherent reason to require (already overloaded) reviewers to manually merge approved PRs. I’d imagine PyTorch workflow may be of interest; cf. https://github.com/pytorch/pytorch/wiki/Typical-Pull-Request-Workflow, https://github.com/pytorch/pytorch/wiki/Bot-commands#merge

  1. Both you (the contributor) and the reviewer(s) are able to merge the PR. Once a reviewer has approved the PR, you may merge the PR unless otherwise noted.
  2. To merge a PR, comment @pytorchbot merge on the PR. See here for a list of other bot commands.

A similar command to assign reviewers (either from the area reviewers, llvm-project/llvm/Maintainers.md at main · llvm/llvm-project · GitHub, libcxx-style CODEOWNERS solution, or even automated sourcing via git blame on the affected lines of code in the patch looking for the most common contributors?) would also remove some of the friction from the workflow.

Edit: Load balancing is another valuable aspect worth considering: Automation could allow to exclude already overloaded folks (say, involved in N+ reviews over the past D days) from the reviewers candidate pool (relieving the burden on the review side) and notify the PR authors if no reviewers are currently available (that way newcomers know that the reason no one is replying to their patch is not necessarily that there’s anything inherently wrong with it, but folks are simply overloaded; this may be not obvious to the first submitters in particular; that, and a message “please check back in about 2-5 weeks based on the usual reviewer timeframe” or even “your review is in position #52 in the review queue for this area” could help tremendously).

// Only on a side note as this is orthogonal to the above, I’ve found this to be a thoughtful post, OSS code review, in the era of LLMs : ezyang's blog

5 Likes

The approval bit on a PR is sticky even if the author pushes new changes (unless a review is manually re-requested). If everyone had merge rights on approved PRs, a malicious author could put up a good PR, get approval, make arbitrary changes and then submit a bad commit.

@thurston I don’t think TOCTOU is a problem given a simple enforced gating: No merge if any post-approval changes; re-approval required.

Many people currently approve with comments. If the person has commit access, we trust that they will address the comments before merging.

3 Likes

All good questions! Perhaps it would be helpful to elaborate on the existing implementation, just to clarify how this works in practice: https://github.com/pytorch/pytorch/blob/main/SECURITY.md

More widespread write access to the repo presents challenges when it comes to reviewing changes, merging code into trunk, and creating releases. Protected branches are used to restrict the ability to merge to the trunk/release branches only to the repository administrators and merge bot. The merge bot is responsible for mechanistically merging the change and validating reviews against the path-based rules defined in merge_rules.yml. Once a PR has been reviewed by person(s) mentioned in these rules, leaving a @pytorchbot merge comment on the PR will initiate the merge process. To protect merge bot credentials from leaking, merge actions must be executed only on ephemeral runners (see definition below) using a specialized deployment environment.

These are relevant:

TOCTOU: The merge command must carry a comment ID. trymerge.py (see above) uses it to reconstruct the PR head SHA at the time that comment was posted (get_commit_sha_at_comment), then refuses to merge if the PR head has changed since. Thus a post-approval push forces a fresh merge command and full re-evaluation. (Skipped for ghstack PRs, which already require write access.)

Conditional approvals: PyTorch relies on the trust model that listed approvers will resolve their comments before merging. However, the bot doesn’t actually read GitHub’s approval flag. Instead, it re-derives approvals in find_matching_merge_rule: for each rule in merge_rules.yaml it checks all changed files match the patterns, then intersects the rule’s approved_by list (expanding org/team entries) with who actually approved. Only an explicit approved review from a listed person counts (comment-only reviews don’t), but an approval left with comments still counts as approval. So here we could either change (our custom version of) the bot to only accept an explicit approved review comments with words like “unconditional” or adjust the workflow to use comment(-only) or changes-requested reviews when changes are actually requested.


FWIW, here’s the analogue https://github.com/pytorch/pytorch/blob/main/.github/auto_request_review.yml using https://github.com/necojackarc/auto-request-review (but that could admittedly use more features as I’ve mentioned in the previous comment).

I often do post commit review which is no less valid but I have seen push back for what I would consider really basic stuff and they almost exclusively happen to be exactly from the users identified by the OP. This is my experience, It could be others in different areas have different experiences.

Thanks for bringing this up, I agree we should probably reconsider how manage project permissions.

Fundamentally, the skill we want to evaluate is technical judgement, i.e. the ability to review and evaluate code, to assess its quality, relate it to the overall design of LLVM and its subcomponents, and evaluate tradeoffs between different values. Individual contributors using LLMs need this skill to evaluate LLM output, and you need this skill to review and approve PRs from other contributors. Therefore, if we’re granting approval power rights, I think we should be tracking PR reviews, not PR contributions. The scarce resource for the project is engineering judgement, not the ability to manufacture small contributions.

Taking that as the goal, I imagine moving to a system that looks like this:

  1. triagers → contributors: This is the entry-level community role that replaces our liberal commit access policy today. This grants the right to communicate in our spaces, comment on issues, update labels, and assign PR reviewers. This is important work and a way to build a track record of demonstrating judgement.
  2. committers → approvers: This is the set of people who have the power to push the merge button in github. We can bikeshed the name, but “commit” is legacy SVN terminology at this point. An approver can approve PRs that don’t raise any design questions that would go to a maintainer, i.e. NFC refactorings, build fixes, obvious stuff. You want to spread these rights widely to avoid bottlenecking on maintainers.
  3. junior maintainer / apprentice maintainer / provisional maintainer: This is someone who wants to become a full maintainer, and has a designated maintainer mentor. The junior maintainer does PR pre-review, and then hands it to the senior maintainer to evaluate. The senior maintainer evaluates their work, reviews the PR, points out design issues they missed, and coaches them in what a maintainer needs to look out for.
  4. maintainers: This role stays the same. They are responsible for things listed in the developer policy today, and they generally resolve design questions. Disagreements get escalated further: lead maintainer (if they exist), area team, Discourse RFC, project council.

Those are the roles I envision having. The criteria to achieve them would be:

  1. contributor: Literally, anyone who asks. If a contributor repeatedly makes low-quality forum or issue tracker contributions, community members can use the moderation reporting tools to report the comments, and they can lose their status.
  2. approver: This is the crux of the proposal: the new criteria is 3 separate instances of PR or issue comments demonstrating good technical judgement, vouched for by two existing approvers, one of whom has a different organization affiliation (i.e. does not share an employer).
  3. junior maintainer: Any approver who asks can be granted this status, so long as an existing maintainer agrees to mentor them and evaluate their work and deem it helpful.
  4. maintainer: Status granted when mentor signs off on junior maintainer work.

I could imagine dropping the junior maintainer program out of this proposal, and just start with the first two tiers, since those directly modify existing roles that we already have, but it’s an idea I’ve had for a long time that I wanted to share.

I admit I haven’t read the other replies on this thread, so I’ll go do that now, but I’m curious what people think about this alternative model, where we stop evaluating contributions, and instead evaluate reviews.


The last thing I should mention is that we need to make this process efficient for github admins and maintainers. We’re sort of running a low-overhead CLA/DCO process here, where we want new contributors to read our policies, agree to them, record their signature, and get two other contributors to sign that they evaluated their work, and record their signatures.

I now have first hand experience doing this, and I’ve seen some push and pull between the github admins and maintainers. As a github admin, I want to push down all of the pre-review work to maintainers who I trust, and as a maintainer, I want to avoid excessive additional review paperwork. We as github admins need to be confident that maintainers really did the work of evaluating a potential new approver. We’ve had some back and forth about whether :+1: is a sufficient indicator of approval. In the infra area team meeting, we’ve discussed requiring maintainers to copy-paste a sentence, just so it’s crystal clear what the maintainer’s responsibilities were when they approved the new approver. These are all just different flavors of a “signature”. On the other hand, if we make the new contributor ticket text clearer and pick a hyper-specific emoji, I would be fine using that as the official signature / stamp of approval.

These are merely logistical concerns, so if you have feedback on this, maybe it’s best to load it into the infra area team notes doc, and we’ll get to it two weeks from now.

8 Likes

Overall, a change in nomenclature is welcomed. But I’d like to make sure we’re more explicit on expectations and roles than we used to be.

Is this a replacement for “access to forum/chat”? Then I agree. Github needs no access to open/comment on issues, PRs, so it should be fine.

Usually, I would not bother with this classification, but the item below makes it necessary:

This is crucial to make sure they don’t trip on our various policies while making their first contribution. I’m not saying everyone will read every policy, but now the onus is on them for having accepted the terms and not followed it.

I’m sure there’s some automated process that we can have that has zero admin cost, probably even automatically done.

A few issues:

  • Do “approvers” have the permission to merge the PRs? With “one approval” policy, we still have the same problem.
  • May be hard to define what “good technical judgement” is, may lead to bad discussions. Need in writing.
  • Different affiliation is hard to check when there’s no affiliation. Still open for badge hunters to help each other.

This could be a program, not a role. They’re still approvers, just being mentored to become maintainers. Usually, by the time they’re “ready”, you’d expect people in the community would recognize the name and there will be no discussion.