Rules regarding AI-generated patches

1 min read Original article ↗

Big and small free/open-source projects have been fac­ing an avalanche of AI-gen­er­at­ed patch­es late­ly. Some patch­es are more or less OK, oth­ers have con­vo­lut­ed, bad­ly designed code. The net effect is that code review becomes more dif­fi­cult, to the point where numer­ous projects give up and intro­duce some form of pro­tec­tion against AI slop.

The team start­ed with a dis­cus­sion on GitHub and had a fur­ther con­ver­sa­tion at a recent bi-week­ly dev call. Fol­low­ing that, Reqre­fu­sion updat­ed the con­tri­bu­tion guide­lines to include two new claus­es around AI-gen­er­at­ed code. Here they are:

  • Con­tri­bu­tions must meet exist­ing qual­i­ty stan­dards. Raw AI out­put is not accept­ed under any cir­cum­stances. AI may be used only as an assis­tive tool; in all cas­es, the result­ing con­tent must be reviewed, val­i­dat­ed, and jus­ti­fi­able by the con­trib­u­tor. The con­trib­u­tor should be able to explain design and code deci­sions, answer review­ers’ ques­tions, and ensure that AI use does not waste review­ers’ time dur­ing review. That being said, the use of AI is not rec­om­mend­ed under any cir­cum­stances or in any manner.
  • The con­trib­u­tor pro­vides rea­son­able assur­ance that the con­tri­bu­tion does not infringe third-par­ty copy­rights or license terms.

All pull requests must meet these requirements.