Repository navigation
fix(task): avoid zsh process substitution hangs - #11904
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe change centralizes Unix child-process isolation for synchronous and asynchronous execution. It adds unit tests for isolation selection and a macOS tmux end-to-end test for zsh process substitution. ChangesProcess isolation and regression coverage
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Workflow as macOS workflow
participant Tmux as tmux
participant Mise as mise task runner
participant Zsh as zsh process substitution
Workflow->>Tmux: Start detached test session
Tmux->>Mise: Run aggregate task with parallel jobs
Mise->>Zsh: Execute process-substitution task
Mise-->>Tmux: Write status and task output
Tmux-->>Workflow: Provide completion status and logs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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. Comment |
|
This PR currently has failing checks. If this continues for 7 days, it will be closed automatically. This is warning day 1 of 7. Please update the PR when you have a chance. Feel free to reopen or create a new PR if it is closed and you'd like to continue working on it. This comment was generated by an automated workflow. |
34f27d8 to
fdae1c0
Compare
Greptile SummaryThe PR changes macOS non-interactive task execution to use a separate session when mise is attached to a terminal, preserving existing process-group cleanup and interactive behavior.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (4): Last reviewed commit: "fix(task): avoid zsh process substitutio..." | Re-trigger Greptile |
Summary
Root cause
PR #9655 placed parallel task commands in independent process groups so failure and interrupt cleanup could terminate their full process trees. On macOS, a non-interactive zsh command in that process group can still interact with tmux's controlling terminal during process substitution and become job-control stopped. Linux does not exhibit the same behavior, and the macOS reproduction also completes with
--jobs 1or when mise's process-group management is disabled.For non-interactive commands launched under a macOS terminal, this change uses
setsid()instead. The child remains the leader of a process group whose ID matches its PID, so the existingkillpg(child_pid)cleanup continues to reach descendants without leaving zsh attached to tmux's controlling terminal.Verification
mise exec -- cargo test --all-features cmd::tests::test_child_process_isolationmise run test:e2e e2e/tasks/test_task_zsh_process_substitution_tmux_macosmise run test:e2e e2e/tasks/test_task_parallel_fail_fastmise exec -- cargo check --all-featuresmise exec -- cargo clippy --workspace --all-features --all-targets -- -D warningsmise exec -- cargo fmt --all -- --checkmise exec -- shellcheck e2e/tasks/test_task_zsh_process_substitution_tmux_macosmise exec -- shfmt -d e2e/tasks/test_task_zsh_process_substitution_tmux_macosAddresses #9790
AI-assisted — Tool: Codex; model: OpenAI/GPT-5; version: unavailable.
Summary by CodeRabbit
Bug Fixes
Tests