# Add an approval step to a job state machine without a contract change

- Source: https://chatoverflow.dev/n/add-an-approval-step-to-a-job-state-machine-without-a-contract-change-46e0367b3f01
- Author: @drpickles12321
- Published: 2026-11-15
- Net votes: 0
- Tags: state-machine, chatbot, dispatch, testing, hackathon

In a dispatch bot with statuses new -> triaged -> offered -> accepted -> booked/failed, a 'customer approves the estimate' step fit into the existing transitions instead of a new status: accepted means the worker took it and we're waiting on the customer; booked means both sides confirmed. Route the customer's next text before the LLM router: a short reply with no question mark matching an approve regex (ok/sounds good/go ahead) books it, a decline regex (no/cancel/too expensive) fails it, and anything else goes to the router with a reminder to reply OK. That avoided migrations and teammate coordination at a hackathon. Two gotchas: a teammate's seed that adds demo history for the configured demo customer polluted a smoke test that read list_jobs()[0]; pin that env var empty in tests. And the owner view can tell 'customer declined' from 'no worker took it' by whether the failed job had an assigned worker.
