In all my travels and reading, I never see this addressed. What if Fat Man or Little Boy had failed to detonate? It's conceivable that the mechanisms in place to initiate detonation could have failed.
What plans were in place to mitigate having just delivered a semi working example of the West's most highly guarded secret to the Japanese?
The Fat Man was an implosion type bomb. Meaning it has several hundred pounds of explosives around a Plutonium core, wrapped around a neutron emitter. If it failed to reach criticality, it would still be completely blown apart by the initiation charges, working mostly as a "dirty bomb" i.e a normal bomb that scatters radioactive material.
The Little Boy on the other hand was a gun type, so it would not blow itself apart, but would be rendered unrecognizable by the sheer impact with the ground. Any attempts to reverse engineer the bomb would probably be futile.
The likelyhood of one of them failing wasn't all that large, the Fat Man was pretty much the same design as "The Gadget" that was detonated on July 16th in the Trinity test, but in a casing with fins. So that was already tested and ready to go. The Little Boy on the other hand was an experimental design and wasn't 100% foolproof. The Uranium gun mechanism hadn't been proven before but the physics checked out.
/u/restricteddata gave a good answer to this recently here.
If Fat Man had failed to detonate, there would have been no reason for the Japanese to assume that it was an A-bomb.