Is the currently-installed shader program part of the VAO state and/or part of the VBO state? Or is it separate state that is not affected when VAO and VBO are switched?
According to these docs the glUseProgram function
Installs a program object as part of current rendering state.
In other words, how is "rendering state" is defined?