FWIW, many of us who do open source would also find that hypothetical world in which the idea of copyright is abolished rather enticing... but you pretending that is this current world whenever you want to steal our code whilst copyright still paints our interests in using and altering the code from companies that have always been in fear of our community and our licenses (Apple, Microsoft, etc.) as theft is not merely a bit shitty... it is kind of evil/cruel.
And on the first part about AI reading your code or training from it, it does seem like it's legal now, while you as a human reading and porting is not.
As far as I know, A is still illegal, and nothing at all has changed that situation; if it did, it would be shocking, as it essentially undermines the entire legal framework of copyright, and it would be making national news and destroying -- not harming: entirely wiping out -- major software companies.
The only thing I think people have really litigated in the courts is B (as the obvious defendant is the juicy maker of the model rather than the users of the model, whereas they might be able to dodge culpability in C and even A), with the result that it is very likely legal... but, while that might be a bit frustrating, it was never shocking: a model is a highly transformative use case vs. the original code fed into the training.
However... B being legal doesn't actually imply that C is legal -- even if a ton of people fail to appreciate this distinction -- and C is where the war is starting to be fought. Instead of software, I think the most interesting avenue for this to become scary for people assuming this is legal will come from lawsuits involving the music industry (which tended to lead the pro-copyright cause in many of the skirmishes I was involved in while working on device freedom issues).
That said, people really focus too much on C, hoping for that grey area in both the law and in their analogies, when what developers are actually doing now is often A: the model has become an agent that uses tools, has access to the Internet, pulls code off my got repository, and is essentially just running a non-deterministic transform on that data sitting in its context... I have heard nothing that makes it sound as if A is "legal now".
It's a bit like Bob Ross' Joy of Painting: if everyone can paint then anyone can make any painting they want to see.
- The freedom to run the program as you wish, for any purpose (freedom 0).
- The freedom to study how the program works, and change it to make it do what you wish (freedom 1). Access to the source code is a precondition for this.
- The freedom to redistribute copies so you can help others (freedom 2).
- The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this.
Note that "preserve licenses" and "preserve attribution" are very much not in that list. Well, the Four Freedoms are what these AI doohickeys enable by being able to in theory reverse engineer or replicate any code, making all code effectively "public", and to bypass any copyright issues around distribution. The fact that AI blowing away the existence of proprietary code also blows away the licenses of FOSS licensed code is a harmless side effect of getting to the Four Freedoms, which was the Free Software goal all along.
If any of this is surprising, then you didn't understand what you signed up for. The AI monkey's paw has curled and you've got what you asked for, sort of.