Skip to content

Fix/speaker backend integration#133

Merged
AnkushMalaker merged 2 commits into
mainfrom
fix/speaker-backend-integration
Oct 20, 2025
Merged

Fix/speaker backend integration#133
AnkushMalaker merged 2 commits into
mainfrom
fix/speaker-backend-integration

Conversation

@AnkushMalaker

@AnkushMalaker AnkushMalaker commented Oct 20, 2025

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Added shared network infrastructure enabling cross-project service communication.
  • Improvements

    • The stop --all command now stops only configured services, providing better control over service termination.

@coderabbitai

coderabbitai Bot commented Oct 20, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Configuration files for Docker Compose services are updated to define a shared network for cross-project communication. Additionally, the service stop command is refined to only stop services that are explicitly configured, rather than stopping all services unconditionally.

Changes

Cohort / File(s) Summary
Shared network configuration
backends/advanced/docker-compose.yml, extras/speaker-recognition/docker-compose.yml
Both files now declare a top-level networks block defining a default network named friend-network for cross-project communication. Minor whitespace adjustment applied to backends/advanced/docker-compose.yml.
Service stop filtering
services.py
The stop --all command now filters services using check_service_configured() to only stop configured services, rather than stopping all services unconditionally.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A network blooms where services meet,
Friend-network bridges projects sweet,
And when it's time to stop and rest,
We pause the ones already blessed! 🐰✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "Fix/speaker backend integration" is related to the changeset and captures the overall objective of the changes. The pull request modifies speaker-recognition and backend docker-compose files to add a shared "friend-network" for cross-project communication and updates service.py to filter configured services. While the title doesn't specify the technical implementation details (network configuration and service filtering), it does describe the main intent—establishing integration between speaker and backend components. The title is clear enough for teammates to understand the general purpose of the changes when scanning history.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/speaker-backend-integration

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.

@AnkushMalaker

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 20, 2025

Copy link
Copy Markdown
Contributor
✅ 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 04a28e2 into main Oct 20, 2025
2 checks passed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dc98c72 and ebfacbf.

📒 Files selected for processing (3)
  • backends/advanced/docker-compose.yml (2 hunks)
  • extras/speaker-recognition/docker-compose.yml (1 hunks)
  • services.py (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: speaker-recognition-tests
🔇 Additional comments (3)
services.py (1)

308-309: LGTM! Excellent consistency improvement.

Making stop --all filter by configured services matches the start --all behavior at line 291, creating a symmetric and intuitive user experience.

backends/advanced/docker-compose.yml (2)

203-203: LGTM! Minor whitespace cleanup.


214-217: LGTM! Shared network completes the backend-speaker integration.

This network configuration matches extras/speaker-recognition/docker-compose.yml and enables the backend service to communicate with the speaker-recognition service using the SPEAKER_SERVICE_URL environment variable (line 23).

Comment on lines +106 to +110

# Shared network for cross-project communication
networks:
default:
name: friend-network

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

LGTM! Shared network enables cross-project service communication.

The friend-network configuration allows the backend service to communicate with speaker-recognition services across Docker Compose projects. Since services.py manages both projects together, network lifecycle is handled appropriately.

Verify whether asr-services and openmemory-mcp should also use the shared network for consistency:


🏁 Script executed:

#!/bin/bash
# Check if other services have docker-compose files and whether they might need the shared network

echo "=== Checking asr-services docker-compose.yml ==="
if [ -f "extras/asr-services/docker-compose.yml" ]; then
    echo "File exists. Checking for network configuration:"
    grep -A 5 "^networks:" extras/asr-services/docker-compose.yml || echo "No networks block found"
else
    echo "File not found"
fi

echo -e "\n=== Checking openmemory-mcp docker-compose.yml ==="
if [ -f "extras/openmemory-mcp/docker-compose.yml" ]; then
    echo "File exists. Checking for network configuration:"
    grep -A 5 "^networks:" extras/openmemory-mcp/docker-compose.yml || echo "No networks block found"
else
    echo "File not found"
fi

echo -e "\n=== Checking if backend references these services ==="
grep -E "ASR|OPENMEMORY|asr-service|openmemory" backends/advanced/docker-compose.yml || echo "No direct references found in backend docker-compose"

Length of output: 352


I need to check how OFFLINE_ASR_TCP_URI is configured and whether asr-services actually runs services that need cross-project network access.

Now I need to verify what OFFLINE_ASR_TCP_URI is configured to and whether asr-services runs services that need the shared network:The web search didn't provide clarity on the specific codebase's asr-services. Let me check the actual configuration files directly:

Based on the verification results and Docker Compose networking documentation, I have enough information to generate the rewritten review comment. The key findings are:

  1. Script output shows asr-services and openmemory-mcp have NO networks block (isolated networks)
  2. Backend references OFFLINE_ASR_TCP_URI (suggesting potential cross-project communication need)
  3. Docker Compose documentation confirms: by default, docker-compose projects run in separate networks; by creating an external network and declaring it in every project, containers from different projects can talk with each other
  4. The speaker-recognition service is now configured with friend-network, enabling backend communication

However, the key insight is that asr-services and openmemory-mcp are not explicitly configured to use the shared network, yet the backend references ASR services. This represents a potential missing configuration issue that requires the developer to verify whether these services need the shared network.

Configuration inconsistency: asr-services and openmemory-mcp should also use friend-network for cross-project communication.

The backend service references OFFLINE_ASR_TCP_URI, indicating a need for cross-project communication with services managed through services.py. Currently, only speaker-recognition uses the friend-network, but asr-services and openmemory-mcp have no explicit network configuration, leaving them in isolated project-specific networks. By default, docker-compose projects run in separate networks; however, by creating an external network and declaring it in every project, containers from different projects can talk with each other.

Add network configuration to asr-services and openmemory-mcp docker-compose files:

  • Add networks block with name: friend-network (matching speaker-recognition)
  • This ensures consistent cross-project communication setup across all services managed by services.py
🤖 Prompt for AI Agents
extras/speaker-recognition/docker-compose.yml lines 106-110: The compose file
creates an external network named friend-network for speaker-recognition, but as
noted OFFLINE_ASR_TCP_URI and backend code imply cross-project ASR
communication; inspect the asr-services and openmemory-mcp docker-compose files
and, if those services must be reachable across projects, add a networks block
pointing to the same external friend-network (matching name and external: true)
so containers live on the shared network; also verify OFFLINE_ASR_TCP_URI
resolves to the service hostname on that network and update compose/service
names or the URI accordingly.

@AnkushMalaker AnkushMalaker deleted the fix/speaker-backend-integration branch October 21, 2025 13:31
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