feat: NodeUpdate plans for spec-change-driven sidecar re-initialization#86
Closed
feat: NodeUpdate plans for spec-change-driven sidecar re-initialization#86
Conversation
Make BuildPlan phase-aware so the planner returns NodeUpdate plans for Running nodes that need sidecar re-initialization after a spec change. The SeiNode controller detects stale SidecarReady conditions via StatefulSet rollout generation comparison, then delegates to the planner which constructs an idempotent NodeUpdate plan (configure-genesis, config-apply, discover-peers, config-validate, mark-ready). Key changes: - Add ConditionSidecarReady and ConditionNodeUpdateInProgress to SeiNode status, providing an observable interface for the SeiNodeDeployment controller to track convergence without calling sidecars directly. - Extract shared drivePlan/handlePlanComplete/handlePlanFailed from the reconciler so both Initializing and Running phases use the same plan execution path. Running-phase plan failure clears the plan and retries rather than transitioning to Failed. - Each mode planner's BuildPlan checks NeedsNodeUpdate first, returning a NodeUpdate plan with mode-specific controller overrides. A phase guard ensures init plans are only built for Pending nodes. - MonitorTasks descoped from the reconcile loop (dead code). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Align with codebase convention — every other "finished successfully" concept uses "Complete" (InitPlanComplete, NodeUpdateComplete, GenesisCeremonyComplete, ResultExportComplete, TaskComplete). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
BuildPlanphase-aware so the planner returns NodeUpdate plans for Running nodes that need sidecar re-initialization after a spec change (image, config, peers)SidecarReadyandNodeUpdateInProgressconditions to SeiNode status, providing an observable interface for the SeiNodeDeployment controller to track convergence without calling sidecars directlydrivePlan/handlePlanComplete/handlePlanFailedso both Initializing and Running phases use the same plan execution pathThis is M1 of the validator workstream. It provides the SeiNode-side mechanics that M2 (in-place deployment refactor) and M3 (validator BYOI) depend on.
Test plan
make testpasses — all existing tests pass, 5 MonitorTask tests skipped (descoped)make lintpasses🤖 Generated with Claude Code