Skip to content

fix(relay): make process-tree cleanup owner-stable - #11729

Merged
lawrencecchen merged 8 commits into
mainfrom
feat-supervisor-owner
Sep 2, 2026
Merged

lawrencecchen merged 8 commits into
mainfrom
feat-supervisor-owner

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add a keeper-backed ProcessTreeOwner so the Unix process-group identity remains owned through leader reap and cancellation
  • route cancellation and timeout through bounded TERM/KILL and retry transient wait errors before a terminal state
  • preserve Windows Job Object cleanup and bound attach-failure reap
  • add regression coverage for timeout and cancellation after leader reap plus wait retry exhaustion

Verification

  • rustfmt --edition 2024 --check cmux-tui/crates/chatmux-relay/src/actions.rs cmux-tui/crates/chatmux-relay/src/session.rs
  • git diff --check
  • Cargo tests are intentionally not run on the local Mac per repository policy.

Summary by cubic

Fixes process-tree cleanup in the relay so timeout and cancellation can no longer orphan descendants or signal a reused PID after the leader exits.

Behavior

  • Adds a keeper-backed ProcessTreeOwner on Unix so the process group remains valid until cleanup completes.
  • Wires connection cancellation into process actions; cancellation now returns process cancelled as a failed outcome.
  • Timeout and cancellation send TERM first and escalate to KILL after a short deadline; transient wait errors are retried before escalation.
  • Pending escalation is drained before returning so timed-out or cancelled groups are always signaled.
  • Disarms Windows Job Objects on normal completion so successful process jobs aren't terminated; still bounds attach-failure reaping.
  • Adds regression coverage for timeout and cancellation after leader reap, wait retry exhaustion, and successful Windows jobs.

Written for commit ee3b0b4. Summary will update on new commits.

Review in cubic

@vercel

vercel Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cmux166 Canceled Canceled Sep 3, 2026 2:54pm UTC
cmux41 Ready Ready Preview Sep 3, 2026 2:54pm UTC

@coderabbitai

coderabbitai Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 15 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 03fed3d3-9d98-447d-8ea4-7b1eb222b949

📥 Commits

Reviewing files that changed from the base of the PR and between 2c66ab9 and ee3b0b4.

📒 Files selected for processing (2)
  • cmux-tui/crates/chatmux-relay/src/actions.rs
  • cmux-tui/crates/chatmux-relay/src/session.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@cursor

cursor Bot commented Sep 2, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@lawrencecchen
lawrencecchen merged commit 651e4f6 into main Sep 2, 2026
29 of 31 checks passed
rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 2, 2026
651e4f6 Merge pull request manaflow-ai#11729 from manaflow-ai/feat-supervisor-owner
4164ae1 Merge pull request manaflow-ai#11722 from manaflow-ai/feat-plugin-manager-hardening-main
d49bda2 fix: combine journal sequence and cursor continuity checks (manaflow-ai#11468)
ee3b0b4 fix(relay): drain pending process escalation before return
21ace78 fix(tui): distinguish local plugin Git paths
b39ae5d fix(relay): bound keeper setup cleanup
1562cad test(tui): preserve local plugin Git paths
b01cf06 fix(relay): disarm Windows jobs on normal completion
c098bbf test(relay): preserve successful Windows process jobs
7de2d03 fix(tui): reject option-like SSH usernames
ab23651 test(tui): reject option-like SSH usernames
c99f089 fix(relay): keep process-group owner through grace period
cc7e1e1 fix(relay): scrub process-group keeper environment
ba2640e fix(relay): own process groups through bounded cleanup
5836c5f test(relay): cover owned process cancellation and timeout
8f41cf6 fix(tui): reject SSH option-like plugin hosts
ad825ef test(tui): reject SSH option-like plugin hosts
7c4c752 fix(tui): classify common plugin credential variables
a9ec9ea fix(tui): preserve plugin toolchain environment
8fc0e86 test(tui): preserve plugin toolchain environment
012569f fix(tui): close plugin source and environment escape hatches
3fe0d92 test(tui): reject plugin source options and env leaks
edeed73 test(tui): close plugin source and environment escape hatches
63c0c25 fix(tui): reject Git credentials in all non-SSH URLs
e480982 test(tui): reject credential-like Git userinfo
35bb023 fix(tui): allow IPv6 plugin Git sources
df9e467 test(tui): preserve IPv6 plugin Git sources
0931ca2 fix(tui): bound and isolate plugin builds
e199af9 test(tui): cover plugin transport and build boundaries
2c66ab9 iOS: use the official cmux brand lockup (manaflow-ai#11725)
368c47a docs(tui): align protocol contracts with runtime (manaflow-ai#11418)
3507ef0 iOS: launch with a cached session mounts the shell, not the sign-in loading screen (manaflow-ai#11564)
cf475ff Merge pull request manaflow-ai#11727 from manaflow-ai/fix-tui-app-closure-type-main
6603bf7 fix(cmux-tui): annotate pane fixture closure input
1384921 Merge pull request manaflow-ai#11720 from manaflow-ai/fix-cli-upsert-arg-order
a8dbaf4 fix(cli): order hookEventName before runtimeStatus in agent-hook upsert call

This branch was successfully deployed

2 active deployments
Preview – cmux41 — ee3b0b4f Deployed Sep 3, 2026 by vercel[bot]
Preview – cmux166 — ee3b0b4f Deployed Sep 3, 2026 by vercel[bot]
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