Skip to content

feat(cli): enable lazy local stack startup - #6047

Closed
jgoux wants to merge 4 commits into
lazy-stack/06-detached-parityfrom
lazy-stack/07-cli-lazy-startup
Closed

feat(cli): enable lazy local stack startup#6047
jgoux wants to merge 4 commits into
lazy-stack/06-detached-parityfrom
lazy-stack/07-cli-lazy-startup

Conversation

@jgoux

@jgouxjgoux commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Stack layer 7 of 7, based on #6046.

Makes lazy startup the policy for CLI-managed stacks while leaving the package default eager. The shared stack-config mapping applies consistently to start, branch switching, stack updates, and Functions development.

@jgoux
jgouxforce-pushed the lazy-stack/07-cli-lazy-startup branch from 6a6af48 to e68a865CompareAugust 4, 2026 07:43
@jgoux
jgouxforce-pushed the lazy-stack/06-detached-parity branch from f1e0c43 to 64bea19CompareAugust 4, 2026 07:43
@jgoux
jgoux marked this pull request as ready for review August 4, 2026 07:51
@jgoux
jgoux requested a review from a team as a code ownerAugust 4, 2026 07:51

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:e68a865bb1

ℹ️ 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".

Comment threadapps/cli/src/next/config/stack-config.ts
Comment threadapps/cli/src/next/config/stack-config.ts
Comment threadapps/cli/src/next/config/stack-config.ts
@jgoux
jgouxforce-pushed the lazy-stack/07-cli-lazy-startup branch from e68a865 to 27b251aCompareAugust 4, 2026 08:05
@jgoux
jgouxforce-pushed the lazy-stack/06-detached-parity branch from 64bea19 to 89af0f2CompareAugust 4, 2026 08:05
@jgoux
jgouxforce-pushed the lazy-stack/07-cli-lazy-startup branch from 27b251a to 286f811CompareAugust 4, 2026 08:48
@jgoux
jgouxforce-pushed the lazy-stack/06-detached-parity branch from 89af0f2 to e2dd44fCompareAugust 4, 2026 08:48

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:286f8113f8

ℹ️ 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".

Comment threadapps/cli/src/next/config/stack-config.ts
Comment threadapps/cli/src/next/config/stack-config.ts
Comment threadapps/cli/src/next/commands/status/status.handler.ts Outdated
@jgoux
jgouxforce-pushed the lazy-stack/06-detached-parity branch from e2dd44f to f130bfdCompareAugust 4, 2026 09:32
@jgoux
jgouxforce-pushed the lazy-stack/07-cli-lazy-startup branch from 286f811 to 4a65e80CompareAugust 4, 2026 09:32

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:4a65e80504

ℹ️ 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".

Comment threadapps/cli/src/next/commands/status/status.handler.ts Outdated
Comment threadapps/cli/src/next/config/stack-config.ts
@jgoux
jgouxforce-pushed the lazy-stack/06-detached-parity branch from f130bfd to ce21004CompareAugust 4, 2026 09:41
@jgoux
jgouxforce-pushed the lazy-stack/07-cli-lazy-startup branch 2 times, most recently from 49d11ce to 78bd48cCompareAugust 4, 2026 10:20
@jgoux
jgouxforce-pushed the lazy-stack/06-detached-parity branch from ce21004 to fb58086CompareAugust 4, 2026 10:20

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:78bd48cab4

ℹ️ 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".

Comment threadapps/cli/src/next/commands/status/status.handler.ts Outdated
@jgoux
jgouxforce-pushed the lazy-stack/07-cli-lazy-startup branch from 78bd48c to 91f5643CompareAugust 4, 2026 10:37
@jgoux
jgouxforce-pushed the lazy-stack/06-detached-parity branch from fb58086 to e4738faCompareAugust 4, 2026 10:37

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:91f56436f7

ℹ️ 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".

Comment threadapps/cli/src/next/commands/status/status.handler.ts Outdated
Comment threadapps/cli/src/next/config/stack-config.ts
@jgoux
jgouxforce-pushed the lazy-stack/06-detached-parity branch 2 times, most recently from d958c83 to 67ad946CompareAugust 4, 2026 11:25
@jgoux
jgouxforce-pushed the lazy-stack/07-cli-lazy-startup branch from 91f5643 to 452fcbbCompareAugust 4, 2026 11:25
@jgoux
jgouxforce-pushed the lazy-stack/06-detached-parity branch from 67ad946 to b9891e0CompareAugust 4, 2026 11:35
@jgoux
jgouxforce-pushed the lazy-stack/07-cli-lazy-startup branch from 452fcbb to b5a6c0eCompareAugust 4, 2026 11:35
@jgoux
jgouxforce-pushed the lazy-stack/06-detached-parity branch from b9891e0 to 6b836fdCompareAugust 4, 2026 11:46
@jgoux
jgouxforce-pushed the lazy-stack/07-cli-lazy-startup branch from b5a6c0e to 5107339CompareAugust 4, 2026 11:46
@jgoux
jgouxforce-pushed the lazy-stack/06-detached-parity branch from 6b836fd to e1d2245CompareAugust 4, 2026 12:03
@jgoux
jgouxforce-pushed the lazy-stack/07-cli-lazy-startup branch from 5107339 to 930ee68CompareAugust 4, 2026 12:03

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:930ee68b9e

