Skip to content

fix: flush grouped output after spawn errors - #634

Merged
gustavohenke merged 1 commit into
open-cli-tools:mainfrom
mithilkatkoria:fix/grouped-output-spawn-error
Oct 24, 2026
Merged

gustavohenke merged 1 commit into
open-cli-tools:mainfrom
mithilkatkoria:fix/grouped-output-spawn-error

Conversation

@mithilkatkoria

Copy link
Copy Markdown
Contributor

With group: true, output from later commands can be lost when a middle command fails to spawn before the first command finishes. For example, run a slow command, a command with a nonexistent cwd, and a command that immediately prints a message. The final message remains buffered even after all processes finish.

Command preserves its errored state after the close event. Treat that state as finished when advancing grouped output, just as for exited. The regression verifies ordered flushing of both the spawn error and the later command's output, with no remaining buffered text.

Validation:

  • Reproduced the missing output through the built API with real child processes before the fix; the same reproduction now prints the message and passes an assertion.
  • The new unit regression fails before the fix. Output-writer, command, and core concurrently tests pass (67 tests).
  • Full CI test command with coverage: 647 tests pass, including all four smoke tests. One unrelated SIGINT test cannot start on this Windows ARM64 host because ctrlc-wrapper@0.0.5 only maps x64 and ia32, producing Cannot find module 'ctrlc-wrapper-windows-undefined/start.exe' before application execution.
  • Repository lint, typecheck, formatting, build, diff check, and the actual lint-staged pre-commit hook pass. No dependency or lockfile changes.

AI disclosure: OpenAI Codex (GPT-6) found and reproduced the bug, implemented the patch and regression, performed the self-review, ran the reported checks, and wrote this description. No independent human review is claimed.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 98.768% (+0.002%) from 98.766% — mithilkatkoria:fix/grouped-output-spawn-error into open-cli-tools:main

@gustavohenke gustavohenke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks Codex

@gustavohenke
gustavohenke merged commit 19bda02 into open-cli-tools:main Oct 24, 2026
21 checks passed
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.

3 participants