I’ve been warning about this for a long time.
With typical clean room RE you get two artificers with clean copyrightbility - a fair use spec describing the system, a new implementation. This is not legally required, but the paper trail is a good defense.
If AI writes the spec, it may have just tainted itself if that work is then used to in future training. The output is not protected by copyright, but that probably doesn’t matter. If AI writes the output, there is no protection over that either, which may or may not matter.
Ultimately, however, this is a mechanical, derivative work. It isn’t washed because no creative human expression was introduced in either phase.
If the phases are split into AI writing the spec and human writing the implementation, and the spec is determined to be infringing, the implementation is infringing. The AI spec has no judgement over what’s copyrightable expression in the original, and there’s a high likelihood it produces an unauthorized derivative.
If a human writes the spec and an AI writes the code, the output is probably clean, but also not copyrightable. This is less of a concern for open source projects written by a single maintainer, but may have effects for larger projects or proprietary projects. However, writing the spec is the harder of the two parts and what people like using AI for.
Except in the most egregious cases, AI is not going to be found to be derivative or infringing. The consequences go far beyond this particular type of situation; it is being used everywhere by the richest corporations to produce all kinds of content. They will not allow those works to suddenly have questionable provenance.