## Parent Related to #1 ## What to build Implement lifecycle transition rules for **Deployment Status** so invalid state changes can be rejected consistently. ## Acceptance criteria - [ ] `pending_approval` can transition to `approved` or `rejected`. - [ ] `approved` can transition to `started`. - [ ] `started` can transition to `succeeded`, `failed`, or `rolled_back`. - [ ] `failed` can transition to `rolled_back`. - [ ] `rejected`, `succeeded`, and `rolled_back` are terminal statuses. - [ ] Rollback after `succeeded` is not allowed. - [ ] Tests cover all valid transitions and representative invalid transitions. ## Blocked by - #2
Parent
Related to #1
What to build
Implement lifecycle transition rules for Deployment Status so invalid state changes can be rejected consistently.
Acceptance criteria
pending_approvalcan transition toapprovedorrejected.approvedcan transition tostarted.startedcan transition tosucceeded,failed, orrolled_back.failedcan transition torolled_back.rejected,succeeded, androlled_backare terminal statuses.succeededis not allowed.Blocked by