A defense pact doesn’t always hold, though. Poland had a mutual defense pact with France and the UK in September 1939. And even if China were to aide the DPRK in a crisis, the DPRK would be the junior partner in that arrangement. In this scenario, if China is providing the lions share of manpower and weapons, they get to decide strategy, and dictate terms for war termination.
The DPRKs primary goal is preservation of the Kim regime above all else. That’s why the DPRK over the last 70+ years has focused on Juche, a principle of self-reliance. The vast majority of their weapon systems are of indigenous designs and manufacture. And why they have developed and deployed an independent nuclear deterrent.