On Friday afternoon, a small online shop has two people trained to handle urgent customer requests. Both ask to swap out of the final hour. The shop’s AI-assisted rota tool checks the first request and sees that the second person can cover. At almost the same moment, another run checks the second request and sees that the first person can cover. Both changes are approved. At closing time, nobody is available.
Each decision made sense using the information it saw. The failure was in how the decisions were saved. If your business needs at least one person on cover, that rule has to hold after the changes take effect. Showing that each request passed a check earlier is not enough.
Check the condition the business actually cares about
The two requests affect different rota entries. A system that only checks whether someone else changed the same entry can miss the conflict. The entries are separate, but both decisions depend on the same fact: someone else must remain available for the hour. This kind of interaction is often called write skew. The easiest way to spot it is to ask whether two individually permissible changes can combine into a result you would never approve.
Write the rule in plain language before choosing a technical solution. In the example, the shop needs at least one qualified person assigned to urgent cover for the whole final hour. Define what ‘qualified’ means and how partial availability counts. A team might also require a second person on busy days. If that is the policy, express it directly. A correct check for the wrong staffing rule still gives a bad result.
Look for other decisions that share a limit. Two orders can be for different products but draw on the same packaging stock. Two teams can approve different jobs but rely on the same production capacity. Our article on calendar checks for AI booking assistants looks at a related question: what must be available before a booking can be offered? Here the focus is what must still be true when separate requests become commitments.
Protect the decision at the point of commitment
Let the assistant gather the reason for a rota change and explain the outcome. Give the system that owns the rota responsibility for enforcing the cover rule. If a human approves changes from a dashboard, that route needs the same protection. Otherwise the safeguard only applies to one way of making a change.
One design is to handle conflicting changes for the same shift one at a time, so the next decision sees the effect of the previous one. Another uses the database’s transaction controls. The PostgreSQL 17 documentation on Serializable isolation explains how successful transactions at that level must have an effect consistent with some order of running them separately. PostgreSQL can reject a transaction if concurrent activity would violate that property. The application still has to check the actual cover rule within the protected operation.
The database’s guide to handling serialization failures recommends retrying the whole transaction, including the logic that decided what to write. For the shop, that means looking at the rota again and reconsidering the request. It does not mean repeating the old approval. A later attempt might find that cover has gone and offer a different hour instead.
Tell people when a change is only proposed. Send a confirmation once the protected update has succeeded. If someone sees ‘approved’ while the system is still working through a conflict, they may plan around a change that never happened. If the request cannot be confirmed, explain the next step in terms the requester understands: cover is needed until closing, and these are the available alternatives.
Test the pair, then inspect the final rota
Ask whoever builds or supplies the tool to demonstrate the rule with sample data. Use two different requests against the same shift and arrange for both to be considered before either is confirmed. Inspect the rota after both are resolved, along with the messages each person received. A successful demonstration shows who is covering and why the other change did or did not go through.
- One request on its own: When the other qualified person remains assigned for the full hour, the change can be confirmed.
- Two requests for the same hour: When both changes would leave a gap, at most one is confirmed. The other person gets a clear alternative or a request for review.
- One request with replacement cover: Check that a qualified replacement is actually assigned before allowing a change that depends on them.
- A request through a different route: Try a manager’s dashboard as well as the assistant. The final rota should still satisfy the same cover rule.
Make sure a sensible pair can still succeed. For example, requests for different days should not be treated as conflicting merely because the same two people are involved. If the system blocks changes that do not share a coverage requirement, staff may learn to work around it. Ask the supplier to explain which shift or resource each decision protects.
Record the test as a short business example, including the initial assignments, the two requests and the final result. Repeat it when you add another way to change the rota or alter what counts as cover. That gives a new supplier or colleague something more useful than an assurance that the tool checks availability. It shows the outcome the business needs to protect even when two reasonable requests arrive together.
Sources
- PostgreSQL 17 documentation, Serializable isolation and serialization failure handling.
Discover more from Marychuks.com AI, Psychology, Business & CreativeVerse
Subscribe to get the latest posts sent to your email.