RedMachine Buy

How do I check AI-generated code without reading it?

You cannot tell that AI-generated code is right without reading it or testing it against what you asked for. Without reading it, you can tell whether its tests would notice a mistake in each line it changed. RedMachine breaks each changed line and sees whether a test fails, and writes a receipt. For the rest, ask for one test per thing you asked for, named after it, and read the test names against your request.

The receipt lists the tests that ran with nothing broken and, for each KILLED line, the tests seen to fail with it broken. With Python's built-in commands, which stop at the first failure, that is only the first one. The command redmachine verify RECEIPT --ran TEST answers yes or no from the record, so you do not have to rely on the assistant's memory. If the receipt has no test names, it says it cannot tell.

The names are read from what your test runner printed, and a test that sets out to deceive can imitate one. A second assistant can read the receipt and your original request and answer one question: does everything I asked for have a test that went red? The working loop is described in using RedMachine with a coding assistant.

Buy RedMachine

Related

More answers