refactor(cli): centralize process lifecycle#2171
Open
jrusso1020 wants to merge 1 commit into
Open
Conversation
This was referenced Jul 10, 2026
Collaborator
Author
This was referenced Jul 10, 2026
32efa63 to
e4fa818
Compare
2370bf4 to
593c88d
Compare
119c3a7 to
95c5ca5
Compare
3794659 to
2dfc8f1
Compare
95c5ca5 to
138681f
Compare
2dfc8f1 to
f9c74e6
Compare
15bbbc2 to
f16b507
Compare
4aa8d4e to
5d3ce2c
Compare
57ef434 to
a24f174
Compare
2b8ae85 to
f941ffb
Compare
34ec519 to
53132dd
Compare
f941ffb to
35f4007
Compare
53132dd to
df7dfef
Compare
165f2e1 to
7fe2537
Compare
df7dfef to
608548d
Compare
7fe2537 to
eb0930b
Compare
b3ce98b to
f593708
Compare
0b30fbc to
e2cd043
Compare
f593708 to
6408d4b
Compare
e2cd043 to
fad0f25
Compare
d9d9868 to
53fee32
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
Centralize CLI process termination and error signaling at the executable boundary.
Why
Command handlers wrote process.exit/process.exitCode directly, which made cleanup, telemetry finalization, testing, and machine-readable errors inconsistent.
How
Introduce CommandResult, CliUsageError, CliRuntimeError, and CliResultSignal. Route termination through cli.ts, preserve finalizers, and enforce ownership with an AST-based repository check.
Test plan