logoalt Hacker News

CodingJeebus • today at 1:45 PM • 4 replies • view on HN

I literally just patched an AI-generated API endpoint on a new service at work that shipped without any auth whatsoever, because AI was re-implementing the auth token check method individually in each child controller instead of implementing once in a before_action hook. That's Rails 101 stuff and the app is small. It was so obvious that I saw it right away just reading the code, I didn't even set an agent loose to do an initial inspection. It was a real "yeah I still got it" moment for me.

I'm on board with the idea that agents are going to write most of the code, but not checking it is just insane to me, based on some of the things I've seen committed in commercial codebases recently.


Replies

robgough • today at 3:29 PM

One of the strengths of Rails was that it helped developers who maybe didn't always know the "best way" to build things to build in a standards compliant way – not that you couldn't do things like return a 200 for Not Found if you really wanted to etc.

I'm always pleased when working with a dev who has Rails experience even if they've since moved stack, as often they have picked up and learned the value of these good behaviours. Perhaps it's as much a community thing as a framework thing, or combination of both.

Agentic development definitely still has room to improve, but I suspect that there is some future framework (maybe even language) designed to help minimise these types of mistakes.

➕ show 2 replies
senderista • today at 7:39 PM

Why do you think an AI audit (say from Fable/Astra at xhigh) wouldn't have caught this?

whazor • today at 7:03 PM

Software engineering is so back.

When designing systems, you want the important details to be right. Especially with authentication and authorization.

From an architecture level, you can know which classes are important to review and which ones are not.

➕ show 1 reply
timhh • today at 6:36 PM

What model though?