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
c99bd5b to
4d65ee0
Compare
95f3b3d to
e3bcd5a
Compare
07e0da6 to
e025a87
Compare
e3bcd5a to
c4d49b9
Compare
e025a87 to
d2414d8
Compare
d7ee865 to
59c8c85
Compare
0368f64 to
aa19b4f
Compare
0e1b672 to
b697469
Compare
aa19b4f to
418522f
Compare
8ea5a53 to
32efa63
Compare
3bf843b to
25ca00b
Compare
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
f9c74e6 to
4aa8d4e
Compare
4aa8d4e to
5d3ce2c
Compare
f16b507 to
57ef434
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