Files
omnigent-ai--omnigent/render.yaml
T
Zeyi (Rice) Fan b9d53f0a96 feat(server): add deployment-wide release feature flags (#4775)
## Related issue

Follow-up to #4673.

## Summary

- Add a typed, default-off release-feature registry driven by one comma-separated `OMNIGENT_FEATURES` environment variable, with strict validation and lifecycle metadata.
- Gate the web Usage route/navigation and page-only report enrichment while preserving the existing `GET /v1/usage` CLI API.
- Migrate web-driven harness installation to the same immutable startup snapshot and wire rollout configuration across Docker, Kubernetes, Render, Railway, and Databricks.

ELI5: the server reads one list of enabled features when it starts, enforces that same list on backend routes, and tells the web app which controls and pages to show.

```text
OMNIGENT_FEATURES
        |
        v
  FeatureFlags snapshot
     /             \
backend gates    GET /v1/info
                       |
                       v
                 frontend gates
```

## Test Plan

- `uv run pytest tests/server/test_feature_flags.py tests/host/test_local_server.py tests/server/integration/test_utility_endpoints.py tests/server/integration/test_hosts_install_harness.py tests/server/integration/test_hosts_store_credential.py tests/server/routes/test_usage_report.py tests/server/test_openapi_drift.py -q`
- `cd web && pnpm vitest run src/lib/capabilities.test.ts src/lib/harnessSetup.test.ts src/App.test.tsx src/shell/Sidebar.test.tsx`
- `uv run pytest tests/e2e_ui/sessions/test_usage_page_feature.py -q`
- `uv run python scripts/dump_openapi.py --check`
- `pre-commit run --files <changed files>`
- Verified default-off and enabled Usage route/sidebar behavior, strict unknown-feature rejection, legacy CLI usage compatibility, and harness route enforcement.

## Demo

- Default off: the updated visual baselines show the original sidebar without the Usage row.
- Enabled Usage page: https://github.com/user-attachments/assets/8385d4f0-47ad-430f-bf2c-06c35af6c499

## Type of change

- [ ] Bug fix
- [x] Feature
- [x] UI / frontend change
- [ ] Refactor / chore
- [x] Docs
- [ ] Test / CI
- [ ] Breaking change

## Test coverage

- [x] Unit tests added / updated
- [x] Integration tests added / updated
- [x] E2E tests added / updated
- [x] Manual verification completed
- [x] Existing tests cover this change
- [ ] Not applicable

## Coverage notes

Manually reviewed the default-off visual output and verified that the Usage route is absent while the capability is disabled. Targeted backend and frontend tests cover both flag states, capability parsing, startup snapshots, and harness enforcement.

## Changelog

Usage and web-driven harness setup can now be enabled per deployment with `OMNIGENT_FEATURES`.

Signed-off-by: Zeyi (Rice) Fan <zeyi.f@databricks.com>
2026-08-14 10:57:20 -07:00

56 lines
2.1 KiB
YAML

# Render blueprint: web service (pulls the CI image — it ships the gitignored
# web UI bundle a source build can't) + managed Postgres + data disk.
# Defaults to built-in `accounts` auth (multi-user, no IdP). Full walkthrough:
# deploy/render/README.md.
services:
- type: web
name: omnigent
runtime: image
image:
url: ghcr.io/omnigent-ai/omnigent-server:latest
# While the package is private, add image.creds.fromRegistryCreds (a GHCR
# read:packages token registered in the Render dashboard). Drop once public.
plan: starter
healthCheckPath: /health
disk:
name: artifact-data
mountPath: /data
sizeGB: 10
envVars:
- key: DATABASE_URL
fromDatabase:
name: omnigent-db
property: connectionString
- key: ARTIFACT_DIR
value: /data/artifacts
# Anchor the server's data dir on the persistent disk (this path's
# parent, /data) so file-backed operator config and the auto-minted
# cookie secret survive redeploys. No credentials file is written here.
- key: OMNIGENT_ADMIN_CREDENTIALS_PATH
value: /data/admin-credentials
- key: HOST
value: 0.0.0.0
# Comma-separated deployment-wide release features; empty is all off.
- key: OMNIGENT_FEATURES
value: ""
- key: OMNIGENT_AUTH_PROVIDER
value: accounts
- key: OMNIGENT_ACCOUNTS_AUTO_OPEN
value: "0"
# No COOKIE_SECRET or BASE_URL here: the entrypoint mints a hex cookie
# secret on the disk and auto-detects the public URL from RENDER_EXTERNAL_URL.
# (Render's generateValue isn't hex, which the server's bytes.fromhex rejects.)
# So this blueprint deploys with zero prompts — true 1-click.
#
# To use your own IdP instead of built-in accounts, set
# OMNIGENT_AUTH_PROVIDER=oidc and add the OMNIGENT_OIDC_* vars
# (including OMNIGENT_OIDC_COOKIE_SECRET = `openssl rand -hex 32`) in the
# Render dashboard. See deploy/render/README.md.
databases:
- name: omnigent-db
plan: basic-256mb
databaseName: omnigent
user: omnigent