Repository navigation
fix(cli): load the node key only when a command signs - #176
Open
PiquelChips wants to merge 1 commit into
Open
PiquelChips wants to merge 1 commit into
PiquelChips wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Every command that goes through the service built its Node with the key loaded, so read-only ones like `origin targets` failed on a malformed node.key, and created one if it was missing. A Node's key is now a LazyKey: in hand, as a server's is, or in the user's key file, loaded the first time the node signs. Signing calls fail with ServiceError::NodeKey if it can't be loaded. Credentials take the server's public key, which is all they need to verify tokens.
PiquelChips
force-pushed
the
fix/load-the-node-key-only-when
branch
from
November 22, 2026 20:22
34c8d51 to
6c79dc9
Compare
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.
Every workspace command that goes through the service built its
Nodewith the key already loaded. So read-only commands likeorigin targetsororigin logfailed on a malformednode.key, and created a key if none existed. ANode's key is now aLazyKey. It is either in hand, as a server's is, or in the user's key file, which is loaded the first time the node signs (landing, creating a target, issuing a token). Signing calls that can't load the key fail withServiceError::NodeKey.Node::ofand the workspace'sservice()can no longer fail, andRemoteError::Configis gone.Credentialsnow takes the server's public key, which is all it needs to verify tokens. Tests and benchmarks build nodes withNode::new. A CLI test checks thattargetsdoesn't create a missing key, thattargetsandlogstill work with a malformed one, and thatlandreports it.Part of #166.
Note
Written by Claude Opus 5.5 in Claude Code (via T3 Code)