# roomshare-state-machine > Use for holds, bookings, waitlists, availability, cancellations, and any inventory state transitions. Enforce invariants + edge cases. - Author: Suryateja-byte - Repository: Suryateja-byte/Roomshare - Version: 20260208215059 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-09 - Source: https://github.com/Suryateja-byte/Roomshare - Web: https://mule.run/skillshub/@@Suryateja-byte/Roomshare~roomshare-state-machine:20260208215059 --- --- name: roomshare-state-machine description: Use for holds, bookings, waitlists, availability, cancellations, and any inventory state transitions. Enforce invariants + edge cases. --- # Roomshare State Machine Rules ## Invariants checklist - Define allowed states and transitions (table). - All transitions are server-enforced. - Prevent race conditions (idempotency keys / transactions). - Abuse cases: spam holds, multi-account, rapid apply/cancel. ## Required output 1. State transition table 2. Invariants 3. Test plan (at least 8 tests)