Skip to content

Document TTY-detection limitation for goaccess, tqdm, etc. - #427

Merged
yarikoptic merged 4 commits into
con:mainfrom
asmacdo:tty-troubleshooting-docs
Jul 31, 2026
Merged

Document TTY-detection limitation for goaccess, tqdm, etc.#427
yarikoptic merged 4 commits into
con:mainfrom
asmacdo:tty-troubleshooting-docs

Conversation

@asmacdo

@asmacdo asmacdo commented May 11, 2026

Copy link
Copy Markdown
Member

duct starts the wrapped command with start_new_session=True and pipes stdout/stderr instead of a PTY, so isatty() in the child is false. Programs that adapt their output to that signal (goaccess refusing to read piped stdin, tqdm switching to its rate-limited non-TTY path) appear broken under duct.

Add a FAQ entry that names the limitation, gives concrete workarounds for both tools, and shows the setsid recipe so users can reproduce and develop against the non-interactive path without duct.

Refs: #261, #426

duct starts the wrapped command with start_new_session=True and pipes
stdout/stderr instead of a PTY, so isatty() in the child is false.
Programs that adapt their output to that signal (goaccess refusing to
read piped stdin, tqdm switching to its rate-limited non-TTY path)
appear broken under duct.

Add a FAQ entry that names the limitation, gives concrete workarounds
for both tools, and shows the setsid recipe so users can reproduce
and develop against the non-interactive path without duct.

Refs: con#261, con#426

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 11, 2026 18:35
@asmacdo asmacdo added the semver-documentation Changes only affect the documentation label May 11, 2026
@codecov

codecov Bot commented May 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.74%. Comparing base (aef263f) to head (b12a323).
⚠️ Report is 39 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #427      +/-   ##
==========================================
- Coverage   91.92%   91.74%   -0.18%     
==========================================
  Files          15       15              
  Lines        1127     1127              
  Branches      140      140              
==========================================
- Hits         1036     1034       -2     
- Misses         69       70       +1     
- Partials       22       23       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a README FAQ entry explaining that duct’s default execution mode can change TTY detection for wrapped commands, which can cause behavior differences in tools like goaccess and tqdm.

Changes:

  • Add a new FAQ section describing the “non-interactive / not-a-TTY” behavior when commands are run under duct.
  • Provide concrete workarounds for goaccess and tqdm behavior differences.
  • Provide a setsid command recipe to reproduce similar non-TTY conditions outside of duct.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md
Comment thread README.md Outdated
@asmacdo
asmacdo marked this pull request as draft May 11, 2026 18:39
@yarikoptic
yarikoptic marked this pull request as ready for review July 31, 2026 21:34
@yarikoptic
yarikoptic merged commit dff0654 into con:main Jul 31, 2026
28 of 29 checks passed
@github-actions

Copy link
Copy Markdown

🚀 PR was released in v0.22.0 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released semver-documentation Changes only affect the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants