Skip to content

compose: decouple livekit from default stack — behind live profile - #912

Merged
joelteply merged 2 commits into
canaryfrom
fix/livekit-decouple
May 11, 2026
Merged

joelteply merged 2 commits into
canaryfrom
fix/livekit-decouple

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Summary

  • LiveKit (server + bridge) moved behind live compose profile
  • Text chat works without LiveKit — voice/video opt-in via --profile live
  • continuum-core no longer depends_on livekit-bridge at startup

Why

Carl's first chat doesn't need WebRTC. Default stack should be minimal:
continuum-core + node-server + widget-server + model-init. Voice/video
is a feature discovery, not a prerequisite.

Saves ~300MB RAM + 3 ports + faster startup on default docker compose up.
Also eliminates the port 7882/UDP collision that blocked FlashGordon M1
cell testing during PR891.

Test plan

  • docker compose config --services shows no livekit in default
  • docker compose --profile live config --services includes both
  • Mac overlay (-f docker-compose.mac.yml) validates clean
  • Text chat works without --profile live (BigMama verified in PR891)

🤖 Generated with Claude Code

Text chat (Carl's first experience) doesn't need LiveKit. Voice/video
is opt-in via `docker compose --profile live up`.

Changes:
- livekit + livekit-bridge: profiles: [live] (was always-on)
- continuum-core: removed depends_on livekit-bridge (was blocking startup
  even when livekit-bridge wasn't needed for text chat)

Savings for default `docker compose up`:
- ~300MB RAM (livekit-server + livekit-bridge)
- 3 ports freed (7880 WS, 7881 TCP, 7882 UDP)
- Faster startup (no livekit healthcheck wait)
- Fewer port collisions with native dev tools (7882/UDP was
  the collision that blocked FlashGordon M1 cell test earlier)

livekit-grid stays in `grid` profile (unchanged).

docker compose config validates clean for default, --profile live,
--profile grid, and Mac overlay.
Copilot AI review requested due to automatic review settings April 17, 2026 18:21

Copilot AI 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.

Pull request overview

This PR makes the default docker compose up stack smaller by gating LiveKit (and the Rust livekit-bridge) behind a live compose profile, so text chat works without pulling in WebRTC services.

Changes:

  • Removed continuum-core’s startup dependency on livekit-bridge.
  • Moved livekit-bridge behind profiles: [live].
  • Moved livekit behind profiles: [live] and updated inline guidance/comments accordingly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docker-compose.yml
Comment on lines +88 to +90
# Core starts independently; connections to optional services (postgres
# pool, livekit bridge socket) retry on demand. Text chat works without
# any profile active — voice/video requires `--profile live`.

Copilot AI Apr 17, 2026

Copy link

Choose a reason for hiding this comment

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

The comment says optional service connections (including the livekit-bridge socket) “retry on demand”, but continuum-core’s bridge client currently does a single UnixStream::connect() attempt and returns an error if the socket isn’t present; voice_register_session just logs that error and doesn’t retry. With --profile live, this can create a startup race where the first voice session fails if triggered before livekit-bridge finishes booting. Consider either (a) adjusting this comment to reflect the actual behavior (best-effort connect, may fail until bridge is up), or (b) adding a small retry/backoff around the initial bridge socket connect so voice can succeed immediately after stack startup.

Suggested change
# Core starts independently; connections to optional services (postgres
# pool, livekit bridge socket) retry on demand. Text chat works without
# any profile active — voice/video requires `--profile live`.
# Core starts independently; connections to optional services are
# best-effort at startup and may fail until those services are ready
# (for example, the livekit bridge socket when using `--profile live`).
# Text chat works without any profile active — voice/video requires
# `--profile live`.

Copilot uses AI. Check for mistakes.
Browser can't resolve 'ws://livekit:7880' — that's Docker-internal DNS,
only works from inside containers. The browser runs on the host where
'livekit' is not a valid hostname. localhost:7880 works because the
livekit container binds port 7880 to the host.

Grid mode unaffected — explicitly sets LIVEKIT_BROWSER_URL=ws://tailscale:7880.

Fixes the 14-persona-3D-call from the README headline — collaboration/live/join
now returns a browser-reachable LiveKit URL.
@joelteply
joelteply enabled auto-merge (squash) May 2, 2026 14:57
@joelteply
joelteply disabled auto-merge May 2, 2026 15:03
@joelteply
joelteply changed the base branch from main to canary May 4, 2026 16:10
@joelteply
joelteply merged commit 6875fa6 into canary May 11, 2026
3 checks passed
@joelteply
joelteply deleted the fix/livekit-decouple branch May 11, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants