Hacker News new | ask | show | jobs
by _joel 411 days ago
That's what I do as standard in Windsurf. I set memories for it to run the tests too. That's standard, right?
2 comments

I just tested and yes, it works.

My issue was my instructions.md file telling it to think too much before writting files and running tests. So it was in a rabbit hole of ethernal thinking.

Now I can tell it to create crud pages and it will generate and run tests for those pages as well.

How do you solve the risk of AI writting and executing unit tests with something like `rm -rf /` and wiping your files?

I'm looking for solutions. Docker looks like one but I like to keep things simple.

You can set only allowed filepaths for file handling. I don't there's an explicit way to guardrail it to not run something bad from a shell though (althogh you need --no-preserve-root nowadays in that rm command). You'd have to check every command before running. It's anecdata but I've been doing this stuff for a good few months now and it's not tried to delete my filesystem or lock me out of an airlock, just yet.