AI-generated Drupal code that passes every test is what worries me most
https://menetray.com/en/blog/green-tests-arent-enough-thats-why-my-ai-goes-through-audit
Models often fall back on D7/D8-era patterns: \Drupal::service() instead of dependency injection, |raw in Twig, render arrays without cache metadata. Most of it works, and tests don't catch it.
So my agents now run the Audit module's Drush commands on whatever they touch (complexity, duplication, Twig, security, PHPStan, PHPCS), fix what comes up and run them again. Then I do the final review. Full disclosure, I maintain the Audit module.
What are you checking beyond tests in your AI workflow?
[link] [comments]