
What happened
An architect with 20年以上 of systems and DB experience reviewed code from Cursor, GitHub Copilot and Claude Code, naming five recurring flaws that pass tests but fail in production.
Why it matters
The write-up argues AI-generated code swallows exceptions so failed orders still commit, and leaves authorization gaps such as IDOR open, which can leak customer data and corrupt records in production.
Summaries like this, every morning.
Five specific smells are each paired with a "smelly" PHP/Laravel and SQL example, a mechanism for why it breaks, and a corrected version. The first targets swallowed exceptions: Laravel's DB::transaction() only rolls back when an exception reaches outside the closure, so a catch that returns false commits a half-finished order. The second concerns N+1 queries and search conditions that disable indexes — applying DATE_FORMAT or YEAR to created_at blocks the optimizer's range scan unless a function or expression index is declared. The third is calling a slow external payment API while holding a row lock and connection, which risks lock pileups and double charges when a timeout is retried. The fourth is missing authorization, where changing an order ID in the URL exposes another customer's data, and mass assignment lets a request body rewrite fields like status or price. The fifth is AI-written tests that mirror the implementation, so boundary and authorization cases stay untested. The closing section frames the human role as designing and inspecting three boundaries — error and transaction, data and performance, security and authorization — rather than hand-writing every line.
Pick your industry and the AI tools you use, and get news related to your work every day.
Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →
Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.
A commentary says US regulatory scrutiny of AI is shifting from chip exports toward the software layer, where…

A Zenn author summarized the Claude Certified Architect – Foundations Exam Guide into five decision axes, incl…

OpenSpec shipped v2.0.0 on November 11, 2026, removing the /opsx:* slash commands; for example, /opsx:propose…

In a paper by Princeton University and Snowflake researchers, Soteria checked agent plans with the Dafny verif…

On November 20, Vikas Kansal announced up to 50% off Google AI Plus and annual Google AI Pro for current AI pl…

A non-engineer working with Claude Code every day published 10 prompt templates in which the key instruction i…
