Skip to content

fix(process-compose): make unhealthy lifecycle terminal - #6080

Merged
jgoux merged 18 commits into
developfrom
agent/process-compose-lifecycle-correctness
Aug 6, 2026
Merged

fix(process-compose): make unhealthy lifecycle terminal#6080
jgoux merged 18 commits into
developfrom
agent/process-compose-lifecycle-correctness

Conversation

@jgoux

@jgouxjgoux commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Health-check failures before first readiness were not reported, and exhausted unhealthy restart budgets left services non-terminal with stale process metadata. Hook failures could also publish Failed while their child remained active.

This change centralizes restart decisions, separates startup and liveness thresholds, and makes supervisory health termination explicit. Terminal states clear the PID, health exhaustion retains no fabricated exit code, and hook failures finalize their child before state publication.

Stack services now use explicit cold-start budgets. State contracts are covered through raw orchestration, stack projection, daemon transport, and dashboard fixtures, with cold-start coverage for PostgreSQL, Edge Runtime, and Analytics.

This PR is stacked on #6078, which provides the architecture documentation baseline.

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

ℹ️ 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/ServiceTransition.ts
Comment threadpackages/stack/tests/createStack-docker.e2e.test.ts Outdated
Base automatically changed from agent/architecture-docs-baseline to developAugust 5, 2026 16:02
@github-actions

github-actionsBot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Supabase CLI preview

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

Preview package for commit eeac2a0.

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

ℹ️ 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/tests/createStack-docker.e2e.test.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:8e2ed7639a

ℹ️ 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/stack/tests/createStack-docker.e2e.test.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:d24cdb90dc

ℹ️ 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:f1ade49a28

ℹ️ 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/stack/src/services/health-budgets.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:48a6057850

ℹ️ 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/services/health-budgets.ts
Comment threadpackages/stack/src/ApiProxy.ts Outdated

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

ℹ️ 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/services/health-budgets.ts Outdated
Comment threadpackages/stack/tests/createStack-docker.e2e.test.ts Outdated
Comment threadpackages/stack/src/services/health-budgets.ts Outdated

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

ℹ️ 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/services/health-budgets.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:af6c0275a4

ℹ️ 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/tests/createStack-docker.e2e.test.ts
@jgoux

jgoux commented Aug 6, 2026

Copy link
Copy Markdown
ContributorAuthor

@codex review

@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:5a298f1834

ℹ️ 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/services/health-budgets.ts
Comment threadpackages/process-compose/src/Orchestrator.ts Outdated
Comment threadpackages/stack/src/StackLifecycleCoordinator.ts Outdated

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

ℹ️ 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/stack/src/StackBuilder.ts Outdated

@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:267de27ae0

ℹ️ 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
jgoux added this pull request to the merge queueAug 6, 2026
Merged via the queue into develop with commit 54934f4Aug 6, 2026
28 checks passed
@jgoux
jgoux deleted the agent/process-compose-lifecycle-correctness branch August 6, 2026 13:57
pullBot pushed a commit to oogalieboogalie/cli that referenced this pull request Aug 6, 2026
## Summary
- Generalize detached orphan cleanup to validated, shell-free command
and path actions.
- Make lifecycle transition classification event-exhaustive and move
ordered restart closure traversal into a pure module.
- Remove confirmed dead error and log-buffer surface while documenting
the supervisor entry and one-shot polling contracts.
## Why
The process supervisor should remain domain-neutral and keep policy
decisions independently testable without changing the lifecycle
semantics established by the preceding work.
Depends on supabase#6080 and transitively on supabase#6078.
pullBot pushed a commit to oogalieboogalie/cli that referenced this pull request Aug 6, 2026
## What changed
- replaces the duplicate lifecycle coordinator tag and pass-through
facade with one scoped local stack implementation that provides both the
public stack and narrow activation interfaces
- centralizes readiness policy enforcement across startup, activation,
lifecycle operations, explicit waits, Promise calls, and daemon
transport
- adds typed readiness deadline failures with terminal scoped cleanup
and daemon shutdown
- validates readiness overrides over POST transport and documents the
shared foreground/detached behavior
- removes dead cleanup-query surface and uses structural Effect equality
for projected state deduplication
## Why
Lifecycle state previously had redundant interface layers and readiness
deadlines were enforced only by the Promise adapter. Keeping policy and
cleanup inside the single runtime owner makes every adapter observe the
same semantics and prevents a timed-out runtime from relaunching
resources after cleanup.
Depends on supabase#6081 and supabase#6080 (and transitively supabase#6078).
pullBot pushed a commit to chizee/cli that referenced this pull request Aug 7, 2026
## What changed
- makes StackBuilder the sole owner of dependency topology and passes
explicit dependencies into every service factory, including the
native-initialization versus Docker-readiness choice for PostgREST
- moves Docker network and port argument construction into service
factories and migrates PostgreSQL, Auth, and PostgREST onto the common
Docker definition helper
- centralizes container identity so launch, exact cleanup, orphan
cleanup, and catalog-derived candidate cleanup use the same naming
source
- captures exact build-produced cleanup targets before persistence and
orchestrator setup, and disposes already-started resources after any
partial startup failure
- expands semantic service-definition coverage and documents the
exact-versus-candidate cleanup model
## Why
Service construction and resource identity were split across the
builder, individual factories, and fallback cleanup code. Keeping
topology in the builder while concentrating executable details and
Docker identity in factories makes service definitions easier to change
safely, prevents launch and cleanup names from drifting, and ensures
failed startup cannot leave an earlier service running.
Depends on supabase#6085 and supabase#6084 (and transitively supabase#6081, supabase#6080, and supabase#6078).
avallete pushed a commit that referenced this pull request Aug 7, 2026
Verified every bullet against the actual v2.111.0..v2.112.0 tree diff
(the range came from a rebased develop rollup, so commit subjects alone
were misleading) and applied the Codex review feedback:
- Drop #6072 and #6080: packages/next-only, not in the stable shell
- Drop #6003 and #6057: the stable CLI does not exercise the stack
binary cache; #6057's "rollup" was the develop->main rollup PR,
not the Rollup bundler
- Add breaking-change section for NPM_AUTH_TOKEN no longer being
forwarded by functions deploy (#6005, ships in this tag)
- Note the one-time stop/start needed for already-stuck stacks (#6093)
- Scope #5956 to functions download path traversal
- Point db pull --experimental users at --declarative (#6028)
- Fix#6065 and #6066 descriptions to match the shipped changes
- Recount the internal tail (33 uncited commits in the compare range)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018h8krKpNet85649nqtj95b
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.

2 participants

@jgoux@Coly010