hashgraph / hashgraph/solo-weaver
feat(consensus): --start-policy flag and conditional readiness wait for node install
- Dominant language
- Go
- Stars
- 3
- Forks
- 0
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 47
Description
Add a `--start-policy` flag to `consensus node install` and make the post-install readiness wait conditional on whether the node is expected to run.
Parent epic: #408
Depends on: solo-operator PR hashgraph/solo-operator#1263 (StartPolicy/DesiredRunState semantics)
Relates to: #1067 (start), #1068 (stop)
### Background
solo-operator PR #1263 formalizes `spec.startPolicy` (`Auto` default | `Manual`) and `spec.desiredRunState` (`Running`|`Stopped`, optional). Effective behavior:
| startPolicy | desiredRunState | result |
|---|---|---|
| Auto | unset | runs (auto-start on pod boot) |
| Auto | Stopped | stopped |
| Manual | unset | stopped |
| Manual | Running | runs |
Today `consensus node install` always sets no start policy and always runs `WaitConsensusCapsuleReady`. With Manual mode the node is intentionally Stopped after install, so waiting for Running/Active would always time out.
### Scope
- Add `--start-policy` (Auto|Manual, default Auto) on the consensus node command; validate the value.
- Set `spec.startPolicy` on the ConsensusCapsule; leave `spec.desiredRunState` unset (matches operator defaults).
- Make the readiness wait conditional: run `WaitConsensusCapsuleReady` only when the node is expected to run (startPolicy=Auto). For Manual, skip the wait (nothing to wait for — the node is Stopped by design). `--ready-timeout` continues to gate the Auto case.
- Interactive prompt: offer start-policy as a select (Auto|Manual) in the install wizard.
### Blocked until
`spec.startPolicy` exists in the vendored operator today, but the full behavior (Manual ⇒ Stopped) depends on PR #1263 semantics; land this alongside the re-vendor so the conditional-wait behavior matches the operator.
### Acceptance Criteria
- [ ] `--start-policy` validated (Auto|Manual), default Auto, plumbed to `spec.startPolicy`
- [ ] Auto install waits for Running/Active (existing behavior)
- [ ] Manual install skips the readiness wait and succeeds with the node Stopped
- [ ] Interactive wizard prompts for start policy
- [ ] Docs updated for the new flag
Contributor guide
Research direction
Start at the `consensus node install` command, its interactive install wizard, and the code that calls `WaitConsensusCapsuleReady`; trace how the ConsensusCapsule is built and how vendored operator types expose `spec.startPolicy`. Check the existing readiness and CLI tests, then update the relevant docs. Done means Auto retains the readiness wait, Manual skips it, validation and prompting work, and the selected policy reaches the ConsensusCapsule.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- cli, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100