Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
chore: drop the NEXTEST_NO_INPUT_HANDLER workaround (#3482)
Maximilian Roos0a1cd19cc90d
diff --git a/.config/nextest.toml b/.config/nextest.tomlindex b45c5c1a7..789dcf21b 100644--- a/.config/nextest.toml+++ b/.config/nextest.toml@@ -1,15 +1,7 @@-# IMPORTANT: Tests that spawn interactive shells (zsh -ic, bash -ic) cause-# nextest's InputHandler to receive SIGTTOU when restoring terminal settings,-# suspending the test process. See https://github.com/nextest-rs/nextest/issues/2878-#-# Solution: Run with NEXTEST_NO_INPUT_HANDLER=1 or use the pre-merge hook which-# sets this automatically:-#-# NEXTEST_NO_INPUT_HANDLER=1 cargo nextest run --features shell-integration-tests-#-# Or use `cargo test` which doesn't have this issue:-#-# cargo test --test integration --features shell-integration-tests+# Older nextest suspends (SIGTTOU) when a test spawns an interactive shell+# (zsh -ic, bash -ic), as the shell-integration-tests feature does; fixed in+# 0.9.118 (https://github.com/nextest-rs/nextest/issues/2878).+nextest-version = "0.9.118"# Enable setup-scripts (still experimental in nextest) so the build-bins script# below can run before any test starts.diff --git a/.config/wt.toml b/.config/wt.tomlindex 00f46fd77..4fd44d067 100644--- a/.config/wt.toml+++ b/.config/wt.toml@@ -22,7 +22,7 @@ sync = 'if [ "{{ target }}" = "main" ]; then git pull && git push; fi'# `cargo update --locked` would also fail on dependencies merely behind latest.lockfile = "cargo update --workspace --locked"pre-commit = "pre-commit run --all-files"-insta = """RUSTFLAGS='-D warnings' NEXTEST_NO_INPUT_HANDLER=1 cargo insta test --test-runner nextest --dnd --check $([ "$(uname)" = 'Linux' ] && echo '--unreferenced reject') --features shell-integration-tests"""+insta = """RUSTFLAGS='-D warnings' cargo insta test --test-runner nextest --dnd --check $([ "$(uname)" = 'Linux' ] && echo '--unreferenced reject') --features shell-integration-tests"""doctest = "RUSTDOCFLAGS='-Dwarnings' cargo test --doc"doc = "RUSTDOCFLAGS='-Dwarnings' cargo doc --no-deps --document-private-items"diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yamlindex 9b71834f4..99b57f845 100644--- a/.github/workflows/ci.yaml+++ b/.github/workflows/ci.yaml@@ -363,8 +363,6 @@ jobs:cargo-affected-db-v1-${{ runner.os }}-- name: π Collect coverage data- env:- NEXTEST_NO_INPUT_HANDLER: 1run: cargo affected collect -- --features shell-integration-tests- name: πΎ Save coverage DB@@ -457,7 +455,6 @@ jobs:- name: π― Run affected testsenv:- NEXTEST_NO_INPUT_HANDLER: 1# An empty affected selection is a valid outcome β a diff can touch# nothing with recorded coverage. nextest's default exits 4 ("no# tests to run"), which fails this advisory job spuriously. Windows@@ -512,8 +509,6 @@ jobs:- run: cargo llvm-cov clean --workspace- name: π Generate coverage report- env:- NEXTEST_NO_INPUT_HANDLER: 1run: cargo llvm-cov --features shell-integration-tests --cobertura --output-path=cobertura.xml- name: Upload code coverage resultsdiff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yamlindex c52b68bf8..978c62904 100644--- a/.github/workflows/nightly.yaml+++ b/.github/workflows/nightly.yaml@@ -254,8 +254,6 @@ jobs:run: rustup target add ${{ matrix.target }}- name: π§ͺ Tests- env:- NEXTEST_NO_INPUT_HANDLER: 1run: cargo nextest run --target ${{ matrix.target }}check-unused-dependencies:diff --git a/Cargo.toml b/Cargo.tomlindex d66eeb5a8..1375ea009 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -100,9 +100,6 @@ cli = [syntax-highlighting = ["dep:tree-sitter", "dep:tree-sitter-bash", "dep:tree-sitter-highlight"]# Enable shell/PTY integration tests (requires bash, zsh, fish installed on system)# Includes: shell wrapper tests, PTY-based approval prompts, TUI select, progressive rendering-# These tests can cause nextest to suspend due to terminal foreground pgrp issues.-# When enabled, run with NEXTEST_NO_INPUT_HANDLER=1 to avoid suspension.-# See CLAUDE.md "Nextest Terminal Suspension" section for details.shell-integration-tests = []# Enable benchmarks whose fixture is too large for hosted CI: the rust-scale# prune fixture (~15 GiB of rust-lang/rust worktrees, cached indiff --git a/tests/CLAUDE.md b/tests/CLAUDE.mdindex e062c396b..471f90a61 100644--- a/tests/CLAUDE.md+++ b/tests/CLAUDE.md@@ -14,7 +14,7 @@ A target-filtered run (`--lib`, `--test integration`, β¦) on a fresh `target/`**Claude Code web:** `task setup-web` installs zsh/fish/nushell, `gh`, and dev tools. Install `task` first if needed: `sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/bin` then `export PATH="$HOME/bin:$PATH"`. The permission tests (`test_permission_error_prevents_save`, `test_approval_prompt_permission_error`) skip automatically when running as root.-**Shell/PTY tests** (`shell-integration-tests` feature: approval prompts, picker, progressive rendering, shell wrappers): tests that spawn interactive shells (`zsh -ic`, `bash -ic`) make nextest's InputHandler take SIGTTOU when restoring terminal settings, suspending the run mid-test (`zsh: suspended (tty output)`; see [nextest#2878](https://github.com/nextest-rs/nextest/issues/2878)). Use `cargo test` instead of `cargo nextest run`, or set `NEXTEST_NO_INPUT_HANDLER=1`. The pre-merge hook sets it automatically.+**Shell/PTY tests** (`shell-integration-tests` feature): approval prompts, picker, progressive rendering, shell wrappers.## Coverage Investigationdiff --git a/tests/common/mod.rs b/tests/common/mod.rsindex cbb132bc5..e53f4dd37 100644--- a/tests/common/mod.rs+++ b/tests/common/mod.rs@@ -380,12 +380,6 @@ pub fn merge_scenario_multi_commit(mut repo: TestRepo) -> (TestRepo, PathBuf) {////// Use this instead of `portable_pty::native_pty_system()` directly to ensure/// PTY tests work correctly across platforms.-///-/// NOTE: PTY tests are behind the `shell-integration-tests` feature because they can-/// trigger a nextest bug where its InputHandler cleanup receives SIGTTOU. This happens-/// when tests spawn interactive shells (zsh -ic, bash -ic) which take control of the-/// foreground process group. See https://github.com/nextest-rs/nextest/issues/2878-/// Workaround: run with NEXTEST_NO_INPUT_HANDLER=1. See CLAUDE.md for details.pub fn native_pty_system() -> Box<dyn portable_pty::PtySystem> {#[cfg(unix)]ignore_tty_signals();