Skip to content

refactor(cli): centralize process lifecycle#2171

Open
jrusso1020 wants to merge 1 commit into
07-10-fix-cloudrun-publish-adapter-contractfrom
07-10-refactor-cli-centralize-process-lifecycle
Open

refactor(cli): centralize process lifecycle#2171
jrusso1020 wants to merge 1 commit into
07-10-fix-cloudrun-publish-adapter-contractfrom
07-10-refactor-cli-centralize-process-lifecycle

Conversation

@jrusso1020

@jrusso1020 jrusso1020 commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

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

  • CLI suite and build
  • CLI process-ownership checker, lint, typecheck, and stack-wide tests

This was referenced Jul 10, 2026

Copy link
Copy Markdown
Collaborator Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@jrusso1020 jrusso1020 force-pushed the 07-10-refactor-cli-centralize-process-lifecycle branch from 32efa63 to e4fa818 Compare July 13, 2026 18:35
@jrusso1020 jrusso1020 force-pushed the 07-10-fix-cloudrun-publish-adapter-contract branch from 2370bf4 to 593c88d Compare July 13, 2026 20:27
@jrusso1020 jrusso1020 force-pushed the 07-10-refactor-cli-centralize-process-lifecycle branch 2 times, most recently from 119c3a7 to 95c5ca5 Compare July 13, 2026 20:33
@jrusso1020 jrusso1020 force-pushed the 07-10-fix-cloudrun-publish-adapter-contract branch 2 times, most recently from 3794659 to 2dfc8f1 Compare July 13, 2026 22:09
@jrusso1020 jrusso1020 force-pushed the 07-10-refactor-cli-centralize-process-lifecycle branch from 95c5ca5 to 138681f Compare July 13, 2026 22:09
@jrusso1020 jrusso1020 force-pushed the 07-10-fix-cloudrun-publish-adapter-contract branch from 2dfc8f1 to f9c74e6 Compare July 13, 2026 22:18
@jrusso1020 jrusso1020 force-pushed the 07-10-refactor-cli-centralize-process-lifecycle branch 2 times, most recently from 15bbbc2 to f16b507 Compare July 13, 2026 23:08
@jrusso1020 jrusso1020 force-pushed the 07-10-fix-cloudrun-publish-adapter-contract branch 2 times, most recently from 4aa8d4e to 5d3ce2c Compare July 14, 2026 00:03
@jrusso1020 jrusso1020 force-pushed the 07-10-refactor-cli-centralize-process-lifecycle branch 2 times, most recently from 57ef434 to a24f174 Compare July 14, 2026 03:20
@jrusso1020 jrusso1020 force-pushed the 07-10-fix-cloudrun-publish-adapter-contract branch from 2b8ae85 to f941ffb Compare July 14, 2026 17:03
@jrusso1020 jrusso1020 force-pushed the 07-10-refactor-cli-centralize-process-lifecycle branch 2 times, most recently from 34ec519 to 53132dd Compare July 14, 2026 17:11
@jrusso1020 jrusso1020 force-pushed the 07-10-fix-cloudrun-publish-adapter-contract branch from f941ffb to 35f4007 Compare July 14, 2026 17:11
@jrusso1020 jrusso1020 force-pushed the 07-10-refactor-cli-centralize-process-lifecycle branch from 53132dd to df7dfef Compare July 14, 2026 17:35
@jrusso1020 jrusso1020 force-pushed the 07-10-fix-cloudrun-publish-adapter-contract branch from 165f2e1 to 7fe2537 Compare July 14, 2026 17:57
@jrusso1020 jrusso1020 force-pushed the 07-10-refactor-cli-centralize-process-lifecycle branch from df7dfef to 608548d Compare July 14, 2026 17:57
@jrusso1020 jrusso1020 force-pushed the 07-10-fix-cloudrun-publish-adapter-contract branch from 7fe2537 to eb0930b Compare July 14, 2026 18:06
@jrusso1020 jrusso1020 force-pushed the 07-10-refactor-cli-centralize-process-lifecycle branch 2 times, most recently from b3ce98b to f593708 Compare July 14, 2026 19:37
@jrusso1020 jrusso1020 force-pushed the 07-10-fix-cloudrun-publish-adapter-contract branch from 0b30fbc to e2cd043 Compare July 14, 2026 19:42
@jrusso1020 jrusso1020 force-pushed the 07-10-refactor-cli-centralize-process-lifecycle branch from f593708 to 6408d4b Compare July 14, 2026 19:42
@jrusso1020 jrusso1020 force-pushed the 07-10-fix-cloudrun-publish-adapter-contract branch from e2cd043 to fad0f25 Compare July 14, 2026 19:47
@jrusso1020 jrusso1020 force-pushed the 07-10-refactor-cli-centralize-process-lifecycle branch 2 times, most recently from d9d9868 to 53fee32 Compare July 14, 2026 19:49
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