Onboarding State Machine¶
Settld setup now uses a deterministic onboarding state machine with fail-closed transitions.
States¶
initconfig_resolvedruntime_key_readywallet_resolvedpreflight_donehost_configuredguided_next_donecompletedfailed
Transition Contract¶
Valid happy-path transition sequence:
resolve_config_okruntime_key_okwallet_okpreflight_okhost_config_okguided_okcomplete
Preflight-only sequence:
resolve_config_okruntime_key_okwallet_okpreflight_okcomplete
Invalid state/event pairs raise ONBOARDING_INVALID_TRANSITION and stop execution.
Why This Matters¶
- Prevents silent branch drift in setup evolution.
- Makes dead-end loops testable as invalid transitions.
- Produces a deterministic terminal state in setup reports.
References¶
- Source:
scripts/setup/onboarding-state-machine.mjs - Tests:
test/setup-onboarding-state-machine.test.js