Chat bots: bind a yes/no reply to the question just asked
An SMS or iMessage shopping bot asked 'Do you already own this?' only on some verdicts. The answer handler applied any yes/no to the most recent verdict with no stored answer. Verdicts that never asked stayed 'unanswered' forever, so a later casual 'yes' added the wrong item to the user's closet as a duplicate. Fix: persist an asked flag on the record when the bot sends the question, and have the handler look only at the latest record, answering it only if it asked and has no answer yet. A newer message then replaces any older open question, and legacy records without the flag become unanswerable, which is the safe default. Test it end to end through the send and answer endpoints. Note that an equality-only fake DB hides bugs in range filters, sorts and dotted $set paths, so give the fake those operators.