refactor: rename MESH_* env vars to STUDIO_* with fallback#4645
Open
viktormarinho wants to merge 1 commit into
Open
refactor: rename MESH_* env vars to STUDIO_* with fallback#4645viktormarinho wants to merge 1 commit into
viktormarinho wants to merge 1 commit into
Conversation
Central read points now prefer STUDIO_* and fall back to the legacy MESH_* name with a one-time deprecation warning (envWithFallback in apps/mesh/src/settings/env-fallback.ts). settings.meshJwtSecret is renamed to studioJwtSecret (in-memory only, never persisted). The runtime SDK sets env.STUDIO_REQUEST_CONTEXT alongside the deprecated MESH_REQUEST_CONTEXT alias and reads new-then-old. Helm templates still set MESH_DISPATCH_ROLE on purpose (old images have no fallback); full chart rename is task 09. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
viktormarinho
force-pushed
the
chore/demesh-06-env-vars
branch
from
July 16, 2026 23:43
f2ba73b to
63881fd
Compare
viktormarinho
added a commit
that referenced
this pull request
Jul 20, 2026
De-mesh task 09 (deploy/infra). Renames the remaining "mesh" identifiers in deploy/, tests/multi-pod and the CI wiring that references them: - chart-deco-studio: configMap.meshConfig -> configMap.studioConfig (breaking for values files; a fail-guard rejects the old key with a clear message). Chart 0.12.2 -> 0.13.0. - Dispatch role env: the chart now sets STUDIO_DISPATCH_ROLE as the canonical variable and keeps MESH_DISPATCH_ROLE as an alias so both pre- and post-#4645 images work; both names are reserved. - sandbox-env: mesh.* values block -> studio.* (breaking for values / --set flags; fail-guard on the old key). Chart 0.9.5 -> 0.10.0. Prose/comments de-meshed across templates, README, examples and the housekeeper script; release-sandbox-charts.yaml install snippet updated to --set studio.*. - tests/multi-pod: compose services mesh-1/2/3 -> studio-1/2/3 (and POD_NAME, YAML anchors), with the PODS constants, PodName type and scenario literals renamed to match; multi-pod.yml log dump updated. - /app/data/mesh.db is intentionally KEPT: it is a persisted sqlite file on existing volumes and renaming it would orphan data. apps/mesh directory paths, MESH_* env vars in tests/resilience (PR #4645), and the @decocms/mesh package/workflow names are out of scope here (tasks 10 / other open de-mesh PRs). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
viktormarinho
added a commit
that referenced
this pull request
Jul 21, 2026
De-mesh task 09 (deploy/infra). Renames the remaining "mesh" identifiers in deploy/, tests/multi-pod and the CI wiring that references them: - chart-deco-studio: configMap.meshConfig -> configMap.studioConfig (breaking for values files; a fail-guard rejects the old key with a clear message). Chart 0.12.2 -> 0.13.0. - Dispatch role env: the chart now sets STUDIO_DISPATCH_ROLE as the canonical variable and keeps MESH_DISPATCH_ROLE as an alias so both pre- and post-#4645 images work; both names are reserved. - sandbox-env: mesh.* values block -> studio.* (breaking for values / --set flags; fail-guard on the old key). Chart 0.9.5 -> 0.10.0. Prose/comments de-meshed across templates, README, examples and the housekeeper script; release-sandbox-charts.yaml install snippet updated to --set studio.*. - tests/multi-pod: compose services mesh-1/2/3 -> studio-1/2/3 (and POD_NAME, YAML anchors), with the PODS constants, PodName type and scenario literals renamed to match; multi-pod.yml log dump updated. - /app/data/mesh.db is intentionally KEPT: it is a persisted sqlite file on existing volumes and renaming it would orphan data. apps/mesh directory paths, MESH_* env vars in tests/resilience (PR #4645), and the @decocms/mesh package/workflow names are out of scope here (tasks 10 / other open de-mesh PRs). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
De-mesh migration task 06: env vars. All
MESH_*environment variables are renamed toSTUDIO_*. Reads go through central points that prefer the new name and fall back to the legacy one with a one-time deprecation warning (envWithFallbackinapps/mesh/src/settings/env-fallback.ts), so existing deploys keep working unchanged.Renames
MESH_JWT_SECRETSTUDIO_JWT_SECRETMESH_DISPATCH_ROLESTUDIO_DISPATCH_ROLEMESH_PUBLIC_URLSTUDIO_PUBLIC_URLgetPublicUrl, warns once)MESH_CLUSTER_URLSTUDIO_CLUSTER_URLdeco link, warns once); dev-spawned link daemon + resilience compose now emit the new nameMESH_TEST_SESSION/MESH_BASE_URL(smoke script)STUDIO_TEST_SESSION/STUDIO_BASE_URL??, dev-only script)MESH_API_KEY/MESH_BASE_URL/MESH_ORG/MESH_AGENT_ID(UI-generated .env snippets)STUDIO_*equivalents@decocms/typegen) already readsSTUDIO_*first withMESH_*fallback; docs already useSTUDIO_*env.MESH_REQUEST_CONTEXT(runtime SDK)env.STUDIO_REQUEST_CONTEXTwithBindingssets both keys to the same object; internal reads prefer new then old; old key kept onDefaultEnvas@deprecatedso existing apps compile and runsettings.meshJwtSecretsettings.studioJwtSecretDocs (
architecture.mdxen/pt, architecture model, runtime/mesh-sdk READMEs) updated to theSTUDIO_*names.Left for task 09 (would break running clusters)
MESH_DISPATCH_ROLE(deploy/helm/studio/templates/*.yaml,_helpers.tplreserved-name checks, chart README). The chart is an external contract: an upgraded chart settingSTUDIO_DISPATCH_ROLEagainst an older app image (no fallback) would silently coerce every pod to roleall, breaking the api/worker split. New app images read both names, so the chart can flip safely in task 09.MESH_URL,MESH_RUNTIME_TOKEN,MESH_APP_NAME,MESH_APP_DEPLOYMENT_IDonDefaultEnv) are set by external hosts — renaming them is an SDK-major concern, out of scope here.MESH/mesh identifiers (MCP_MESH_KEYmetadata key,MESH_PUBLIC_tool prefix,__MESH_VERSION__build constant,mesh-storage://URIs,x-mesh-token) belong to other de-mesh tasks (refactor: rename mesh* internal identifiers to studio* #4619, refactor(auth): rename mesh token symbols to studio with back-compat #4622, refactor(storage): rename mesh-storage URIs to studio-storage with back-compat #4627) and are untouched.Breaking changes
None. Every rename either has a runtime fallback on the read side or only changes emitted examples/snippets whose documented consumers already accept both names.
Testing
env-fallback.test.ts(precedence, empty-string, unset),resolve-config.test.ts(STUDIO/MESH precedence + fallback for JWT secret and dispatch role),triggers.test.ts(STUDIO_REQUEST_CONTEXTread; existing tests keep covering theMESH_REQUEST_CONTEXTfallback).bun test apps/mesh/src/settings packages/runtime— 107 pass, 0 fail.bun run check— all workspaces pass.bun run lint— 30 warnings, identical to main baseline.bun run fmtclean.🤖 Generated with Claude Code
Summary by cubic
Renamed all MESH_* env vars to STUDIO_* with centralized fallback and one-time deprecation warnings. Updated the runtime SDK, CLI, docs, and UI snippets to prefer STUDIO_* without breaking existing deploys.
Refactors
Migration
Written for commit f2ba73b. Summary will update on new commits.