You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Set Up Again: heal Computers stuck before the fix, gate daemon_id on server capability, remove the orphan #243
#234 fixed Set Up Again pairing a new Computer while the Daemon Identity stayed bound to the old one (#97). #229 implemented the same fix differently and was closed in favour of #234. Three pieces of #229 are not in main yet:
(a) Name the Daemon ID only to a TeamHub that accepts it. The desktop now always sends daemon_id in LocalComputerEnrollmentCreateRequest. TeamHub decodes request bodies strictly, so a newer desktop enrolling against a TeamHub that predates daemon_id fails. #229 added an optional server_capabilities list to CurrentIdentity (/v0/me); TeamHub lists local_computer_enrollment_daemon_id, and the desktop sends daemon_id only when that capability is listed. The desktop already reads /v0/me before enrolling, so the gate adds no request.
(b) Heal a desktop already stuck at start. A desktop that ran Set Up Again on 0.1.3 holds an orphan Computer whose daemon is bound to the old Computer, so every connect is refused with DAEMON_IDENTITY_IN_USE. With #234 the person sees reconnect guidance and has to reconnect by hand. #229 records in the desktop config the Daemon ID the enrollment named; at start, an enrollment saved without a Daemon ID (or with a different one) is renewed once, and TeamHub moves it back to the Computer the daemon holds. On a server without (a)'s capability nothing is renewed, so the credential is not rotated on every launch.
(c) Remove the orphan Computer. When the enrollment request names a Computer of the same owner that never bound a Daemon Identity and has no Agents, and the renewal moves to the Computer holding the Daemon ID, the named Computer is the orphan an earlier Set Up Again left. #229 removed it in the same transaction. With #234 it stays as an inert, unlisted row.
The #229 branch (oldwinter/014-c1) has the code and tests for all three, written against the pre-#234 design.
Activity