fix(mac): gate native LiveKit bridge behind explicit profile#1071
fix(mac): gate native LiveKit bridge behind explicit profile#1071joelteply wants to merge 4 commits into
Conversation
84d9e08 to
dbf0991
Compare
There was a problem hiding this comment.
Pull request overview
This PR keeps LiveKit opt-in across native/Mac startup paths by adding an environment-gated native livekit-bridge, skipping the Mac bridge container, and aligning startup/build scripts around CONTINUUM_LIVEKIT_NATIVE.
Changes:
- Adds
livekit-bridgeto worker config behindCONTINUUM_LIVEKIT_NATIVE. - Gates native LiveKit SFU/bridge startup and selected Rust build paths.
- Disables the containerized bridge in the Mac compose overlay.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/workers/workers-config.json |
Adds native livekit-bridge worker entry gated by env var. |
src/workers/start-workers.sh |
Adds env-gated worker filtering and native LiveKit startup behavior. |
src/scripts/parallel-start.sh |
Builds livekit-bridge only when native LiveKit is enabled. |
src/package.json |
Updates worker build/status scripts to respect enabledEnv. |
docker-compose.mac.yml |
Documents and disables the Mac containerized livekit-bridge. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "worker:build": "jq -c '.workers[] | select(.enabled != false)' workers/workers-config.json | while read -r w; do dir=$(echo $w | jq -r '.binary' | sed 's|/target/.*||'); echo \"Building $(echo $w | jq -r '.name')...\"; (cd $dir && cargo build --release --quiet); done", | ||
| "worker:build": "jq -c '.workers[] | select((.enabled // true) != false) | select((.enabledEnv // \"\") as $e | $e == \"\" or ((env[$e] // \"\") | test(\"^(1|true|TRUE|yes|YES|on|ON)$\")))' workers/workers-config.json | while read -r w; do dir=$(echo $w | jq -r '.binary' | sed 's|/target/.*||'); echo \"Building $(echo $w | jq -r '.name')...\"; (cd $dir && cargo build --release --quiet); done", | ||
| "worker:models": "./scripts/download-voice-models.sh", | ||
| "worker:start": "./scripts/download-voice-models.sh && ./workers/start-workers.sh", |
| "worker:stop": "./workers/stop-workers.sh", | ||
| "worker:kill": "jq -r '.workers[].name' workers/workers-config.json | while read n; do pkill -f \"$n-worker\" || true; done; jq -r '.workers[].socket' workers/workers-config.json | xargs rm -f", | ||
| "worker:status": "jq -r '.workers[] | select(.enabled != false) | .name' workers/workers-config.json | while read n; do pgrep -f \"$n-worker\" > /dev/null && echo \"✅ $n-worker running\" || echo \"❌ $n-worker NOT running\"; done", | ||
| "worker:status": "jq -r '.workers[] | select((.enabled // true) != false) | select((.enabledEnv // \"\") as $e | $e == \"\" or ((env[$e] // \"\") | test(\"^(1|true|TRUE|yes|YES|on|ON)$\"))) | .name' workers/workers-config.json | while read n; do pgrep -f \"$n-worker\" > /dev/null && echo \"✅ $n-worker running\" || echo \"❌ $n-worker NOT running\"; done", |
| { | ||
| "name": "livekit-bridge", | ||
| "binary": "workers/target/release/livekit-bridge", | ||
| "socket": ".continuum/sockets/livekit-bridge.sock", | ||
| "args": [], | ||
| "description": "LiveKit WebRTC bridge for native continuum-core", | ||
| "enabled": true, | ||
| "enabledEnv": "CONTINUUM_LIVEKIT_NATIVE", | ||
| "memoryLimit": "2G" |
|
Mac peer review — LGTM. Clean opt-in gate architecture, addresses real Docker Desktop limitation: Strengths:
One micro-nit (NOT blocker): LGTM. The carl-install-smoke gate failure is the same #1085-image-revision blocker — independent of this PR's substance. Ship after image gate clears. |
|
Carl smoke is now failing in the intended fast preflight, not during install/runtime.\n\nCurrent head: |
Summary
Architecture
This does not weaken the GPU-first Docker path. Linux/Nvidia stays Docker-centric for GPU deployment; Docker live mode still starts the containerized LiveKit stack with
--profile live. Mac remains the exception for Metal/native host constraints and Unix socket behavior.This supersedes the broad #1026 shape: it keeps the useful Mac socket fix, but does not merge unrelated install-script readiness checks, socket chmod workarounds, or image-tag splitting into the same PR.
Validation
bash -n src/workers/start-workers.sh src/scripts/parallel-start.shjq empty src/workers/workers-config.jsongit diff --checkdocker compose config --services-> default excludes livekit/livekit-bridgedocker compose -f docker-compose.yml -f docker-compose.mac.yml config --services-> Mac overlay excludes livekit/livekit-bridgedocker compose --profile live config --services-> Docker live profile includes livekit/livekit-bridgeFollow-up