Skip to content

fix(env): simplify self-host runtime defaults - #814

Merged
izadoesdev merged 6 commits into
stagingfrom
codex/selfhost-runtime-defaults
Sep 17, 2026
Merged

izadoesdev merged 6 commits into
stagingfrom
codex/selfhost-runtime-defaults

Conversation

@izadoesdev

@izadoesdev izadoesdev commented Sep 16, 2026

Copy link
Copy Markdown
Member

SELFHOST=true keeps omitted service URLs local, lets queues reuse REDIS_URL, and prevents server product telemetry from starting, even with copied Databuddy keys. Explicit URL overrides still win; hosted defaults remain unchanged.

Adds explicit workspace dependencies for the existing environment helper. No new runtime settings or schema changes.

Validation: 30 focused environment, browser-config, Redis, and telemetry tests pass. The browser regression verifies both mode values, local versus hosted production URLs, and preserved pixel behavior. Root lint (22 policy checks), all 33 typecheck tasks, frozen install, and all 29 pre-push tasks pass.

Depends on #816 for exposing self-host mode to the dashboard browser bundle and #806 for SELFHOST forwarding through Turbo; both are merged. Rebased directly onto staging containing #816. Preserves the existing Docker build argument and browser-mode forwarding; complements the short environment template and Compose setup in #804.

@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
databuddy-status Ready Ready Preview Sep 17, 2026 7:56am UTC
2 Skipped Deployments
Project Deployment Actions Updated
dashboard Skipped Skipped Sep 17, 2026 7:56am UTC
documentation Skipped Skipped Sep 17, 2026 7:56am UTC

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 9c29cdc8-015d-4cbf-ba55-2c2b89047429

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@unkey-deploy

unkey-deploy Bot commented Sep 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Unkey Deploy

Name Status Preview Inspect Updated (UTC)
links (preview) Ready Visit Preview Inspect Sep 17, 2026 7:56am

@greptile-apps

greptile-apps Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no actionable regression remains in the final change or previously reviewed runtime behavior.

Summary

This PR simplifies self-hosted runtime defaults while preserving explicit overrides and hosted behavior.

  • Uses local service URLs by default when SELFHOST is enabled, including browser-facing dashboard configuration.
  • Allows self-hosted BullMQ producers and workers to fall back to the shared REDIS_URL.
  • Prevents server product telemetry from initializing in self-host mode.
  • Adds the required workspace dependency declarations and focused regression coverage.
  • Isolates Links test files to prevent shared module-mock ordering conflicts on Linux CI.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    Mode{SELFHOST enabled?}
    Explicit{Explicit service URL?}
    Explicit -->|Yes| Override[Use explicit URL]
    Explicit -->|No| Mode
    Mode -->|Yes| Local[Use local service defaults]
    Mode -->|No| Hosted[Use hosted production defaults]
    Mode -->|Yes| TelemetryOff[Do not initialize product telemetry]
    Mode -->|Yes| QueueFallback[BullMQ may reuse REDIS_URL]
    Mode -->|No| QueueSpecific[Require queue-specific BullMQ URL]
Loading

Reviews (3) · Last reviewed commit: "test(links): isolate environment module ..."

Comment thread packages/env/src/public.ts
Comment thread packages/ai/src/lib/databuddy.test.ts Outdated
@izadoesdev

Copy link
Copy Markdown
Member Author

@greptileai review this. Final head ebe714f is rebased onto staging containing merged #816 and #806. Browser mode forwarding is now present and the existing Next regression verifies self-host and hosted production URL defaults plus signup tracking. SDK mocks use exported SDK types. The external Docker commit is preserved. All 30 focused tests, lint, 33 type tasks, and 29 pre-push tasks pass.

@izadoesdev

Copy link
Copy Markdown
Member Author

@greptileai review this. Final head 218cb66 adds only --isolate to the existing Links test command, fixing the Linux CI ordering conflict where a route test replaced the shared environment module before producer tests imported readBooleanEnv. All 27 Links tests and all 29 repository test tasks pass. The previously reviewed runtime changes and merged dependency base are unchanged.

@izadoesdev
izadoesdev merged commit 1c42c5c into staging Sep 17, 2026
22 checks passed
@izadoesdev
izadoesdev deleted the codex/selfhost-runtime-defaults branch September 17, 2026 08:03
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