How a namespace is written, composed and resolved: public names, localhost, defaults and fallbacks.
23 tests in 4 files. Source: Typescript/tests/
The default namespace resolves to its public origin; localhost keeps its namespace across ports; a username prefix projects onto the constant; a selector host overrides the transport origin.
With nothing else to go on the namespace falls back to the kernel-bound root; an explicit space wins over it; with no root at all the hardcoded default is used.
When the primary surface fails the next one is tried and namespace:fallback is emitted; if all fail namespace:failed carries the full explanation.
A public domain maps to https, a bare hostname to http on .local with port 8161, IPs keep their port, and signIn goes to /claims/signIn.