AI has a deep understanding of how this code works

An enormous AI-generated pull request to the OCaml compiler — including 13k+ lines of code and even misattributed copyright headers — has become a flashpoint for how open-source projects should handle machine-written contributions. Commenters highlight maintainers’ concerns: unclear provenance and licensing, lack of design discussion, huge review burdens, and the absence of a human author who truly understands and will maintain the code. Many see AI as a useful personal tool for one-off features but argue that merging such code into core infrastructure without rigorous human ownership, testing, and process will accelerate technical debt and erode trust in mature projects.

Context of the PR

  • A large PR (~13–22k LOC) added DWARF debugging support to OCaml, mostly generated by LLMs.
  • The submitter openly described prompting Claude/ChatGPT and having them also write the explanations, copyright analysis, and even markdown planning files.
  • The work appears influenced by an existing DWARF implementation in a forked compiler, which was also pointed at the AI as reference material.

Maintainers’ Concerns and Project Process

  • Core complaint: a massive, first-time PR with no prior proposal, design discussion, or buy‑in, in an area where others are already working carefully in smaller, reviewable steps.
  • Maintainers emphasized:
    • Too big for the small core team to safely review.
    • Insufficient tests for the amount and centrality of code.
    • Design issues (DWARF library tightly coupled into the compiler, long‑term tech debt).
  • Several commenters stressed that such a PR would be unacceptable even if written entirely by a human.

AI-Generated Code: Quality, Accountability, and Review Burden

  • Many maintainers report AI code is harder to review than human code: it looks polished, but signals of author competence and intent are missing.
  • Accountability problem: there is no evolving contributor behind the code, just one‑off artifacts; each PR might be disconnected from the last.
  • Reviewers reject the idea that their role is to deeply vet code that the submitter themselves doesn’t fully understand.

Copyright and Provenance Issues

  • Multiple files in the PR named another developer as author; the submitter’s answer (“AI decided, I didn’t question it”) became emblematic of the entire episode.
  • Commenters see this as a red flag about provenance and as evidence that LLMs can silently “adapt” or copy from nearby codebases.
  • Some argue accepting code with unknown origins is legally risky and socially corrosive, even if licenses are technically compatible.

Open Source Culture, Spam, and Platform Choices

  • Maintainers describe a growing wave of AI‑generated, “drive‑by” PRs from contributors seeking résumé material or attention.
  • Brandolini’s law is invoked: it takes orders of magnitude more effort to refute AI slop than to produce it.
  • Proposed responses:
    • Stricter contribution guidelines, explicit AI policies, and pre‑discussion requirements.
    • Rejecting AI PRs outright, or at least massive ones.
    • Moving away from GitHub or adding friction (self‑hosted repos, email patches, requiring local accounts) to filter out low‑investment contributors.
    • Encouraging AI enthusiasts to maintain their own forks or greenfield projects instead of offloading maintenance onto existing teams.

Views on “Good” Uses of AI

  • Some accept LLMs as personal tools: generating one‑off features for private forks, experiments, or non‑critical code, provided the user owns and understands the result.
  • Many draw a hard line at merging large AI‑generated features into mature, shared codebases without thorough human design, ownership, and review.

Reaction to Maintainers’ Conduct

  • Commenters widely praise the OCaml maintainers’ patience, clarity, and emotional maturity in handling the situation.
  • There is debate over whether such politeness scales, or whether harsher, more “Torvalds‑like” responses will become necessary as AI‑driven spam increases.