refactor(dev): fold lifecycle shutdown into one ordered close loop - #18
Conversation
The two cleanup recommendations from the Aug 18 simplification review that were never applied: closeDevServerLifecycle's six sequential Promise.allSettled blocks and per-resource failure spreads collapse into one ordered producer table and close loop with identical close ordering and failure semantics, and the Workbench root hoists the foreground client once instead of asserting foreground.current! at eight construction sites.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
commit: |
Summary
closeDevServerLifecyclecollapses six sequentialPromise.allSettledblocks plus six per-resource failure spreads into one ordered producer table and a single close loop. Close ordering (playground → mcp-apps → runtime-client-surfaces → runtime → mcp-sessions → coordinator → detach → completion log → logs) and failure semantics are unchanged; the ordering is now documented as load-bearing.const foregroundClient = foreground.currentonce, deleting eightforeground.current!non-null assertions at client construction sites.Test plan
pnpm test:unit— 1664 passed, 0 failedpnpm typecheck/pnpm rslint— cleandev-workbench.test.tslifecycle shutdown paths)