Let's say a US Citizen who is a bona fide resident of a foreign country owns a sole proprietorship that generates some income by subcontracting work to a subcontractor in the United States and making a profit on the transactions. It seems fairly clear that the net income would be considered the self employment income of the proprietor, but would this income be sourced outside of the United States under IRC 862(a)(3) as "compensation for labor or personal services performed without the United States" if much of the work is being done by a subcontractor who is actually within the United States?
Now, if the location of the subcontractor is irrelevant, and if the owner makes an occasional trip to the United States on business, would the income typically be allocated based on the percentage of working days spent in each place?