ℹ️ 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".

Comment threadapps/cli/src/next/commands/start/start.live.test.ts Outdated
@jgoux
jgouxforce-pushed the lazy-stack/06-detached-parity branch from e1d2245 to f1319efCompareAugust 4, 2026 12:12
@jgoux
jgouxforce-pushed the lazy-stack/07-cli-lazy-startup branch from 930ee68 to ae7424fCompareAugust 4, 2026 12:12

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:ae7424fda4

ℹ️ 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".

Comment threadapps/cli/src/next/config/stack-config.ts
@jgoux
jgouxforce-pushed the lazy-stack/06-detached-parity branch from f1319ef to e532be6CompareAugust 4, 2026 12:48
@jgoux
jgouxforce-pushed the lazy-stack/07-cli-lazy-startup branch 2 times, most recently from e8b8dd6 to 510f771CompareAugust 4, 2026 12:51
@jgoux
jgouxforce-pushed the lazy-stack/06-detached-parity branch from eb66904 to 938ee92CompareAugust 4, 2026 12:58
@jgoux
jgouxforce-pushed the lazy-stack/07-cli-lazy-startup branch from 510f771 to 9ecc6e9CompareAugust 4, 2026 12:58

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:9ecc6e9b12

ℹ️ 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".

Comment threadapps/cli/src/next/stack/stack.shared.ts
@jgoux
jgouxforce-pushed the lazy-stack/06-detached-parity branch from 938ee92 to 038fc01CompareAugust 4, 2026 13:20
@jgoux
jgouxforce-pushed the lazy-stack/07-cli-lazy-startup branch from 9ecc6e9 to dcc1d7dCompareAugust 4, 2026 13:20
@jgoux
jgouxforce-pushed the lazy-stack/06-detached-parity branch from 038fc01 to d486dd6CompareAugust 4, 2026 14:06
@jgoux
jgouxforce-pushed the lazy-stack/07-cli-lazy-startup branch from dcc1d7d to 0a90882CompareAugust 4, 2026 14:06

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:0a90882e48

ℹ️ 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".

Comment threadapps/cli/src/next/stack/stack.shared.ts
@jgouxChatGPT Codex Connector

jgoux commented Aug 5, 2026

Copy link
Copy Markdown
ContributorAuthor

Superseded by #6071 in the simplified replacement stack #6069#6070#6071. CLI-managed stacks still opt into lazy startup, with explicit Dormant state and serialized final progress reconciliation. Every remaining review thread has been answered and resolved. Closing this PR so review continues on the replacement.

@jgouxjgoux closed this Aug 5, 2026
pullBot pushed a commit to oogalieboogalie/cli that referenced this pull request Aug 5, 2026
Consolidates the complete lazy-stack v2 implementation and its
architecture hardening into one reviewable change.
The implementation replaces the earlier user-space coordination
protocols with explicit ownership boundaries and operating-system
primitives:
- centralizes Docker and native artifact policy in one service catalog
- publishes complete native caches through private staging directories
and atomic rename
- models lifecycle intent directly on each service as inactive, running,
or explicitly stopped
- activates HTTP services at the existing proxy boundary while keeping
direct-listener services eager
- reserves real TCP ports until each service reaches its spawn boundary
- gives foreground and detached stacks the same allocation, readiness,
and lifecycle behavior
- enables lazy startup for CLI-managed local stacks while preserving
eager startup as the package default
The hardening pass makes each service's stable state stream the single
lifecycle coordination primitive, removes generation-specific waiter and
relaunch machinery, keeps healthy requests off the global lifecycle
lock, starts independent eager roots concurrently, recovers incomplete
artifact-cache destinations, and makes service port mappings exhaustive.
This keeps the simpler v2 architecture while closing the highest-impact
concurrency, recovery, and shutdown races identified during review.
Realtime remains eager because the HTTP proxy does not bridge its
WebSocket traffic, and concurrent artifact downloaders may duplicate
work while still publishing through an atomic winner.
Supersedes supabase#6041
Supersedes supabase#6042
Supersedes supabase#6043
Supersedes supabase#6044
Supersedes supabase#6045
Supersedes supabase#6046
Supersedes supabase#6047
Supersedes supabase#6069
Supersedes supabase#6070
Supersedes supabase#6071
Sign up for freeto 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

@jgoux