Repository navigation
feat: allow global variables to be substitution-only - #4651
Merged
kmendell merged 4 commits intoNov 6, 2026
Merged
Conversation
2 tasks done
kmendell
reviewed
Nov 5, 2026
Dim145
force-pushed
the
feat/global-variables-inject-flag
branch
from
November 5, 2026 17:14
a15ef66 to
68ae18b
Compare
Add a per-variable injectIntoContainers flag. New variables are only available for ${VAR} interpolation; existing ones keep being injected. Interpolation-only keys are marked in the .env.global header so values and marks are read from one snapshot.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e-import Overlapping in-place rewrites could leave a value behind without its no-inject mark, so .env.global is now replaced atomically (temp file and rename) instead of rewritten in place. Materialized variables carry a per-variable noInject flag in both the agent PUT and GET, so re-importing an agent's .env.global keeps interpolation-only keys out of containers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kmendell
force-pushed
the
feat/global-variables-inject-flag
branch
from
November 5, 2026 23:29
68ae18b to
dbb6155
Compare
kmendell
approved these changes
Nov 6, 2026
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.
Checklist
mainbranchm.*())What This PR Implements
Global variables can now be used for Compose
${VAR}substitution only, without being injected into every container. This also keeps secret global variables out of unrelated containers.Addresses #3407 (discussion #4035). Replaces #4630, which was closed automatically when
breaking/v3was deleted.Changes Made
injectIntoContainersflag: DB column, API create/update, CLI--inject, UI switch and "Injected" badge.00105(Goose Go migration): existing variables are set totrue, so upgrades keep the current behavior; new variables default tofalse.# arcane:noinject KEYlines in the.env.globalheader, ahead of every value. The env loader reads values and marks from the same read and skips marked keys when injecting.noInjectflag (omitted when false) in both the agent PUT and GET, so a re-added agent keeps its interpolation-only keys on import. Local.env.globalis replaced atomically.Testing Done
.env.globaland checks that an interpolation-only secret is never injected (the file is rewritten in place by truncate + write).golangci-lint(fmt + run) on backend/cli/types,vp fmt --check, eslint, svelte-check and Playwrighttsc: all clean.${VAR}but absent from the container env; an injected variable is present; toggling the flag and redeploying updates the container env;.env.globalcarries the# arcane:noinjectmarks ahead of the values.AI Tool Used (if applicable)
Claude Code (Claude Opus 5.5) was used to implement the backend, CLI, frontend and tests, and to port the change onto v3. I reviewed the changes and tested them manually in the development environment.
Additional Context
00104first, I'll renumber this one.Disclaimer Greptiles Reviews use AI, make sure to check over its work.
To better help train Greptile on our codebase, if the comment is useful and valid Like the comment, if its not helpful or invalid Dislike
To have Greptile Re-Review the changes, mention
greptileai.

Confidence Score: 5/5
The PR appears safe to merge; the mounted-file sync issue is fixed.Summary
Adds a per-variable choice between Compose substitution only and automatic container injection.
Reviews (4) · Last reviewed commit: "cr" · Reviewed by Greptile