Repository navigation
feat(config): accept env() on number, boolean, enum and list fields in the config schema - #7333
Open
Coly010 wants to merge 3 commits into
Conversation
…lds in the config schema The loader resolves env(VAR) on any field and coerces it to the field's type, but the published CLI config schema typed number, integer, boolean and enum fields strictly, so env() references there showed as editor errors. Those fields now accept their usual value or an env() string matching the loader's syntax. The project-config schema is unchanged, since it describes resolved values. Closes CLI-2857
Contributor
There was a problem hiding this comment.
🤖 AI Review
Both independent reviews completed with no findings. My code inspection found no additional actionable issues. All 366 targeted leaves have an env() branch, and removing those branches exactly restores the trusted generated schema. Loader compatibility and unchanged ProjectConfig behavior were verified by inspection. Tests were not run because dependencies are absent.
Findings
No issues found.
Stats
Claude findings: 0 · Codex findings: 0 · Confirmed: 0 · Refuted: 0 · Uncertain: 0
Models: claude-opus-5-5 + gpt-6.1-sol · Trigger: auto · Workflow run
This review runs once per PR. A maintainer can request another with a /ai-review comment.
…nst the loader String-list fields such as auth.additional_redirect_urls now accept an env() reference in place of the whole list, matching the loader's comma-split coercion. The copied-rule test is replaced by an agreement test that, for every leaf in the CLI schema, checks the published schema accepts env() exactly when the loader resolves it. Unused keyword entries are dropped.
avallete
self-requested a review
October 27, 2026 08:20
This branch has not been 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.
Summary
The config loader resolves
env(VAR)on any field and then coerces it to the field's type, but the publishedconfig.schema.jsontyped number, integer, boolean, enum and string-list fields strictly. Somax_rows = "env(MAX_ROWS)"loads fine but shows as an error in the editor.Those fields now accept either their usual value or a string matching the loader's
env()syntax. A mistyped literal likemax_rows = "1000"orpool_mode = "statement"still fails.toPublishedJsonSchemaDocumenttakes anacceptEnvReferencesoption, and the CLI config schema turns it on. Each affected field becomes ananyOfof its original type and anenv()string, withdescription,defaultandexampleskept on the outer node so hover docs look the sameauth.additional_redirect_urlsaccept anenv()string in place of the whole list, since the CLI splits the resolved value on commas. Lists of enums don't, as the loader doesn't split thosestorage.file_size_limit) get one extraenv()branch rather than a nested oneproject-config.schema.jsondoesn't change, since it describes values afterenv()has been resolvedapps/docs/public/cli/config.schema.jsonis regeneratedajvis added as a dev dependency of@supabase/configso tests can check the published schema against what the loader acceptsSchema shape change
Affected fields no longer carry a top-level
type. It moves into the firstanyOfbranch, next to theenv()branch. Any document that validated before still validates, but tools that read the schema's types directly (type generators, for example) will now see a union on those fields.Linked issue
Closes CLI-2857