I have not had much experience viewing code that an AI might produce. I have experience trying to review code made by humans and organizations over the years. And what stands out for me is when code is properly documented using both documents alongside it and well-chosen names of variables and functions as well as a reasonable amount of comments embedded within the code including explaining what is expected at each point and what errors might propagate through.
I have also had experience looking at mathematical proofs and note times an argument fails because something that is shown to be true in a limited domain is used in a way that goes outside the domain, and other such errors. If an AI writes code and it is not documented and commented and uses variable names like A1263 alongside A1264 that are meaningless, or uses names for the same things that differ in different sections of code and have to be transitioned into each other, you can not only have subtle errors but need lots of time to evaluate the code and see if you understand it well enough to make a judgment. Some mistakes can be hard to detect like a function argument whose default is FALSE while the AI-generated code does not to mention the argument, let alone set it to TRUE as one example that happens with humans too. A far bigger problem, in my mind, is that an AI might produce perfectly valid code except that it is doing what was asked by someone who supplied incomplete or wrong information. Humans learning a language often write fairly simple and direct functions but when used in a real product, the code used tends to be much more detailed and does things like check if it gets all the arguments it needs, makes sure they don't clash in some ways and follow various "business" rules, checks to make sure error conditions are either caught or propagated or even stops the program and so on. Many fairly simple-sounding functions end up being written as fairly impenetrable code full of "try" statements nested deeply and often enough using accessory functions tailor made versus reusing a more general function that is also used elsewhere. No doubt machine-generated code can improve over time if the program is carefully told what is needed and also asked not to make isolated pieces of a project but to fairly seamlessly make the whole thing at once. A really good set of requirements is needed if you want all parts of the program to create a small set of exceptions, for example, and use them consistently. Of course, if performance is not that big a deal breaker, pieces cobbled together may be tolerable if the code is produced faster. I note some of the blame for the many outages in the U.S. and worldwide now is not just on hackers or even AI breaking things but on the fact that corporations are taking short-cuts to amend or enhance fairly complex systems that already are not easy to understand and simply patching it by a program that probably is not supplied with enough information. I have been in projects where I found amazing spaghetti code that had been patched many times to accommodate exceptions and new features and changed requirements that was very hard to troubleshoot. I looked at it and suggested we think carefully of what the current rules were as well as use newer technology (meaning libraries of code or changes to the programming language) to more cleanly parse things like MTA headers and abandon the old mess. Of course, we should compare how the new version parsed things compared to the old and unfortunately, we had to ask if breaking existing results (that should not have been there but were side effects of the many patches) was necessary. In one sense, the discussion here about AI and writing programs has been discussed elsewhere, and lately by Mathematicians, who ask if their role may become one of looking at a proof by an AI and figuring out what exactly it does and how to explain it in ways others might understand. And, of course, the goal includes verifying the proof is VALID. Programmers have similar responsibilities and we know what can go wrong when a program is not right and especially when it is critical for people around the globe but cannot easily be tested by building a second internet with billions of ... But for R, consider what happens if instead of getting bug reports or suggested fixes of 5 or 50 a year, we get 50,000. There is no money or staffing to do more than fix a relative few and most of the reports sent in may be duplicates of a sort (such as two or more users asking multiple AI to find potential problems and all being reported independently) or finding such obscure potential problems that fixing them would not be a priority. AI can drown us. -----Original Message----- From: R-devel <[email protected]> On Behalf Of Kevin Ushey Sent: Saturday, November 21, 2026 9:19 PM To: [email protected] Cc: [email protected] Subject: Re: [Rd] Note in bug reporting guidelines on AI use Hi Luke, Thanks for putting this together. Some thoughts from someone who now finds AI a fairly indispensable part of his workflow... I think it's more important to put weight on verification than disclosure. Modern AI tools can very effectively put together the pieces necessary for a patch to be reviewed: an explanation of the issue, the patch itself, tests, reproducible examples, and a summary of the environments where that patch was tested. For "clear" bugs (e.g. an out-of-bounds read), humans and AI tools will often converge on the same fix. When all of these pieces exist, and the submitter has checked them and can answer for them, I think it becomes less important whether the solution was produced with AI assistance. I might go further on one facet: if a bug is discovered and reported using AI tools, then the reporter _must_ include a reproducible example, a test, and a proposed patch in their bug report (or, where the right fix isn't clear, a description of the options). Otherwise, it will be easy to overload the bug tracker with reports that, while possibly highlighting "real" issues, would cost far too much of the R Core team's time to triage, discuss, and fix. The Linux kernel now asks much the same of AI-found bugs: https://docs.kernel.org/process/coding-assistants.html Patches that need to make choices in an open design space are where I think more explanation is warranted, e.g. "why did you choose this solution, and how did you weigh it against the alternatives?". Mindless use of AI tools could easily pick solutions that "work" without actually becoming a cohesive part of the code base, or impede future work on certain facets of the code base. At any rate, it's very important for me personally to be able to contribute to R without doing so in an anti-social or obstructive way. I think it's worth emphasizing, as the CRAN team does, that the most valuable resource is the core team's time, and any reports or patches prepared should not squander that. Thanks, Kevin On Fri, Nov 20, 2026 at 6:07 PM luke-tierney--- via R-devel <[email protected]> wrote: > > The Bugzilla bug reporting site has seen a significant uptick in > submissions, many AI assisted or generated. Some ground rules are > needed to keep the flow manageable. The bug reporting guidelines at > https://www.r-project.org/bugs.html now include a brief note on > AI-assisted reports and patches. If you are using, or are considering > using, AI tools for preparing reports or patches please have a look > and check back from time to time: this is very much work in progress. > > Best, > > luke > > -- > Luke Tierney > Professor Emeritus > Department of Statistics and > Actuarial Science > University of Iowa > 241 Schaeffer Hall email: [email protected] > Iowa City, IA 52242 WWW: http://stat.uiowa.edu > > ______________________________________________ > [email protected] mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
