Skip to content

chore: production deploy#5290

Merged
supabase-cli-releaser[bot] merged 7 commits into
mainfrom
develop
May 19, 2026
Merged

chore: production deploy#5290
supabase-cli-releaser[bot] merged 7 commits into
mainfrom
develop

Conversation

@supabase-cli-releaser
Copy link
Copy Markdown
Contributor

avallete and others added 4 commits May 18, 2026 20:01
Fixes CLI-1488: the Go proxy layer was silently falling back to
`"supabase"` on PATH when the `supabase-go` binary could not be
resolved. When the shim itself is on PATH and `supabase-go` is not
co-located, this fallback resolves to the shim and causes a fork-bomb
(silent multi-minute hang in CI followed by SIGTERM).

## Changes

- **Binary resolution**: `resolveBinary()` now returns a
`BinaryResolution` discriminated union (`{ found: string } | { notFound:
string[] }`) instead of a fallback string. The `notFound` variant tracks
all attempted locations for user-facing diagnostics.

- **Error handling**: When binary resolution fails, `makeGoProxyLayer`
now prints a specific diagnostic message to stderr and exits with code 1
via `ProcessControl.exit()`, rather than attempting to spawn a
non-existent binary.

- **User-facing diagnostics**: New `formatGoBinaryNotFoundError()`
function generates a helpful error message that:
  - Lists all locations the resolver checked
- Provides platform-specific `curl | tar` install snippets (when
CLI_VERSION is not the dev sentinel and the host architecture is
supported)
- Suggests npm installation and SUPABASE_GO_BINARY environment variable
as alternatives

- **Test coverage**: Added comprehensive unit tests for
`formatGoBinaryNotFoundError()` covering:
  - Basic error message formatting with all attempted locations
  - Dev build behavior (no curl snippet when CLI_VERSION is "0.0.0-dev")
- Platform-specific snippet generation (linux x64, darwin arm64, win32 →
windows mapping)
- Unsupported architecture handling (no snippet when release asset
doesn't exist)
- Integration test verifying the layer refuses to spawn and exits 1 when
binary is not found

The fix ensures the CLI fails fast with actionable guidance instead of
silently fork-bombing itself.

https://claude.ai/code/session_01Lb1v3o9Dabe6qjH565ki4k

---------

Co-authored-by: Claude <noreply@anthropic.com>
Remove the unused `rawProjectConfig` field from `ProjectContext` and
stop loading the raw project config in the project context layer.

## Changes

- Removed `rawProjectConfig: Option.Option<ProjectConfig>` from
`ProjectContextShape` interface
- Removed `loadProjectConfig` call from `projectContextLayer` — only
`loadProjectEnvironment` is now used
- Updated `mockProjectContext` test helper to remove the
`rawProjectConfig` option parameter
- Added unit test for `projectContextLayer` covering the scenario where
`config.toml` uses `env()` on numeric fields (CLI-1489) and the case
where no Supabase project is found

## Implementation Details

The `rawProjectConfig` field was not being used anywhere in the
codebase. By removing it, we simplify the `ProjectContext` service and
reduce unnecessary I/O during initialization. The project context now
only loads and exposes the project environment configuration, which is
what consumers actually need.

https://claude.ai/code/session_01C7reiRogHr6WXQoKiEDQeW

---------

Co-authored-by: Claude <noreply@anthropic.com>
## TL;DR

hides legacy init compatibility flags from help output to match the
existing go behavior

## ref:
- closes #5286

---------

Co-authored-by: Andrew Valleteau <avallete@users.noreply.github.com>
@supabase-cli-releaser supabase-cli-releaser Bot requested a review from a team as a code owner May 19, 2026 03:18
@coveralls
Copy link
Copy Markdown

coveralls commented May 19, 2026

Coverage Report for CI Build 26083683484

Warning

No base build found for commit 9a22aff on main.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 63.744%

Details

  • Patch coverage: No coverable lines changed in this PR.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 15680
Covered Lines: 9995
Line Coverage: 63.74%
Coverage Strength: 7.06 hits per line

💛 - Coveralls

avallete and others added 3 commits May 19, 2026 09:31
Refactor the hidden flag system to scope flag visibility per-command
rather than maintaining a global registry. This prevents flag name
collisions when the same flag name appears in different commands with
different visibility requirements.

## Changes

- **Replaced global hidden flag registry with per-command annotations**:
Changed from a module-level `Set<string>` to a `Context.Reference`
(`LegacyHiddenFlags`) that attaches hidden flag metadata directly to
each `Command` via `Command.annotate`.

- **Introduced `withHiddenFromConfig` helper**: New pipe step that walks
a command's flag config, collects all flags wrapped with `withHidden`,
and attaches the resulting set to the command. This materializes the
per-command list at command construction time, scoping visibility to
that specific command.

- **Updated `withHidden` to use WeakMap tracking**: Changed from adding
to a global set to recording flag references in a module-local
`WeakMap`, allowing `withHiddenFromConfig` to look up which flags were
marked hidden without polluting global state.

- **Updated `stripHiddenFlagsFromHelpDoc` to read from annotations**:
Now reads the hidden flag set from the help doc's `LegacyHiddenFlags`
annotation instead of checking a global registry, enabling per-command
filtering.

- **Applied `withHiddenFromConfig` to all legacy commands**: Updated
`stop`, `start`, `init`, `functions deploy`, `functions download`, and
`functions serve` commands to wire their configs through
`withHiddenFromConfig`.

- **Added `--backup` hidden flag to stop command**: Restored the
historical `--backup` flag (hidden by default) for Go CLI parity, with
handler logic to forward `--backup=false` when explicitly disabled.

- **Added integration test for stop command**: New test file validates
that the `--backup` flag is correctly forwarded to the Go proxy.

## Implementation Details

The refactor maintains backward compatibility with the existing
`withHidden` API while fixing the architectural issue where flags with
the same name in different commands would interfere with each other. The
`Context.Reference` pattern ensures each command carries its own
isolated set of hidden flag names, read during help doc rendering.

Related: CLI-1483

https://claude.ai/code/session_01EB93upyjdFDB3czXheQknG

Co-authored-by: Claude <noreply@anthropic.com>
## What kind of change does this PR introduce?

CI hardening



## Additional context

Removes interpolation and uses env instead. General hardening and best
practice. Not reachable by untrusted code (forks/PRs)

Co-authored-by: Andrew Valleteau <avallete@users.noreply.github.com>
This PR was automatically created to sync API types from the
infrastructure repository.

Changes were detected in the generated API code after syncing with the
latest spec from infrastructure.

Co-authored-by: supabase-cli-releaser[bot] <246109035+supabase-cli-releaser[bot]@users.noreply.github.com>
Co-authored-by: Andrew Valleteau <avallete@users.noreply.github.com>
@supabase-cli-releaser supabase-cli-releaser Bot merged commit 4039724 into main May 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants