A node can now finish the enrollment it just performed
A node that enrolled successfully kept being rejected by the control plane and enrolled again, every forty seconds, without ever coming online. It affected Docker nodes worst, because nothing ever restarts them.
A node could enroll perfectly and still never come online. Device auth approved, the node ID appeared in the portal, credentials were written to disk — and then the control plane answered the next call with 401 Invalid node token, which threw the credentials away and started a fresh device flow. Forty seconds later it happened again. And again.
The credentials were right the whole time. The problem was that the running process never read them. It had loaded its configuration once at startup, before it had any credentials to load, and the code that enrolled it returned a placeholder rather than the real key. Every request after that sent the placeholder.
So a node needed a restart to use credentials it had written itself a moment earlier. Docker operators were hit hardest, because a container that never crashes never restarts, so the loop had nothing to break it.
A node now picks up its own credentials the moment enrollment completes, and comes online without being restarted.