Skip to content

fix(runner): skip inactive parallel spinners - #1373

Merged
Chemaclass merged 1 commit into
mainfrom
1368-spinner
Oct 2, 2026
Merged

Chemaclass merged 1 commit into
mainfrom
1368-spinner

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

Background

Closes #1368.

Captured parallel runs keep their output pipes open for roughly one extra second because an inactive spinner starts a sleep child. Start the spinner only when stdout is a terminal, progress is enabled, and output is human-readable.

Changes

  • Skip spinner creation and cleanup when no animation is visible.
  • Return immediately from the spinner when it is disabled.
  • Add a deterministic regression for piped output, machine output, and --no-progress. It detects spinner creation without an elapsed-time threshold.

Validation

make sa, make lint, the full sequential suite on macOS Bash 3.2 and Linux Bash 5.3, macOS make test/parallel and make test/strict, and the full built-artifact suite pass. Parallel checks use four jobs; macOS runs use the directory argument to avoid the existing Bash 3.2 process-substitution descriptor limit.

The full source suite passes on GNU Bash 3.00.0 in sequential, parallel, simple, simple-parallel, and strict modes, using the same shell selection as CI. The built artifact also passes 138 focused provider, reporting, output, and fork tests with Bash 3.0 first in PATH. A PTY check confirms ordinary terminal progress still starts the spinner and suppressed progress does not.

On macOS arm64 and Bash 3.2.57, 100 passing tests with --parallel --simple and both output streams captured improved from 1,257 ms to 439 ms, a 65% reduction. Redirecting output to /dev/null was effectively unchanged (397 ms to 391 ms). These are medians of five alternating baseline and branch runs after one warm-up, using the same external harness and fixture against main at 860c797a48e34be20b019a70f58c0e06d15c8d33. Timings stay out of the test suite.

Checklist

  • I updated the CHANGELOG.md to reflect the new feature or fix.
  • Documentation does not need changes; the CLI and public API are unchanged.

@Chemaclass Chemaclass added the bug Something isn't working label Oct 2, 2026
@Chemaclass Chemaclass self-assigned this Oct 2, 2026
@Chemaclass
Chemaclass merged commit 51c7b7a into main Oct 2, 2026
37 checks passed
@Chemaclass
Chemaclass deleted the 1368-spinner branch October 2, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inactive parallel spinner keeps captured output open after the runner exits

1 participant