Skip to content

feat(stack): rewrite managed local stack runtime - #6440

Open
jgoux wants to merge 179 commits into
developfrom
feat/stack-runtime-rewrite
Open

feat(stack): rewrite managed local stack runtime#6440
jgoux wants to merge 179 commits into
developfrom
feat/stack-runtime-rewrite

Conversation

@jgoux

@jgoux jgoux commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Rewrites @supabase/stack around one managed-only runtime shared by strict native and container execution modes. The package owns durable configuration and secrets, sticky ports, artifact preparation, lifecycle arbitration, per-service eager or lazy activation, service migrations, ingress, retained and live logs, and exact resource cleanup.

A stopped stack has no resident supervisor or runtime resources: status and retained logs come from durable state, while a later start creates a fresh owner and performs clean recovery. PostgreSQL 17 is the only eager service by default; other enabled services activate through stack ingress, and callers can configure eager activation. Dependency-ready workloads start concurrently. Docker-compatible engines, including Podman, share the same container path.

Enabled lazy services prepare their artifacts in the background after startup by default. preparation: "on-demand" retains full lazy downloading, while explicit prepare() remains available in either mode. Foreground activation prepares its dependency closure concurrently and shares in-flight downloads with background preparation. Runtime cleanup cancels unfinished transfers and retains completed cache entries. Status exposes artifact preparation separately from service readiness, and explicit preparation reports progress through onProgress.

Edge Functions are served through the stack-owned Edge Runtime. The retained legacy Functions development command uses this package surface; broader integration with the legacy CLI under experimental start is deferred to follow-up work. The deleted next CLI was a disposable proving ground and is not part of this PR.

Service preparation now lives in the published runtime artifacts: PostgreSQL owns first boot and bundled migrations, service helpers own migration and Pooler tenant provisioning, and Node services expose public launchers shared with their images. The stack supplies instance settings and sequences those commands. The affected images are pinned to verified digests from slim-services #299; Vector configuration and Edge Functions bootstrap remain stack-owned.

Obsolete process-compose integration and superseded runtime helpers are removed.

Supersedes #6385

jgoux added 30 commits August 28, 2026 18:51
…-rewrite

# Conflicts:
#	apps/cli/README.md
#	apps/cli/package.json
#	apps/cli/src/next/cli/root.ts
#	apps/cli/src/next/commands/branches/switch/switch.handler.ts
#	apps/cli/src/next/commands/branches/switch/switch.integration.test.ts
#	apps/cli/src/next/commands/functions/dev/dev.command.ts
#	apps/cli/src/next/commands/functions/dev/dev.e2e.test.ts
#	apps/cli/src/next/commands/functions/dev/dev.handler.ts
#	apps/cli/src/next/commands/functions/dev/functions-dev-runtime.ts
#	apps/cli/src/next/commands/functions/download/download.integration.test.ts
#	apps/cli/src/next/commands/functions/list/list.integration.test.ts
#	apps/cli/src/next/commands/functions/new/new.integration.test.ts
#	apps/cli/src/next/commands/link/link.handler.ts
#	apps/cli/src/next/commands/list/list.handler.ts
#	apps/cli/src/next/commands/login/login.handler.ts
#	apps/cli/src/next/commands/logs/logs.command.ts
#	apps/cli/src/next/commands/logs/logs.handler.ts
#	apps/cli/src/next/commands/logs/logs.integration.test.ts
#	apps/cli/src/next/commands/services/services.handler.ts
#	apps/cli/src/next/commands/services/services.integration.test.ts
#	apps/cli/src/next/commands/start/start.command.ts
#	apps/cli/src/next/commands/start/start.command.unit.test.ts
#	apps/cli/src/next/commands/start/start.handler.ts
#	apps/cli/src/next/commands/start/start.integration.test.ts
#	apps/cli/src/next/commands/status/status.command.ts
#	apps/cli/src/next/commands/status/status.handler.ts
#	apps/cli/src/next/commands/status/status.integration.test.ts
#	apps/cli/src/next/commands/stop/stop.command.ts
#	apps/cli/src/next/commands/stop/stop.handler.ts
#	apps/cli/src/next/commands/stop/stop.integration.test.ts
#	apps/cli/src/next/commands/update/update.command.ts
#	apps/cli/src/next/commands/update/update.handler.ts
#	apps/cli/src/next/commands/update/update.integration.test.ts
#	apps/cli/src/next/config/project-link-refresh.ts
#	apps/cli/src/next/config/project-link-remote.layer.ts
#	apps/cli/src/next/config/stack-config.ts
#	apps/cli/src/next/config/stack-config.unit.test.ts
#	apps/cli/src/next/main.ts
#	apps/cli/src/shared/cli/run.ts
#	apps/cli/src/shared/runtime/file-watcher.service.ts
#	apps/cli/tests/helpers/mocks.ts
#	pnpm-lock.yaml
#	pnpm-workspace.yaml
@jgoux jgoux self-assigned this Sep 4, 2026
@jgoux
jgoux marked this pull request as ready for review September 4, 2026 17:19
@jgoux
jgoux requested a review from a team as a code owner September 4, 2026 17:20
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Supabase CLI preview

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

Preview package for commit c25f8da.

Reuse validated native artifacts without fetching upstream checksums. Keep input materialization and shared container setup scoped to startup while preserving dependency readiness and rollback.
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.

1 participant