fix: hand a node its next credential before the old one expires #14

Merged
day01 merged %!d() commits from %!s() into %!s() 2026-08-12 08:06:40 +00:00
Owner

A node credential lasts fifteen minutes and nothing ever replaced it. Nodes::rotate existed but had no caller and no message to carry its result, so every node was locked out a quarter of an hour after enrolling and only a fresh enrolment token got it back. That is what took dev down.

The control plane now pushes Rotated on the open session whenever the node speaks and the credential it holds is within the renewal margin of expiry. It is pushed rather than requested, and offered again on every heartbeat, so a lost message costs nothing.

An enrolled node that never spoke now settles as offline as well. It was reported as newly gone on every sweep forever, which is what buried the real failure in the log.

Paired with syncode/runner fix/keep-the-node-credential-current, which keeps what this hands over.

A node credential lasts fifteen minutes and nothing ever replaced it. `Nodes::rotate` existed but had no caller and no message to carry its result, so every node was locked out a quarter of an hour after enrolling and only a fresh enrolment token got it back. That is what took dev down. The control plane now pushes `Rotated` on the open session whenever the node speaks and the credential it holds is within the renewal margin of expiry. It is pushed rather than requested, and offered again on every heartbeat, so a lost message costs nothing. An enrolled node that never spoke now settles as offline as well. It was reported as newly gone on every sweep forever, which is what buried the real failure in the log. Paired with `syncode/runner` `fix/keep-the-node-credential-current`, which keeps what this hands over.
day01 added 1 commit 2026-08-12 08:01:50 +00:00
		A node credential lasts fifteen minutes and nothing ever replaced it.
`Nodes::rotate` existed but had no caller and no message to carry its
result, so every node was locked out a quarter of an hour after enrolling
and only a fresh enrolment token got it back. That is what took dev down.

The control plane now pushes `Rotated` on the open session whenever the
node speaks and the credential it holds is within the renewal margin of
expiry. It is pushed rather than requested, and offered again on every
heartbeat, so a lost message costs nothing.

An enrolled node that never spoke now settles as offline as well. It was
reported as newly gone on every sweep forever, which is what buried the
real failure in the log.
	
day01 merged commit 4ee9829202 into %!s() 2026-08-12 08:06:40 +00:00
day01 deleted branch fix/rotate-node-credentials-before-they-expire 2026-08-12 08:06:41 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: syncode/control#14