Having all the materials almost there, technology, and such ready to go when the political will is ready is a bit different from full bore into production and testing / making things ready for use.
The whole treaty thing is a big bunch of B.S. from the start.
The first like 5 guys to get nukes, said since we have them, we are now untouchable and we control the world and the UN and such.
Then we'll make a treaty, the rest of you promise never to make nukes and we'll "promise" to "someday" get rid of ours...
Yep sounds like a sucker's treaty for sure.
Lots of folks signed up and regretted it later.
Some refused to sign up and made their own nukes and said take that.
Some weren't supposed to and did it anyways and nobody got bombed and such.
Israel apparently came a bit close back in the day to "openly testing" their first devices during some particularly sticky situations.
The Norks pretty much decided we have to do this or else, and hey bomb us and watch SK turn into a warzone.
India and Pakistan well whatever we hate each other enough we need nukes.
Libya found out the hard way what happened when you try to play nice and turn over all your stuff to the USA in return for promise of let's be buddies again and such.
South Africa, kind of vanished their nukes before letting the natives get ahold of the government.
Japan probably could make a nuke within a year if they had the political will to do so.
Bet the SK folks wouldn't be more than 2 years away if the political will was there.