Skip to content

feat: NodeUpdate plans for spec-change-driven sidecar re-initialization#86

Closed
bdchatham wants to merge 2 commits intomainfrom
feat/m1-node-update-plans
Closed

feat: NodeUpdate plans for spec-change-driven sidecar re-initialization#86
bdchatham wants to merge 2 commits intomainfrom
feat/m1-node-update-plans

Conversation

@bdchatham
Copy link
Copy Markdown
Collaborator

Summary

  • Makes BuildPlan phase-aware so the planner returns NodeUpdate plans for Running nodes that need sidecar re-initialization after a spec change (image, config, peers)
  • Adds SidecarReady and NodeUpdateInProgress conditions to SeiNode status, providing an observable interface for the SeiNodeDeployment controller to track convergence without calling sidecars directly
  • Extracts shared drivePlan/handlePlanComplete/handlePlanFailed 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
  • Descopes MonitorTasks from the reconcile loop (dead code, no real use case)

This 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 test passes — all existing tests pass, 5 MonitorTask tests skipped (descoped)
  • make lint passes
  • Verify: BuildPlan returns init plan for Pending nodes, NodeUpdate plan for Running + stale SidecarReady, nil for steady state
  • Verify: plan failure in Running phase clears plan without transitioning to Failed
  • Verify: SidecarReady condition set True at Initializing→Running transition

🤖 Generated with Claude Code

bdchatham and others added 2 commits April 15, 2026 12:42
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>
@bdchatham bdchatham closed this Apr 16, 2026
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