Skip to content

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

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

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

Conversation

@jgoux

@jgoux jgoux 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
jgoux force-pushed the lazy-stack/07-cli-lazy-startup branch from 6a6af48 to e68a865 Compare August 4, 2026 07:43
@jgoux
jgoux force-pushed the lazy-stack/06-detached-parity branch from f1e0c43 to 64bea19 Compare August 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 owner August 4, 2026 07:51

@chatgpt-codex-connector chatgpt-codex-connector Bot 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 thread apps/cli/src/next/config/stack-config.ts
Comment thread apps/cli/src/next/config/stack-config.ts
Comment thread apps/cli/src/next/config/stack-config.ts
@jgoux
jgoux force-pushed the lazy-stack/07-cli-lazy-startup branch from e68a865 to 27b251a Compare August 4, 2026 08:05
@jgoux
jgoux force-pushed the lazy-stack/06-detached-parity branch from 64bea19 to 89af0f2 Compare August 4, 2026 08:05
@jgoux
jgoux force-pushed the lazy-stack/07-cli-lazy-startup branch from 27b251a to 286f811 Compare August 4, 2026 08:48
@jgoux
jgoux force-pushed the lazy-stack/06-detached-parity branch from 89af0f2 to e2dd44f Compare August 4, 2026 08:48

@chatgpt-codex-connector chatgpt-codex-connector Bot 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 thread apps/cli/src/next/config/stack-config.ts
Comment thread apps/cli/src/next/config/stack-config.ts
Comment thread apps/cli/src/next/commands/status/status.handler.ts Outdated
@jgoux
jgoux force-pushed the lazy-stack/06-detached-parity branch from e2dd44f to f130bfd Compare August 4, 2026 09:32
@jgoux
jgoux force-pushed the lazy-stack/07-cli-lazy-startup branch from 286f811 to 4a65e80 Compare August 4, 2026 09:32

@chatgpt-codex-connector chatgpt-codex-connector Bot 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 thread apps/cli/src/next/commands/status/status.handler.ts Outdated
Comment thread apps/cli/src/next/config/stack-config.ts
@jgoux
jgoux force-pushed the lazy-stack/06-detached-parity branch from f130bfd to ce21004 Compare August 4, 2026 09:41
@jgoux
jgoux force-pushed the lazy-stack/07-cli-lazy-startup branch 2 times, most recently from 49d11ce to 78bd48c Compare August 4, 2026 10:20
@jgoux
jgoux force-pushed the lazy-stack/06-detached-parity branch from ce21004 to fb58086 Compare August 4, 2026 10:20

@chatgpt-codex-connector chatgpt-codex-connector Bot 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 thread apps/cli/src/next/commands/status/status.handler.ts Outdated
@jgoux
jgoux force-pushed the lazy-stack/07-cli-lazy-startup branch from 78bd48c to 91f5643 Compare August 4, 2026 10:37
@jgoux
jgoux force-pushed the lazy-stack/06-detached-parity branch from fb58086 to e4738fa Compare August 4, 2026 10:37

@chatgpt-codex-connector chatgpt-codex-connector Bot 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 thread apps/cli/src/next/commands/status/status.handler.ts Outdated
Comment thread apps/cli/src/next/config/stack-config.ts
@jgoux
jgoux force-pushed the lazy-stack/06-detached-parity branch 2 times, most recently from d958c83 to 67ad946 Compare August 4, 2026 11:25
@jgoux
jgoux force-pushed the lazy-stack/07-cli-lazy-startup branch from 91f5643 to 452fcbb Compare August 4, 2026 11:25
@jgoux
jgoux force-pushed the lazy-stack/06-detached-parity branch from 67ad946 to b9891e0 Compare August 4, 2026 11:35
@jgoux
jgoux force-pushed the lazy-stack/07-cli-lazy-startup branch from 452fcbb to b5a6c0e Compare August 4, 2026 11:35
@jgoux
jgoux force-pushed the lazy-stack/06-detached-parity branch from b9891e0 to 6b836fd Compare August 4, 2026 11:46
@jgoux
jgoux force-pushed the lazy-stack/07-cli-lazy-startup branch from b5a6c0e to 5107339 Compare August 4, 2026 11:46
@jgoux
jgoux force-pushed the lazy-stack/06-detached-parity branch from 6b836fd to e1d2245 Compare August 4, 2026 12:03
@jgoux
jgoux force-pushed the lazy-stack/07-cli-lazy-startup branch from 5107339 to 930ee68 Compare August 4, 2026 12:03

@chatgpt-codex-connector chatgpt-codex-connector Bot 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 thread apps/cli/src/next/commands/start/start.live.test.ts Outdated
@jgoux
jgoux force-pushed the lazy-stack/06-detached-parity branch from e1d2245 to f1319ef Compare August 4, 2026 12:12
@jgoux
jgoux force-pushed the lazy-stack/07-cli-lazy-startup branch from 930ee68 to ae7424f Compare August 4, 2026 12:12

@chatgpt-codex-connector chatgpt-codex-connector Bot 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 thread apps/cli/src/next/config/stack-config.ts
@jgoux
jgoux force-pushed the lazy-stack/06-detached-parity branch from f1319ef to e532be6 Compare August 4, 2026 12:48
@jgoux
jgoux force-pushed the lazy-stack/07-cli-lazy-startup branch 2 times, most recently from e8b8dd6 to 510f771 Compare August 4, 2026 12:51
@jgoux
jgoux force-pushed the lazy-stack/06-detached-parity branch from eb66904 to 938ee92 Compare August 4, 2026 12:58
@jgoux
jgoux force-pushed the lazy-stack/07-cli-lazy-startup branch from 510f771 to 9ecc6e9 Compare August 4, 2026 12:58

@chatgpt-codex-connector chatgpt-codex-connector Bot 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 on lines +39 to +45
if (serviceState.status === "Healthy" || serviceState.dormant === true) {
if (completedNames.has(serviceState.name)) {
return Effect.void;
}

readyNames.add(serviceState.name);
return prog.advance(1, `${serviceState.name} is ready`);
completedNames.add(serviceState.name);
return prog.advance(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reconcile dormant states before stopping progress

In a real lazy start, StackLifecycleCoordinator.start() marks the phase running and publishes the dormancy revision immediately before returning. startStackWithProgress() then interrupts its state-change fiber as soon as stack.start() completes, so the queued dormant transitions handled here can be dropped before they advance the progress total; detached/text output may still finish with an incomplete bar, and stream-json may emit done with current < max. The new integration test masks this race by waiting for the advance before resolving start; reread/reconcile final service states after stack.start() or otherwise drain the watcher before interrupting it.

Useful? React with 👍 / 👎.

@jgoux
jgoux force-pushed the lazy-stack/06-detached-parity branch from 938ee92 to 038fc01 Compare August 4, 2026 13:20
@jgoux
jgoux force-pushed the lazy-stack/07-cli-lazy-startup branch from 9ecc6e9 to dcc1d7d Compare August 4, 2026 13:20
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