But the agreement to invade was made before the Nazis rolled, so the Soviets are jointly responsible.
It was not the signing of the said non-aggression pact, nor Japanese actions, but rather German troops crossing the Polish frontier.