Skip to content

docs(cli): fix fabricated SUPABASE_API_URL and bare PROJECT_ID env-var references#5811

Merged
Coly010 merged 1 commit into
developfrom
columferry/cli-1873-docs-fix-env-var-references-fabricated-supabase_api_url-bare
Jul 7, 2026
Merged

docs(cli): fix fabricated SUPABASE_API_URL and bare PROJECT_ID env-var references#5811
Coly010 merged 1 commit into
developfrom
columferry/cli-1873-docs-fix-env-var-references-fabricated-supabase_api_url-bare

Conversation

@Coly010

@Coly010 Coly010 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

Docs fix — Legacy port SIDE_EFFECTS.md accuracy.

What is the current behavior?

Two systemic env-var documentation errors across src/legacy/**/SIDE_EFFECTS.md, found in the parity audit:

  • ~36 files document SUPABASE_API_URL as a real override for the Management API base URL. No such env var exists in Go: SetEnvPrefix("SUPABASE") + AutomaticEnv() never binds API_URL, there's no os.Getenv("SUPABASE_API_URL") anywhere, and the Profile.api_url field loads on a separate, unbound viper.New() instance (internal/utils/profile.go:99). The real override is SUPABASE_PROFILE (built-in name or a path to a YAML profile file).
  • ~18 files document bare PROJECT_ID as if it were itself a settable env var. It's Go's internal viper key name — the real, user-facing env var is SUPABASE_PROJECT_ID (viper.GetString("PROJECT_ID") under the global SetEnvPrefix("SUPABASE") singleton, internal/utils/flags/project_ref.go:62).

Both claims were independently verified against the real Go source and, for the viper-specific mechanics, a compiled test program against the exact pinned github.com/spf13/viper v1.21.0.

What is the new behavior?

  • Removed the fabricated SUPABASE_API_URL rows; where a file didn't already document SUPABASE_PROFILE, added a real row for it (including the persisted ~/.supabase/profile fallback step in the resolution chain, matching legacy-cli-config.layer.ts).
  • Corrected every bare PROJECT_ID mention (Environment Variables tables, Files Read "When" columns, and prose) to SUPABASE_PROJECT_ID, converging on the dominant convention already used correctly across ~15 sibling files.
  • Left db/advisors/SIDE_EFFECTS.md untouched — it already correctly documents that SUPABASE_API_URL is not honored.
  • Filed follow-ups for two related-but-out-of-scope findings surfaced during review: CLI-1904 (global choice-flag telemetry gap, unrelated) and CLI-1905 (bare DB_PASSWORD has the same bug class as this PR's F2, in a set of files this PR doesn't touch).

Docs-only change; no .ts files touched. pnpm check:all passes.

…r references

SIDE_EFFECTS.md files across the legacy port documented SUPABASE_API_URL as a
real Management API base URL override - no such env var exists in Go
(SetEnvPrefix("SUPABASE") + AutomaticEnv never binds API_URL, and the Profile
loader uses a separate, unbound viper instance). The real override is
SUPABASE_PROFILE. Bare PROJECT_ID was also documented as if directly settable,
when it's Go's internal viper key name - the real env var is
SUPABASE_PROJECT_ID (viper.GetString("PROJECT_ID") under the SUPABASE prefix).

Also tightens the SUPABASE_PROFILE rows added by this sweep to note the
persisted ~/.supabase/profile fallback step, matching the resolution order
already implemented in legacy-cli-config.layer.ts.
@Coly010

Coly010 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 42ed102f03

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Coly010 Coly010 marked this pull request as ready for review July 7, 2026 10:15
@Coly010 Coly010 requested a review from a team as a code owner July 7, 2026 10:15
@Coly010 Coly010 self-assigned this Jul 7, 2026
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Supabase CLI preview

npx --yes https://pkg.pr.new/supabase/cli/supabase@42ed102f033b78e41064de08ba2534d86dd35d1b

Preview package for commit 42ed102.

@Coly010 Coly010 added this pull request to the merge queue Jul 7, 2026
Merged via the queue into develop with commit 47e9a2c Jul 7, 2026
27 checks passed
@Coly010 Coly010 deleted the columferry/cli-1873-docs-fix-env-var-references-fabricated-supabase_api_url-bare branch July 7, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants