Repository navigation
refactor(den-api): group settings, move tuning out, prove parity - #7734
Open
benjaminshafii wants to merge 8 commits into
Open
benjaminshafii wants to merge 8 commits into
benjaminshafii wants to merge 8 commits into
Conversation
…ery installer Workbot, the Slack assistant, Automations, the AI Gateway and cloud computers are controlled in several places with different defaults per installer. The catalog records, for managed AWS, managed Google Cloud, the Helm chart and the AWS ECS and Cloud Run modules, whether each capability is supported and which Terraform variables, Helm values and Den switches implement it. A drift test reads the Terraform roots and modules, the chart and Den, and fails when a control is missing or its default differs from the catalog. Today's inconsistencies are recorded as gaps and pinned. A capability may not depend on a rollout flag in the customer's deployment unless it is a recorded gap. The configuration change planner now reads its fixed and editable rules from the catalog. The test runs in pnpm check and the required quick check. The Helm README example used retired feature keys and said cloud-only features have no key; both are corrected and the example is now tested.
…tructure or unsupported
GET /v1/org adds deploymentCapabilities.capabilities, derived from settings
Den already has (configured services, its Automations and Slack switches, the
organization's features). No network call is made, and the aiGateway boolean
is unchanged.
GET /v1/managed-deployments/{deploymentId}/capabilities reports the same for a
managed deployment from its recorded target: runtime profile, assistant
settings and computer provider on AWS, unsupported on Google Cloud.
…tuning out env.ts read 210 variables from one flat list. They are now four named groups in env-schema.ts: 12 core settings a self-hosted install sets, optional capabilities, OpenWork Cloud only, and legacy or internal names. Validators and the cross-field rules are unchanged. 39 timings, batch sizes and timeouts of background work move to tuning.ts with the same defaults. Each still reads its variable, so a value set on a running service keeps working; they are no longer listed in .env.example, which now opens with the core settings. The env object den-api code reads keeps every field.
Five whole environments are parsed by a new den-api process each and compared field for field with what was recorded before the settings were regrouped: OpenWork Cloud (separate API origin, hosted database, variables Render adds, tuning set by hand, variables left behind by removed code), the managed AWS gateway and legacy profiles as their Terraform passes them, the Helm chart 0.2.0 ConfigMap and Secret as helm template renders them, and a self-hosted install that sets only its address, database, secrets and first administrator. The recorded files were produced by the env.ts this branch started from. The same run on origin/dev differs only by documentsOffice, which dev has since removed. Runs in pnpm check and with the Den API tests in the quick check.
Den Web's server needed DEN_API_BASE to proxy requests, read the workspace icon and check single sign-on. When it is unset the public API address is now used: DEN_API_PUBLIC_URL, else api.<host> from DEN_BASE_URL. A DEN_API_BASE that is set is used exactly as before.
…llation environments pnpm --filter @openwork-ee/den-api smoke:env-boot starts dist/main.js twice on a new local MySQL database, migrated the way a deployment migrates it: once with the OpenWork Cloud environment and once with a self-hosted install that sets its address, database, two secrets, first administrator and setup code. It signs the first administrator in, reads /health, /ready, /v1/org and /v1/org/diagnostics, and fails if any secret value appears in a response. The Cloud environment keeps its shape but points at hosts that never resolve, and the keys of services that would be called are left out.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
benjaminshafii
force-pushed
the
feat/deployment-capability-catalog
branch
from
November 28, 2026 01:29
ef11b99 to
f4e9116
Compare
benjaminshafii
force-pushed
the
feat/deployment-capability-catalog
branch
from
November 28, 2026 01:35
f4e9116 to
7bcbea6
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this about?
den-api's settings: one flat list of 210 variables becomes 12 core settings plus three named groups, and 39 internal timings leave the installation surface. Den Web no longer needs
DEN_API_BASE.What problem does it solve?
A self-hosted operator could not tell which variables matter. Nothing guarded how OpenWork Cloud or an existing install reads its environment when that code changes.
What was the situation before?
tuning.ts: same defaults, each variable still honored.env.examplePORTandCORS_ORIGINSDEN_API_BASEDEN_API_PUBLIC_URL, elseapi.<host>How is this implemented?
env-schema.tsholds the same validators, regrouped.env.tskeeps every derivation andenvkeeps every field, so no caller changes.api.<host>) and MCP fromDEN_BASE_URL, and an explicit value still wins./api/denis a redirect for old desktops, so it is not a fallback.test/env-prod-parity.test.tsparses OpenWork Cloud, managed AWS (gateway, legacy), Helm chart 0.2.0 and a minimal self-hosted install, each in a new process.readDenApiBase().What else changed?
pnpm checkand the quick check's Den job run the parity test.smoke:env-bootboots the built server on a new database.documentsgroup anddocumentsOffice, thenenv:parity:write. A trial rebase gave output byte-identical to untoucheddevfor all five.Release note
Self-hosted installs set one address,
DEN_BASE_URL: Den Web no longer needsDEN_API_BASE.Evidence
ee/apps/den-api/test/env-prod-parity.test.ts— before: recorded from the untouchedenv.ts; after: identical.smoke:env-boot: the built server starts with the Cloud and the minimal environment, four routes answer 200, no secret in a response. No E2E: no screen changed.