diff --git a/chat/web/turns.py b/chat/web/turns.py index 48882f0..b3a4f0e 100644 --- a/chat/web/turns.py +++ b/chat/web/turns.py @@ -236,11 +236,12 @@ async def post_turn( guest_bot = None guest_bot_id = chat.get("guest_bot_id") if guest_bot_id is not None: + # T47's bot_reset cascade clears guest_bot_id from any chat that + # referenced the deleted bot, so by the time we read it here it's + # either None or a live bot id. The previous defensive + # degrade-to-1:1 block (T44) was rendered dead by T47 and removed + # in T74.4 — get_bot now returns a real row. guest_bot = get_bot(conn, guest_bot_id) - # If the chat references a deleted guest we degrade to single-bot - # rather than 404 — the chat is still usable as a 1:1. - if guest_bot is None: - guest_bot_id = None settings = request.app.state.settings