Skip to content

fix(cli): load the node key only when a command signs - #176

Open
PiquelChips wants to merge 1 commit into
fix/cap-the-event-long-polls-thatfrom
fix/load-the-node-key-only-when
Open

PiquelChips wants to merge 1 commit into
fix/cap-the-event-long-polls-thatfrom
fix/load-the-node-key-only-when

Conversation

@PiquelChips

Copy link
Copy Markdown
Member

Every workspace command that goes through the service built its Node with the key already loaded. So read-only commands like origin targets or origin log failed on a malformed node.key, and created a key if none existed. A Node's key is now a LazyKey. 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 with ServiceError::NodeKey. Node::of and the workspace's service() can no longer fail, and RemoteError::Config is gone. Credentials now takes the server's public key, which is all it needs to verify tokens. Tests and benchmarks build nodes with Node::new. A CLI test checks that targets doesn't create a missing key, that targets and log still work with a malformed one, and that land reports it.

Part of #166.

Note

Written by Claude Opus 5.5 in Claude Code (via T3 Code)

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5da6126d-192e-44b4-afe5-b3283b8609fe

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@PiquelChips
PiquelChips added this pull request to stack #185 November 22, 2026 20:21
@PiquelChips
PiquelChips removed this pull request from stack #185 November 22, 2026 20:22
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
PiquelChips force-pushed the fix/load-the-node-key-only-when branch from 34c8d51 to 6c79dc9 Compare November 22, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant