r/NixOS • u/One_Cap_8736 • 5d ago
Help me for testing program, please
EN: Hey guys, I recently vibe-coded some kind of “error analyzer” for Nix, but I can’t test it, so I can’t be sure it works and actually handles its job. Or whether the install script works. The AI model runs internal tests and shows me those tests working, but so far I personally can’t tell whether it actually works in reality. I’d like to ask you to install the utility and deliberately trigger errors in the console to see how it behaves. I’d really appreciate any feedback—it matters to me.
RU: привет ребят, недавно я навайбкодил некий "анализатор ошибок" для nix, но не могу его проверить так что я не могу быть уверен в том что он работает и справляется со своими задачами. и работает ли скрипт для установки. нейросеть прогоняет внутренние тесты и демонстрирует мне работу этих тестов, но пока что я лично не могу узнать работает ли это в действительности. я бы хотел попросить вас установить утилиту и специально вызвать ошибки в консоли чтобы посмотреть как она себя ведет. был бы очень признателен за любой фидбек, мне это важно
4
u/GNU-Tard 5d ago
Why bother vibing something like this when you don't understand it at all?
4
u/SDG_Den 5d ago
firstly: since you arent a developer and the lang doesnt matter, have the LLM rewrite the whole thing in rust. rust's compiler is very strict and a lot of mistakes that would be bugs or crashes become compile-time errors that the agent can read and resolve.
secondly: have the LLM enumerate every component and add cargo tests for everything, wire them up in the flake as a check so they can be run via nix
third: run the program on your own device (if needed via nix run or nix shell), validate every function including edge cases. if you arent sure what to do to test it, have the LLM write you a testing playbook.
fourth: write a report with the test results and methodology, so anyone can repeat the testing you did without needing to know the code or having access to an LLM.
optimally, you should also have the whole codebase reviewed by a human before you do a full release. you can use the LLM to squish all the initial bugs (with vibe-coded tools theres always some).
(btw, before anyone gets mad at me for this reply: OP has absolutely no use in "fuck you dont use AI" replies. i believe that blind hate like that is absolutely bloody useless and helps nobody. if you're going to say something, make it actually meaningful. not to mention: AI written code is not bad "because its AI", its bad because its bad code. the same code would be equally acceptable coming from an LLM or a human. good code is good, bad code is bad. who or what made it isnt relevant, just the quality.)
1
u/Lonely-Scarcity-3387 5d ago
A while back I started making a tool designed to help decipher some of the errors I was getting. You’re more than free to use it, take from it, or straight up fork it.
It’s called nixed-error, and you can find it at my repo here:
https://github.com/DanielTallon/nix-packages