Skip to content

feat(services): add Mux managed embedded service - #254

Merged
KooshaPari merged 1 commit into
mainfrom
port/mux-service
Jul 3, 2026
Merged

KooshaPari merged 1 commit into
mainfrom
port/mux-service

Conversation

@KooshaPari

Copy link
Copy Markdown
Owner

Port of diegosouzapw#6034 — Mux as a managed embedded service (install/start/stop/restart/update/status/auto-start + logs, dashboard tab, seed migration, route-guard local-only classification).

Follows the 'Adding a New Embedded Service' checklist: installer (src/lib/services/installers/mux.ts), bootstrap registration, seed migration (113), 7 API endpoints under /api/services/mux/, dashboard tab, docs (EMBEDDED-SERVICES, openapi, ENVIRONMENT), and unit tests (installer + route-guard + dashboard tab, 41 tests green). typecheck:core clean.

Co-authored-by: Ansh7473 Ansh7473@users.noreply.github.com

…pw#6034)

Co-authored-by: Ansh7473 <Ansh7473@users.noreply.github.com>
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@KooshaPari, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 10 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c699b52e-76bc-4862-85b9-80eee826dc66

📥 Commits

Reviewing files that changed from the base of the PR and between 2ec8e0b and 7e625af.

📒 Files selected for processing (23)
  • .env.example
  • CHANGELOG.md
  • docs/frameworks/EMBEDDED-SERVICES.md
  • docs/openapi.yaml
  • docs/reference/ENVIRONMENT.md
  • src/app/(dashboard)/dashboard/providers/services/page.tsx
  • src/app/(dashboard)/dashboard/providers/services/tabs/MuxServiceTab.tsx
  • src/app/api/services/[name]/logs/route.ts
  • src/app/api/services/mux/_lib.ts
  • src/app/api/services/mux/auto-start/route.ts
  • src/app/api/services/mux/install/route.ts
  • src/app/api/services/mux/restart/route.ts
  • src/app/api/services/mux/start/route.ts
  • src/app/api/services/mux/status/route.ts
  • src/app/api/services/mux/stop/route.ts
  • src/app/api/services/mux/update/route.ts
  • src/lib/db/migrations/113_mux_service_seed.sql
  • src/lib/services/apiKey.ts
  • src/lib/services/bootstrap.ts
  • src/lib/services/installers/mux.ts
  • tests/unit/authz/routeGuard.test.ts
  • tests/unit/dashboard/providers/services/mux-tab.test.ts
  • tests/unit/services/installers/mux.test.ts

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "review"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch port/mux-service

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.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

L17 Latency Budget Report

--- Latency Budget Summary ---
  Total endpoints checked: 0
  Passed: 0
  Warnings: 0
  Failures: 0

Checked against: budgets/rest-endpoints.yaml.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

L17 Latency Regression Report

No trace file available — skipping latency regression comparison.

Threshold: 10% p99 regression.

@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
18.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@KooshaPari
KooshaPari merged commit e6811ee into main Jul 3, 2026
64 of 73 checks passed
@KooshaPari
KooshaPari deleted the port/mux-service branch July 3, 2026 05:00
KooshaPari added a commit that referenced this pull request Jul 3, 2026
…263)

113_cli_access_tokens.sql (#202) and 113_mux_service_seed.sql (#254 Mux)
both landed on the 113 slot after parallel wave merges. migrationRunner
getMigrationFiles() throws "Migration version collision detected" on any
fresh DB init when two live files share a numeric prefix, breaking startup.

Renumber the Mux seed (the later, non-superseded arrival) to the next free
slot 122. It is a self-contained INSERT OR IGNORE, so re-running under the
new version on already-migrated DBs is a harmless no-op.

Verified: db-migration-runner (26), check-migration-numbering (15),
db-migration-version-uniqueness (2), usage-analytics (12) all pass.
try {
const row = await getServiceRow(TOOL);
if (!row || row.status === "not_installed") {
return createErrorResponse({ status: 409, message: "Mux não está instalado." });

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CRITICAL: Error message is in Portuguese instead of English

The error message "Mux não está instalado." is inconsistent with the codebase's English language convention for API responses. This could confuse API consumers expecting English messages.

Suggested change
return createErrorResponse({ status: 409, message: "Mux não está instalado." });
return createErrorResponse({ status: 409, message: "Mux is not installed." });

Reply with @kilocode-bot fix it to have Kilo Code address this issue.

try {
const row = await getServiceRow(TOOL);
if (!row || row.status === "not_installed") {
return createErrorResponse({ status: 409, message: "Mux não está instalado." });

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CRITICAL: Error message is in Portuguese instead of English

Same issue as the start route - the error message uses Portuguese instead of English.

Suggested change
return createErrorResponse({ status: 409, message: "Mux não está instalado." });
return createErrorResponse({ status: 409, message: "Mux is not installed." });

Reply with @kilocode-bot fix it to have Kilo Code address this issue.

const row = await getServiceRow(TOOL);

const liveStatus = sup?.getStatus() ?? null;
const installedVersion = await getInstalledVersion();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

WARNING: Missing provider_expose field in status response

The status response is missing the provider_expose field that appears in other embedded service status responses (9Router status includes it). According to the EMBEDDED-SERVICES.md doc, Mux has provider_expose=0, so this should be included for consistency.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Jul 5, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 2
WARNING 0
SUGGESTION 0
Issue Details (click to expand)

CRITICAL

File Line Issue
src/app/api/services/mux/start/route.ts 12 Error message is in Portuguese ("Mux não está instalado.") instead of English - inconsistent with codebase convention
src/app/api/services/mux/restart/route.ts 12 Same Portuguese error message inconsistency

WARNING

File Line Issue
src/app/api/services/mux/status/route.ts 19 Missing providerExpose field in status response (present in 9router status for consistency)
Files Reviewed (23 files)
  • src/app/api/services/mux/start/route.ts - 1 issue
  • src/app/api/services/mux/restart/route.ts - 1 issue
  • src/app/api/services/mux/status/route.ts - 1 issue
  • All other files reviewed - clean

Fix these issues in Kilo Cloud


Reviewed by laguna-m.1-20260312:free · Input: 257.9K · Output: 7K · Cached: 1.6M

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