Skip to content

lorenzo/start kw integration pr 1 - #198

Draft
lorenzoberts wants to merge 5 commits into
unstablefrom
lorenzo/start-kw-integration-pr-1
Draft

lorenzo/start kw integration pr 1#198
lorenzoberts wants to merge 5 commits into
unstablefrom
lorenzo/start-kw-integration-pr-1

Conversation

@lorenzoberts

Copy link
Copy Markdown
Collaborator

Stack created with GitHub Stacks CLIGive Feedback 💬

This commit adds the crate features the process infrastructure needs
to spawn long-running jobs, wait asynchronously, and kill a process
group. Tokio gains process and time support, async-trait makes a
running-process handle object-safe, and nix provides a safe killpg
wrapper.

This commit is part of the kw integration's step 1.

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
…p kill

This commit introduces ProcessTrait as a separate infrastructure
boundary from ShellTrait. Spawn returns immediately with a
RunningProcess handle, streams stdout and stderr into a log file, and
supports async wait plus process-group kill so long-running kw jobs
cannot freeze the TUI or leak grandchild processes.

This commit is part of the kw integration's step 1.

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
…tests

This commit adds a test-only ProcessTrait double whose lifecycle a
caller can hold open, finish, or kill. Each spawn is recorded so tests
can assert argv, cwd, and log path without talking to a real process.

This commit is part of the kw integration's step 1.

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit hardens the process module after review. Kill tests wait
for a real grandchild pid instead of racing an empty sidecar file, a
failed spawn no longer leaves a truncated log behind, and the fake
double treats terminal states as terminal so tests can simulate spawn
failure faithfully. The module is unix-gated at declaration, matching
kw's Linux-only process-group kill.

This commit completes the kw integration's step 1.

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
@lorenzoberts
lorenzoberts force-pushed the lorenzo/start-kw-integration-pr-1 branch from d821033 to 2f980cb Compare August 20, 2026 21:01
…module

This commit keeps the dead_code allowances the unused OsProcess surface
still needs, but stops explaining them in terms of a later KwActor that
is not in this change.

This commit is part of the kw integration's step 1.

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
Co-authored-by: Cursor <cursoragent@cursor.com>
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