Merge "v5: add tests for WRITE_OPCODE functionality" into main