An AI system can repeatedly solve a task by generating code each time. It can also create a useful program once, retain it and invoke it with new inputs. The second approach turns a sequence of answers into a small library of executable capabilities.
A small code change can preserve the algorithm's syntax while invalidating its argument for correctness. Heap-based merging offers a useful example because the key precondition is easy to overlook.
Keeping the previous application version available is only part of a rollback plan. The previous version must also remain able to understand the state created while the new version was running.