Found a bug in my code that cursor couldn't find

How do y’all approach this kind of problem?

I have a ROS2 project and Cursor seemed pretty good at handling code generation and finding bugs. Claude 3.7 created tests to run, stepped through node messages and consulted the web. The problem was that all the code ran fine but there was an issue in the .sdf model that prevented the model from moving. It was incredibly simple to fix but dozens of Cursor requests totally missed it.

Anyway, I’m curious if there are techniques that help with problems like this.

Hmm thats a good one, but what the issue?

Mathematically its impossible even with tests, linters and also handwriting code to create 100% bug free code. And yes sometimes small issues can break things.

From experience, sometimes AI is not used to certain bugs or may not see from its training data such issues. If it occurs frequently you could add it to your project rules for .sdf files.

otherwise it may make sense to write down such issues into a .md file to refernce it for AI when debugging non-obvious issues.