fix(P2): 5 priority-2 bug fixes — emoji consolidation, DM safety, pause gap

#10  Redundant coin flip in join_conversation — removed the 50% random
     gate that doubled the V2 engine's own decision to act.

#11  Message-triggered actions skip _autonomous_paused — _check_and_act
     and _check_and_react now bail out immediately when the autonomous
     system is paused (voice session), matching the scheduled-tick path.

#12  Duplicate emoji dictionaries — removed MOOD_EMOJIS and
     EVIL_MOOD_EMOJIS from globals.py (had different emojis from moods.py).
     bipolar_mode.py and evil_mode.py now import the canonical dicts
     from utils/moods.py so all code sees the same emojis.

#13  DM mood can spontaneously become 'asleep' — rotate_dm_mood() now
     filters 'asleep' out of the candidate list since DMs have no
     sleepy-to-asleep transition guard and no wakeup timer.

#15  Engage-user fallback misreports action type — log level raised to
     WARNING with an explicit [engage_user->general] prefix so the
     cooldown-triggered fallback is visible in logs.
This commit is contained in:
2026-02-23 13:43:15 +02:00
parent 0e4aebf353
commit 2b743ed65e
6 changed files with 20 additions and 32 deletions

View File

@@ -162,9 +162,11 @@ async def rotate_dm_mood():
old_mood = globals.DM_MOOD
new_mood = old_mood
attempts = 0
# Filter out 'asleep' — DMs have no sleepy→asleep transition guard
dm_eligible = [m for m in globals.AVAILABLE_MOODS if m != "asleep"]
while new_mood == old_mood and attempts < 5:
new_mood = random.choice(globals.AVAILABLE_MOODS)
new_mood = random.choice(dm_eligible)
attempts += 1
globals.DM_MOOD = new_mood