Skip to content

Comments

Refactor Home Assistant plugin and MCP client for improved configurat…#280

Merged
AnkushMalaker merged 1 commit intodevfrom
fix/coderabbit-fixes
Jan 28, 2026
Merged

Refactor Home Assistant plugin and MCP client for improved configurat…#280
AnkushMalaker merged 1 commit intodevfrom
fix/coderabbit-fixes

Conversation

@AnkushMalaker
Copy link
Collaborator

@AnkushMalaker AnkushMalaker commented Jan 28, 2026

…ion and error handling

  • Updated HomeAssistantPlugin to standardize string usage for configuration parameters.
  • Enhanced MCPClient to improve error handling and logging during memory operations.
  • Refactored OpenMemoryMCPService to streamline memory entry conversion and improve metadata handling.
  • Improved transcription job handling in transcription_jobs.py for better error reporting and session management.
  • Updated mock-services.yml to change model_url for testing compatibility with Docker environments.

Summary by CodeRabbit

  • Bug Fixes

    • Improved error detection in batch transcription operations with earlier failure notification.
    • Enhanced memory service health checks and response validation.
  • Improvements

    • Home Assistant integration now auto-discovers app configurations for improved reliability.
    • Refined memory metadata handling and logging for better diagnostics.

✏️ Tip: You can customize this high-level summary in your review settings.

…ion and error handling

- Updated HomeAssistantPlugin to standardize string usage for configuration parameters.
- Enhanced MCPClient to improve error handling and logging during memory operations.
- Refactored OpenMemoryMCPService to streamline memory entry conversion and improve metadata handling.
- Improved transcription job handling in transcription_jobs.py for better error reporting and session management.
- Updated mock-services.yml to change model_url for testing compatibility with Docker environments.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 28, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Changes include string and style normalization across backend files, API usage updates (switching to discover_entities() method), new app-id resolution logic in memory service calls, enhanced logging and metadata handling for memory operations, improved batch transcription error detection with pre-checks, and a Docker host configuration URL update for test services.

Changes

Cohort / File(s) Summary
Home Assistant Plugin
backends/advanced/src/advanced_omi_backend/plugins/homeassistant/plugin.py
String literal normalization (single to double quotes), type hint formatting with quoted type names, API usage change from get_all_entities() to discover_entities(), minor dictionary key formatting, and SUPPORTED_ACCESS_LEVELS constant format adjustment.
Memory Service Providers
backends/advanced/src/advanced_omi_backend/services/memory/providers/mcp_client.py, backends/advanced/src/advanced_omi_backend/services/memory/providers/openmemory_mcp.py
App-id discovery logic added to add_memories via /api/v1/apps/ query; enhanced memory metadata with user_email inclusion; richer logging for creation/response details; improved response handling with deduplication and error scenarios; normalized result conversion with robust field extraction; consistent metadata and result formatting.
Transcription Jobs
backends/advanced/src/advanced_omi_backend/workers/transcription_jobs.py
Import reorganization and refactoring; added pre-check for batch_job.is_failed in polling loop to raise RuntimeError on failure (changes error handling control flow); string formatting adjustments in logs and dictionary literals with no logic impact.
Test Configuration
tests/configs/mock-services.yml
Updated mock STT model URL from http://localhost:9999 to http://host.docker.internal:9999 under models.mock-stt.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

⚠️ Robot Framework Test Results (No API Keys)

Status: ❌ Some tests failed

ℹ️ Note: This run excludes tests requiring external API keys (Deepgram, OpenAI).
Tests tagged with requires-api-keys will run on dev/main branches.

Metric Count
✅ Passed 87
❌ Failed 8
📊 Total 95

📊 View Reports

GitHub Pages (Live Reports):

Download Artifacts:


View full workflow run

@AnkushMalaker
Copy link
Collaborator Author

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 28, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@AnkushMalaker AnkushMalaker merged commit c170a02 into dev Jan 28, 2026
1 of 2 checks passed
@AnkushMalaker AnkushMalaker deleted the fix/coderabbit-fixes branch February 7, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant