Ultimately, who cares who's morally right or wrong? Lets skip the drama and try to see the legal angle, with the goal of figuring out a way to "save" the source code (of possible).
The way I see it (with my limited legal knowledge, IANAL) is that Daniel Micay got paid for his services, and therefore the copyright is assigned to the company behind CopperheadOS. I'm not sure if Daniel can be fired, that'd depend on the legal entity of CopperheadOS (for example, in a general partnership both partners bear responsibility and liability which levels the playing field). I tried looking it up on the homepage, but I've been unable to figure that out. What is the legal entity behind the company "Copperhead Security"?
Ugh there's so much circumstance and context I would have to preface with, but in the end when we decided we couldn't work together anymore (after almost 3 years), we came up with 2 options:
Either one of us buys the other out, or we dissolve the business. He chose to buy me out and attempt to keep going, but the company folded less than a year after I left.
It wasn't quite a messy as this situation seems to be, but it was rough, as both of us had basically put everything we had into the business.
2-person startups are kind of platonic marriages, and as such splitting up is basically getting a divorce (at least in terms of mental stress).
edit: to answer your "what would I do differently" question, absolutely insist on getting a lawyer up front to draft all the paperwork and employment agreements (we didn't do this because it seemed so expensive).
As a SWE, all of my employment contracts explicitly state that code that I wrote for the company is owned by the company. Just because he was paid for services does not mean that the company owns the copyright of the code he wrote.
If I pay a photographer for services, the photographer owns the copyright unless we agree otherwise in a contract. If there is no agreement, the creator owns the work.
My (very limited) understanding is that the rule about works for hire only applies to non-employee contractors under certain tightly defined circumstances. Actually employing a photographer as an employee would mean you own the copyright, paying the photographer as a contractor would not.
Depends on the jurisdiction. Where I live, the employer has an implicit exclusive license to the IP produced by their employees. In theory, employees can even rescind that license but will need to compensate the business (in practice I don't think that's actually possible, the monetary damages to the employer would be ridiculous).
Also not a lawyer, but I remember reading on /r/gamedev of a geme developer who got screwed over by his artist saying that he could no longer use the assets, or something like that; I believe the same principle applies here. Copyright belongs to the creator of the work unless explicitly stated otherwise.
In the U.S., copyright is automatically granted to the creator of the work, unless the work is a "work made for hire", in which case the copyright goes to the employer. When someone's artist asserts ownership over something they were paid to create, they're essentially challenging its status as a "work made for hire".
The Copyright Office has a circular that they distribute to clarify and help people decide, in general, whether certain types of work qualify as "works for hire" or not. [0]
Ouch! Seems that a company does need a goodwill explicit contract between partners so that in the case of a split or disagreement, the company can use the assets already created, even if copyright is still owned by the parties themselves. Or else all that work can be killed by one spiteful party (or one aggrieved one). Yet... in this case, would that be a good thing? Conundrum.
Debatable without an employment agreement. For all we know the company hired the primary developer as an independent contractor. The tweet references an email demanding the signing of an employment agreement after the fact. That itself is shady and can only enhance distrust. What they need is a dissolution agreement, not an employment agreement.
Further complicating it, Micay says the code is licensed non-commercial. So how can the company commercially exploit that code anyway? I'd be suspicious of any after the fact employment agreement attempting to coerce a re-licensing permitting commercial usage.
The way I see it (with my limited legal knowledge, IANAL) is that Daniel Micay got paid for his services, and therefore the copyright is assigned to the company behind CopperheadOS. I'm not sure if Daniel can be fired, that'd depend on the legal entity of CopperheadOS (for example, in a general partnership both partners bear responsibility and liability which levels the playing field). I tried looking it up on the homepage, but I've been unable to figure that out. What is the legal entity behind the company "Copperhead Security"?
[1] https://en.wikipedia.org/wiki/General_partnership