Sounds like this is actually similar to how ChatGPT was trained - a separate reward model was built to automatically label output. A similar reward model could be trained via diff reviews and used to train both a review generator, then this could be used to train code gen.