Indeterminate Role (Phase 13b)#43
Merged
maxholman merged 1 commit intoblock65:mainfrom Feb 28, 2026
Merged
Conversation
NodeRole gains an Indeterminate variant representing a node whose role has not yet been resolved. This is the wire-protocol foundation that every subsequent auto-negotiation phase (13c onward) depends on. - Add NodeRole::Indeterminate, convert TryFrom<ProtoNodeRole> to infallible From, remove NodeRoleError - Add NODE_ROLE_RELAY and NODE_ROLE_INDETERMINATE to management.proto; fix IPC conversion to report all four roles (no longer collapses relay to exit) - Pause data plane for indeterminate nodes (no-op outgoing task in both QUIC and WebSocket client connect paths) - Control plane continues normally in indeterminate state - Tests: proto round-trips, handler ping/status with indeterminate role, control plane responsiveness, data plane pausing, transport connection survival Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced May 6, 2026
maxholman
added a commit
that referenced
this pull request
May 6, 2026
Closes 8 open dependabot alerts via transitive lockfile bumps: - rustls-webpki 0.103.9 -> 0.103.13 — CRL/URI/wildcard name-constraint handling and panic-on-malformed-CRL DoS (alerts #27 #42 #43 #47) - rand 0.8.5 -> 0.8.6 and 0.9.2 -> 0.9.4 — soundness fix for callers using a custom logger with rand::rng() (#45 #46) - h3 1.15.8 -> 1.15.11 (website) — path traversal via double-decoded %252e%252e in serveStatic and SSE event injection via unsanitized carriage return (#24 #25) No direct dependency edits; all bumps are transitive.
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.
Indeterminate Role (Phase 13b)
Scope
Wire protocol foundation: add
Indeterminateas a fourthNodeRolevariant,wire it through the proto conversions and management API, enforce that transport
connections survive role events, and pause the data plane while indeterminate.
Touches:
crates/core/src/types.rs,crates/wire/proto/management.proto,crates/core/src/node_api.rs,crates/core/src/control/handler.rs,crates/core/src/control/peers.rs,crates/daemon/src/daemon_config.rs,crates/daemon/src/mode/mod.rs,crates/cli/src/daemon_cli.rsOut of scope
--prefer,--exclude-role,--fixed-role) (Phase 13d)entry,exit,relaysubcommands continueto work unchanged. Deprecation deferred to Phase 13d when
--fixed-roleis available.
RoleTransitionmessages (Phase 13g)Why
NodeRolehas three variants.ROLE_INDETERMINATEalready exists in thedata proto (added in 13a) but maps to
Err(NodeRoleError::Unset)in thedomain type — the codebase has no concept of a node waiting for its role to
be resolved. Every subsequent phase (13c onward) depends on indeterminate
being a first-class runtime state.
Notes
ROLE_INDETERMINATEalready in proto —data.protohas it from 13a.control.protouseswallhack.data.NodeRole, so no proto change neededthere. Only
management.protoneeds updating: addNODE_ROLE_RELAY(wasmissing — relay collapsed to exit) and
NODE_ROLE_INDETERMINATE.NodeRole::Indeterminateintypes.rs— add the variant. ChangeTryFrom<ProtoNodeRole>toFrom<ProtoNodeRole>(no longer fallible —ROLE_INDETERMINATE→Indeterminateinstead of error). RemoveNodeRoleError. UpdateDisplayto print"indeterminate".ipc.rscurrently collapses relay → exit inFrom<NodeRole> for management::NodeRole. Fix to report all four rolesaccurately. CLI output and REPL
infoshould showindeterminatewhenapplicable.
or unexpected handshake result causes disconnection. Each must transition to
indeterminate instead. Known candidates:
server/quic/andserver/ws/accept paths that reject unexpected rolesControlLoopExit::Disconnectpath triggered by role mismatchdaemon_config.rs/mode/mod.rs— startup role resolutionforward tunnel traffic. Control plane (ping/pong, handshake) continues
normally. Log at INFO when entering indeterminate, including the reason.
Tests
NodeRole::Indeterminateround-trips correctly throughdata.protoandmanagement.protowire formats.indeterminate, connection stays open.
infooutput showsindeterminatecorrectly.just checkmust pass.