Earlier quoted context omitted.
If a "spy" has a child in Canada who would not be a citizen but for where they are born, that implies the parent cannot be guilty of treason against Canada as they are not Canadian. Also, as a counterpoint, applying penalties for crimes to the descendants of an offender has become unfashionable in some circles. See: https://en.wikipedia.org/wiki/Attainder "The United States Constitution prohibits corruption of blood…
Revoking citizenship is not a penalty. Most countries do not grant jus soli rights, and several grant it only with significant restrictions. This is not a universal human right. Canada has a right to set restrictions on jus soli rights. Canada already does not grant citizenship to children born to foreign diplomats working in Canada. Spies are working for a foreign government, just not declaring it. The defense in th…
Yes, it obviously is.
> Canada already does not grant citizenship to children born to foreign diplomats working in Canada.
Essentially no country recognizing jus soli does that for essentially the same reason that diplomatic immunity exists (and affecting the exact same set of people subject to diplomatic immunity)—the presence of diplomats in a country is a convenience for both the sending and receiving country, which, in the interest of relations between the two countries, died not have the legal effect that that presence would otherwise have for the individuals. Non-diplomats who are employed by a foreign government within a country are but tested the same way.
> It's not clear that simply not declaring your employer makes you immune from the law
Declaration isn't the point. Non-citizens openly working for a foreign country in non-diplomatic roles aren't covered either. The diplomat's unique status as, essentially, a mutually-recognized extension of the foreign state is the point.