Oh, that is fascinating.
I wonder how we should react if North Korea lobs a nuclear missile at China, instead of Guam or the continental United States. More importantly, how would China respond? Would it flood troops into North Korea, and effectively annex it after annihilating the Kim dynasty root and branch?
I think they would invade, but I can't see a scenario where annexation is a plausible long-term solution. With annexation + presumable liberalization of North Korea that comes with that, there's no way that North Koreans will want to live under Chinese rule when they people who are culturally more similar them, who they feel a sense of nationhood with are to the south. On the Chinese side, I find it hard to believe they'll feel enthusiastic to inherit the mess that North Korea is, especially when you how unwilling South Korea is. On a similar note, it's also an open question on how South Korea will feel about China invading territory they technically claim.
Considering that any invasion in the aftermath of an unprovoked nuclear attack with mass civilian casualties would likely result in the utter destruction of the North Korean military (and unavoidably high losses on the part of the invader), I don't think China would accept anything less than an indefinite occupation of North Korea to ensure it never poses a threat to them ever again.