Skip to content

[process] Stop forcing PTY for queued processes (#171)#229

Merged
coisa merged 2 commits intomainfrom
fix/171-non-interactive-process-tty
Apr 24, 2026
Merged

[process] Stop forcing PTY for queued processes (#171)#229
coisa merged 2 commits intomainfrom
fix/171-non-interactive-process-tty

Conversation

@coisa
Copy link
Copy Markdown
Contributor

@coisa coisa commented Apr 24, 2026

Related Issue

Closes #171

Motivation / Context

  • Aggregate commands such as reports, standards, and dev-tools:fix enqueue nested DevTools subprocesses.
  • ProcessQueue was enabling PTY on every queued process whenever Symfony reported PTY support, which still fails in non-interactive runners without /dev/tty.
  • The queue already streams child stdout/stderr through Symfony Process callbacks, including detached processes, so forcing PTY is unnecessary for output forwarding.

Changes

  • Removed unconditional setPty(true) from ProcessQueue::add().
  • Added regression coverage asserting queued processes are not switched to PTY.
  • Documented that nested command output is streamed via process callbacks and aggregate commands should stay non-PTY in CI/non-interactive contexts.
  • Added an unreleased changelog entry for the non-interactive aggregate-command fix.

Verification

  • composer dev-tools
  • Focused command(s):
    • ./vendor/bin/phpunit tests/Process/ProcessQueueTest.php
    • composer dev-tools tests -- --filter='ProcessQueue' --no-cache
    • composer dev-tools tests -- --filter='Process' --no-cache
    • composer dev-tools code-style -- --fix --json
    • composer dev-tools phpdoc -- --json --no-cache
    • composer dev-tools refactor -- --json
    • composer dev-tools changelog:check
    • git diff --check
  • Manual verification: reproduced the original reports failure before the fix (proc_open(/dev/tty): Failed to open stream: Device not configured). After removing forced PTY, reports and standards advanced into their nested child commands without the /dev/tty failure; the local run was interrupted once it reached the long phpmetrics stage.

composer dev-tools was not completed end-to-end locally because the full gate enters the long reports -> metrics path in this shell; the original immediate /dev/tty failure is no longer reproduced.

Documentation / Generated Output

  • README updated
  • docs/ updated
  • Generated or synchronized output reviewed

No generated docs/wiki output was committed.

Changelog

  • Added a notable CHANGELOG.md entry

Reviewer Notes

  • This intentionally removes PTY use instead of adding terminal detection. Symfony Process callbacks already preserve streamed stdout/stderr for blocking and detached processes, which keeps the queue behavior simpler and safer in non-interactive environments.

@github-actions
Copy link
Copy Markdown
Contributor

@coisa coisa merged commit 58e2022 into main Apr 24, 2026
2 checks passed
@coisa coisa deleted the fix/171-non-interactive-process-tty branch April 24, 2026 05:23
@github-project-automation github-project-automation Bot moved this from Backlog to Released in PHP Fast Forward Project Apr 24, 2026
github-actions Bot added a commit that referenced this pull request Apr 24, 2026
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

Status: Released

Development

Successfully merging this pull request may close these issues.

[process] Investigate /dev/tty dependency in nested command orchestration

1 participant