The test to use is to imagine you’re writing an essay in college. If your essay contains unattributed passages from another work then the professor will not care that you memorized them rather than just copying and pasting the text. In order to be in the clear you need to properly quote and cite the original author.
GitHub copilot does not provide attribution. All it does is obfuscate the original source to make attribution impossible. Copyright lawyers ought to have a field day with this one.
>In that B scenario, would the human be infringing on the original's copyright? //
Depends on jurisdiction but in general I'd say no as quoting, particularly an insubstantial portion, is allowed (certainly under USA Fair Use, possibly under UK Fair Dealing).
However, and again depends on jurisdiction, copying a whole work to use for AI training or searching can be restricted (though it's on the GitHub license in this case). The snippet might be allowed but copying into a training corpus may be excluded (I think UK have an exception for AI training, but I may have misremembered, it might be a suggestion??).
There are quite a few companies where copilot and copoilot-like technologies seem radioactive at least for the moment.
In these situations, whether it be originating from a human or robot, the knowledge comes from looking at public code on GitHub and it's always been a risk that your public code might not be used with proper attribution at some point. Think about how many OSS projects have core code and algorithms copied daily by companies with no public name and keep all of their source code private - it's surely caused more damage than CoPilot ever will.