Skip to content

fix: correct greeting conversation state logic bugs#2298

Open
wtoqxy0000 wants to merge 3 commits intoOpenMind:mainfrom
wtoqxy0000:fix/greeting-conversation-state-bugs
Open

fix: correct greeting conversation state logic bugs#2298
wtoqxy0000 wants to merge 3 commits intoOpenMind:mainfrom
wtoqxy0000:fix/greeting-conversation-state-bugs

Conversation

@wtoqxy0000
Copy link
Contributor

Summary

  • Bug 1: reset_state() in greeting_conversation_state_provider.py ignores its initial_state parameter — line 585 unconditionally overwrites self.current_state with CONVERSING, making the parameter useless. The caller approaching_person.py passes ENGAGING but it never takes effect.
  • Bug 2: connect() in both greeting_conversation_elevenlabs.py and greeting_conversation_kokoro.py compares response.get("current_state") against ConversationState.FINISHED (enum object), but process_conversation() returns self.current_state.value (string "finished"). The comparison is always False, so the context update is never sent from connect(). The tick() method in the same files already correctly uses .value.

Changes

File Change
src/providers/greeting_conversation_state_provider.py:585 Remove duplicate self.current_state = ConversationState.CONVERSING
src/actions/.../greeting_conversation_elevenlabs.py:135 ConversationState.FINISHEDConversationState.FINISHED.value
src/actions/.../greeting_conversation_kokoro.py:149 ConversationState.FINISHEDConversationState.FINISHED.value
3 test files Update assertions to match corrected behavior

Test plan

  • All 59 greeting_conversation tests pass locally
  • pre-commit hooks pass

1. Remove duplicate assignment in reset_state() that always overwrites
   the initial_state parameter with CONVERSING, causing callers like
   approaching_person to never enter the ENGAGING state.

2. Compare against ConversationState.FINISHED.value (string) instead of
   ConversationState.FINISHED (enum) in connect() of both elevenlabs
   and kokoro connectors, matching the dict returned by
   process_conversation() which uses .value. The tick() method in the
   same files already uses .value correctly.
@wtoqxy0000 wtoqxy0000 requested review from a team as code owners February 16, 2026 15:58
@github-actions github-actions bot added robotics Robotics code changes python Python code tests Test files labels Feb 16, 2026
@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@0xbyt4
Copy link
Collaborator

0xbyt4 commented Feb 16, 2026

  1. fix is incomplete: removing line 585 exposes that _determine_next_state() has no ENGAGING handler maybe robot will get stuck ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Python code robotics Robotics code changes tests Test files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants