Keep a relaunched ship's credentials usable - #47
Merged
Conversation
A ship provisioned by `fleet launch` was left unusable the second time you launched it: already in the roster, it was skipped for registration and spawned with no credentials at all, so its armory pull was refused. Minting a fresh pair instead is worse — a ShipConnection captures the bridge token it was built with, so rotating that half leaves the bridge presenting a token the restarted ship no longer accepts, and the ship goes offline rather than merely losing its armory. Provisioning now reuses the stored bridge token, which the bridge keeps in the clear because it has to present it, and rotates only the ship token, of which it keeps a hash. The live connection stays valid and the restarted ship gets a working pair, so the skip is no longer needed. A ship's agent token survives provisioning: it is a third credential the bridge re-mints on every connect, and may be in flight in a workspace. This survived until now because nothing ever launched twice. The test that covers it inits the second manager before provisioning, the way a real relaunch does, so the token it asserts against is the one a live connection would be holding. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A ship provisioned by
fleet launchwas left unusable the second time you launched it: already in the roster, it was skipped for registration and spawned with no credentials at all, so its armory pull was refused. Minting a fresh pair instead is worse — a ShipConnection captures the bridge token it was built with, so rotating that half leaves the bridge presenting a token the restarted ship no longer accepts, and the ship goes offline rather than merely losing its armory.Provisioning now reuses the stored bridge token, which the bridge keeps in the clear because it has to present it, and rotates only the ship token, of which it keeps a hash. The live connection stays valid and the restarted ship gets a working pair, so the skip is no longer needed.
A ship's agent token survives provisioning: it is a third credential the bridge re-mints on every connect, and may be in flight in a workspace.
This survived until now because nothing ever launched twice. The test that covers it inits the second manager before provisioning, the way a real relaunch does, so the token it asserts against is the one a live connection would be holding.