[PR #114] [MERGED] fix(cli): avoid TUI hang under npx process group #143

Closed
opened 2026-02-27 10:22:24 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mikeyobrien/ralph-orchestrator/pull/114
Author: @mikeyobrien
Created: 1/25/2026
Status: Merged
Merged: 1/25/2026
Merged by: @mikeyobrien

Base: mainHead: fix/npx-tui-pgid


📝 Commits (1)

  • de8c2fc fix(cli): avoid TUI hang under npx process group

📊 Changes

1 file changed (+36 additions, -3 deletions)

View changed files

📝 crates/ralph-cli/src/main.rs (+36 -3)

📄 Description

Summary

  • prevent setpgid when running in the foreground TTY group to avoid TUI input hang under wrapper launches (e.g. npx)

Testing

running 12 tests
test testing::smoke_runner::tests::test_list_fixtures_nonexistent_directory ... ok
test testing::smoke_runner::tests::test_config_builder_pattern ... ok
test testing::smoke_runner::tests::test_fixture_not_found_returns_error ... ok
test testing::smoke_runner::tests::test_result_accessors ... ok
test testing::smoke_runner::tests::test_list_fixtures_empty_directory ... ok
test testing::smoke_runner::tests::test_empty_fixture_completes ... ok
test testing::smoke_runner::tests::test_list_fixtures_finds_jsonl_files ... ok
test testing::smoke_runner::tests::test_timeout_handling ... ok
test testing::smoke_runner::tests::test_captures_fixture_exhausted_termination ... ok
test testing::smoke_runner::tests::test_run_fixture_through_event_loop ... ok
test testing::smoke_runner::tests::test_captures_completion_termination ... ok
test testing::smoke_runner::tests::test_event_counting ... ok

test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 428 filtered out; finished in 0.00s

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 3 filtered out; finished in 0.00s

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 9 filtered out; finished in 0.00s

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 5 filtered out; finished in 0.00s

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 32 filtered out; finished in 0.00s

  • ============================= test session starts ==============================
    platform darwin -- Python 3.14.2, pytest-9.0.2, pluggy-1.6.0
    rootdir: /Users/mobrienv/Code/ralph-orchestrator
    plugins: anyio-4.12.1, asyncio-1.3.0
    asyncio: mode=Mode.STRICT, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
    collected 9 items / 1 error

==================================== ERRORS ====================================
__________________________ ERROR collecting tools/e2e __________________________
Defining 'pytest_plugins' in a non-top-level conftest is no longer supported:
It affects the entire test suite instead of just below the conftest as expected.
/Users/mobrienv/Code/ralph-orchestrator/tools/e2e/conftest.py
Please move it to a top level conftest file at the rootdir:
/Users/mobrienv/Code/ralph-orchestrator
For more information, visit:
https://docs.pytest.org/en/stable/deprecations.html#pytest-plugins-in-non-top-level-conftest-files
=========================== short test summary info ============================
ERROR tools/e2e - Failed: Defining 'pytest_plugins' in a non-top-level confte...
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
============================== 1 error in 28.49s =============================== (fails: pytest_plugins in tools/e2e/conftest.py is non-top-level)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mikeyobrien/ralph-orchestrator/pull/114 **Author:** [@mikeyobrien](https://github.com/mikeyobrien) **Created:** 1/25/2026 **Status:** ✅ Merged **Merged:** 1/25/2026 **Merged by:** [@mikeyobrien](https://github.com/mikeyobrien) **Base:** `main` ← **Head:** `fix/npx-tui-pgid` --- ### 📝 Commits (1) - [`de8c2fc`](https://github.com/mikeyobrien/ralph-orchestrator/commit/de8c2fc9d14f80639c2dd1ae8acbc266dd58ea35) fix(cli): avoid TUI hang under npx process group ### 📊 Changes **1 file changed** (+36 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/ralph-cli/src/main.rs` (+36 -3) </details> ### 📄 Description ## Summary - prevent setpgid when running in the foreground TTY group to avoid TUI input hang under wrapper launches (e.g. npx) ## Testing - - running 12 tests test testing::smoke_runner::tests::test_list_fixtures_nonexistent_directory ... ok test testing::smoke_runner::tests::test_config_builder_pattern ... ok test testing::smoke_runner::tests::test_fixture_not_found_returns_error ... ok test testing::smoke_runner::tests::test_result_accessors ... ok test testing::smoke_runner::tests::test_list_fixtures_empty_directory ... ok test testing::smoke_runner::tests::test_empty_fixture_completes ... ok test testing::smoke_runner::tests::test_list_fixtures_finds_jsonl_files ... ok test testing::smoke_runner::tests::test_timeout_handling ... ok test testing::smoke_runner::tests::test_captures_fixture_exhausted_termination ... ok test testing::smoke_runner::tests::test_run_fixture_through_event_loop ... ok test testing::smoke_runner::tests::test_captures_completion_termination ... ok test testing::smoke_runner::tests::test_event_counting ... ok test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 428 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 3 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 9 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 5 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 32 filtered out; finished in 0.00s - ============================= test session starts ============================== platform darwin -- Python 3.14.2, pytest-9.0.2, pluggy-1.6.0 rootdir: /Users/mobrienv/Code/ralph-orchestrator plugins: anyio-4.12.1, asyncio-1.3.0 asyncio: mode=Mode.STRICT, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function collected 9 items / 1 error ==================================== ERRORS ==================================== __________________________ ERROR collecting tools/e2e __________________________ Defining 'pytest_plugins' in a non-top-level conftest is no longer supported: It affects the entire test suite instead of just below the conftest as expected. /Users/mobrienv/Code/ralph-orchestrator/tools/e2e/conftest.py Please move it to a top level conftest file at the rootdir: /Users/mobrienv/Code/ralph-orchestrator For more information, visit: https://docs.pytest.org/en/stable/deprecations.html#pytest-plugins-in-non-top-level-conftest-files =========================== short test summary info ============================ ERROR tools/e2e - Failed: Defining 'pytest_plugins' in a non-top-level confte... !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! ============================== 1 error in 28.49s =============================== *(fails: pytest_plugins in tools/e2e/conftest.py is non-top-level)* --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 10:22:24 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ralph-orchestrator#143
No description provided.