State Machines designed
State machines are the safest way to understand provisioning, release, billing, and node lifecycle behavior. They define retry boundaries and make failed states operable instead of mysterious.
Allocation Lifecycle
What To Look For
| State area | Operational meaning |
|---|---|
| Provisioning | Temporal worker and node-agent tasks move allocation toward active |
| Release | Billing stops, node cleanup proceeds, failures remain visible |
| Billing | Ledger entries remain immutable; balances are computed |
| Node lifecycle | Host readiness, drain, release, and future MAAS reimage posture |
| Compensation | Failed side effects need explicit retry or manual recovery paths |
Implementation Rules
- Do not skip explicit failed states.
- Billing must stop when release failure means the user no longer has usable allocation capacity.
- Admin retry paths should move through the documented state machine, not around it.
- Repeated direct database inspection should become a read-model/API gap.