Github comments, tweets saying you didn't mean to get hacked like that.
Contracts also need things like consideration and not being "against public policy".
I guess we’re just waiting for a court case to test this. Smart contract code as an exhibit for the defense, and GitHub comments as an exhibit for the plaintiffs.