Skip to content

refactor(stack): centralize service activation policy - #6042

Closed
jgoux wants to merge 4 commits into
lazy-stack/01-artifactsfrom
lazy-stack/02-lifecycle
Closed

refactor(stack): centralize service activation policy#6042
jgoux wants to merge 4 commits into
lazy-stack/01-artifactsfrom
lazy-stack/02-lifecycle

Conversation

@jgoux

@jgouxjgoux commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Stack layer 2 of 7, based on #6041.

Defines one activation policy for every stack service and moves companion ownership into the stack lifecycle:

  • distinguishes direct, HTTP-proxied, WebSocket-proxied, and companion services
  • starts imgproxy with Storage and Vector with Analytics
  • keeps service activation dependency-aware for explicit lifecycle calls
  • covers the full service matrix without introducing Fleet behavior

@jgoux
jgouxforce-pushed the lazy-stack/01-artifacts branch from 5cb141b to 39d03a3CompareAugust 4, 2026 07:43
@jgoux
jgouxforce-pushed the lazy-stack/02-lifecycle branch from b0dfc78 to 0355a4dCompareAugust 4, 2026 07:43
@jgoux
jgoux marked this pull request as ready for review August 4, 2026 07:49
@jgoux
jgoux requested a review from a team as a code ownerAugust 4, 2026 07:49

@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:0355a4dff9

ℹ️ 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 threadpackages/stack/src/ServiceActivation.ts
Comment threadpackages/stack/src/StackLifecycleCoordinator.ts
@jgoux
jgouxforce-pushed the lazy-stack/01-artifacts branch from 39d03a3 to 3bdb698CompareAugust 4, 2026 08:04
@jgoux
jgouxforce-pushed the lazy-stack/02-lifecycle branch from 0355a4d to 23de12eCompareAugust 4, 2026 08:04
Comment threadpackages/stack/src/ServiceActivation.ts
@jgoux
jgouxforce-pushed the lazy-stack/02-lifecycle branch from 23de12e to 6174ffdCompareAugust 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:6174ffd46a

ℹ️ 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 threadpackages/process-compose/src/Orchestrator.ts Outdated
Comment threadpackages/process-compose/src/Orchestrator.ts Outdated
@jgoux
jgouxforce-pushed the lazy-stack/01-artifacts branch from 3bdb698 to a8cc0a1CompareAugust 4, 2026 09:32
@jgoux
jgouxforce-pushed the lazy-stack/02-lifecycle branch from 6174ffd to b3ef005CompareAugust 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:b3ef00568e

ℹ️ 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 threadpackages/process-compose/src/Orchestrator.ts
@jgoux
jgouxforce-pushed the lazy-stack/01-artifacts branch from a8cc0a1 to 8c25625CompareAugust 4, 2026 09:41
@jgoux
jgouxforce-pushed the lazy-stack/02-lifecycle branch from b3ef005 to 423ce02CompareAugust 4, 2026 09:41

@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:423ce0250e

ℹ️ 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 threadpackages/process-compose/src/Orchestrator.ts Outdated
@jgoux
jgouxforce-pushed the lazy-stack/01-artifacts branch from 8c25625 to 462a1fbCompareAugust 4, 2026 10:20
@jgoux
jgouxforce-pushed the lazy-stack/02-lifecycle branch from 423ce02 to f0fc42dCompareAugust 4, 2026 10:20
Comment threadpackages/stack/src/StackLifecycleCoordinator.ts
@jgoux
jgouxforce-pushed the lazy-stack/02-lifecycle branch from f0fc42d to eab5a5fCompareAugust 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:eab5a5ff17

ℹ️ 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 threadpackages/process-compose/src/Orchestrator.ts
Comment threadpackages/process-compose/src/Orchestrator.ts
@jgoux
jgouxforce-pushed the lazy-stack/02-lifecycle branch from eab5a5f to 7c34456CompareAugust 4, 2026 11:07
@jgoux
jgouxforce-pushed the lazy-stack/01-artifacts branch from 462a1fb to beda5f5CompareAugust 4, 2026 11:07

@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:7c34456f71

ℹ️ 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 threadpackages/process-compose/src/Orchestrator.ts
@jgoux
jgouxforce-pushed the lazy-stack/02-lifecycle branch from 7c34456 to 4d03b81CompareAugust 4, 2026 11:25

@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:4d03b81201

ℹ️ 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 threadpackages/process-compose/src/Orchestrator.ts
@jgoux
jgouxforce-pushed the lazy-stack/02-lifecycle branch from 4d03b81 to b360ce2CompareAugust 4, 2026 11:34
@jgoux
jgouxforce-pushed the lazy-stack/01-artifacts branch from beda5f5 to 4fba440CompareAugust 4, 2026 11:34

@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:b360ce25c2

ℹ️ 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 threadpackages/process-compose/src/Orchestrator.ts
@jgoux
jgouxforce-pushed the lazy-stack/02-lifecycle branch from b360ce2 to 8d89478CompareAugust 4, 2026 11:45

@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:8d8947831f

ℹ️ 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 threadpackages/process-compose/src/Orchestrator.ts Outdated
@jgoux
jgouxforce-pushed the lazy-stack/01-artifacts branch from 4fba440 to a66d82dCompareAugust 4, 2026 12:02
@jgoux
jgouxforce-pushed the lazy-stack/02-lifecycle branch from 8d89478 to 12a7ac8CompareAugust 4, 2026 12:02

@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:12a7ac847c

ℹ️ 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 threadpackages/stack/src/StackLifecycleCoordinator.ts
@jgoux
jgouxforce-pushed the lazy-stack/02-lifecycle branch from 12a7ac8 to 9c77220CompareAugust 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:9c772207f3

ℹ️ 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 threadpackages/process-compose/src/Orchestrator.ts Outdated
@jgoux
jgouxforce-pushed the lazy-stack/02-lifecycle branch from 9c77220 to 7e44bb5CompareAugust 4, 2026 12: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:7e44bb50c6

ℹ️ 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 threadpackages/process-compose/src/Orchestrator.ts

@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:589b65c489

ℹ️ 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 threadpackages/process-compose/src/Orchestrator.ts
@jgoux
jgouxforce-pushed the lazy-stack/01-artifacts branch from 23ccff4 to f2a6ae5CompareAugust 4, 2026 14:06
@jgoux
jgouxforce-pushed the lazy-stack/02-lifecycle branch from 589b65c to 5838abeCompareAugust 4, 2026 14:06
@jgouxChatGPT Codex Connector

jgoux commented Aug 5, 2026

Copy link
Copy Markdown
ContributorAuthor

Superseded by #6070 in the simplified replacement stack #6069#6070#6071. Activation is now declared as startup, activates, and owns, with process-compose as the single owner of desired lifecycle state. 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