John Smith is an H-1B worker working for a US company. If he had stayed in the United in 2020, then he will file form 1040 as a US resident, but he went to his home country in which the US company does not have an office, and because of COVID-19, he could not come back and worked remotely and failed the substantial presence test. Here are my questions:
 Is he a nonresident for 2020? Does he report the the US income on form 1040-NR? I think so but the IRS website says:
As a general rule, wages earned by nonresident aliens for services performed outside of the United States for any employer are foreign source income and therefore are not subject to reporting and withholding of U.S. federal income tax.
How do we interpret this statement?
 If he needs to report the US income on form 1040-NR as a nonresident, I would think the foreign earned income exclusion is available only to US residents per this IRS link. Can you confirm?
 If he needs to report the US income on form 1040-NR as a nonresident, I would also think the foreign tax credit does not apply. Unlike form 2555, the form 1116 does go with form 1040-NR but it applies to foreign source income only, not the US sourced income. Can you confirm this, and find a case where the nonresident needs to report foreign sourced income on form 1040-NR?
Click this link to vote. Like many good things in life, we have to fight for them.