Skip to content

refactor(orchestrator): make stack detachment explicit - #488

Open
LukeMathWalker wants to merge 1 commit into
refactor/orchestrator-component-publication-guardfrom
refactor/orchestrator-explicit-detach
Open

refactor(orchestrator): make stack detachment explicit#488
LukeMathWalker wants to merge 1 commit into
refactor/orchestrator-component-publication-guardfrom
refactor/orchestrator-explicit-detach

Conversation

@LukeMathWalker

Copy link
Copy Markdown
Contributor

Why

Dropping RunningStack implicitly left processes running, but collector startup failure could instead terminate them. That made destructor behavior depend on an incidental thread-creation result and allowed accidental owner loss to leave an unsupervised stack.

What Changed

  • add an explicit RunningStack::detach ownership transfer
  • restore stack ownership if collector creation rejects the transfer
  • make dropping an owned stack fail closed with hard termination
  • retain runtime state after destructor termination for explicit cleanup
  • update external-stop tests to detach deliberately

Risks / Notes

This intentionally changes internal lifecycle behavior: callers that want processes to outlive RunningStack must call detach. Graceful teardown remains available through shutdown. This is the sixth PR in the lifecycle-ownership stack and targets #487.

AI Assistance

Implementation assisted by OpenAI GPT-5.4.

@LukeMathWalker
LukeMathWalker force-pushed the refactor/orchestrator-explicit-detach branch from 197da9b to d572283 Compare August 10, 2026 06:42
@LukeMathWalker
LukeMathWalker force-pushed the refactor/orchestrator-explicit-detach branch 2 times, most recently from 288324f to f123fc8 Compare August 10, 2026 07:01
@LukeMathWalker
LukeMathWalker force-pushed the refactor/orchestrator-explicit-detach branch from f123fc8 to ea776f1 Compare August 10, 2026 08:43
@LukeMathWalker
LukeMathWalker force-pushed the refactor/orchestrator-explicit-detach branch from ea776f1 to bb887c0 Compare August 10, 2026 14:59
@LukeMathWalker
LukeMathWalker marked this pull request as ready for review August 10, 2026 15:16
@LukeMathWalker
LukeMathWalker added this pull request to the merge queue Aug 10, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue because the pull requests in the stack were not ordered correctly in the queue Aug 10, 2026
@LukeMathWalker
LukeMathWalker force-pushed the refactor/orchestrator-explicit-detach branch from bb887c0 to 94f8d48 Compare August 10, 2026 15:21
@LukeMathWalker
LukeMathWalker force-pushed the refactor/orchestrator-explicit-detach branch from 94f8d48 to acadc48 Compare August 10, 2026 16:33
@LukeMathWalker
LukeMathWalker force-pushed the refactor/orchestrator-explicit-detach branch from acadc48 to bc21d3f Compare August 10, 2026 16:57
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