General editorial guide prepared with AI assistance. Examples are hypothetical; implementation depends on project requirements and qualified review.
Decision and problem
Separate request state from notification state. Sending a message to a manager does not approve a request. Define who starts, rejects, returns or delegates it and what happens when an approver is absent.
Designing the solution
Model permitted transitions in server rules with actor, time and reason recorded. Use a task list as the user's workspace and notification as a signal, not the source of truth. Prevent direct state edits from bypassing approval.
Practical acceptance test
Test a returned request, simultaneous approvals and an undelivered notification. The correct state should remain visible in the work queue without duplicate downstream actions.
