Skip to content

Document Bun's piped console output workarounds - #1011

Merged
dahlia merged 3 commits into
1.0-maintenancefrom
docs/bun-piped-console-workarounds
Oct 5, 2026
Merged

dahlia merged 3 commits into
1.0-maintenancefrom
docs/bun-piped-console-workarounds

Conversation

@dahlia

@dahlia dahlia commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Importing @optique/run can trigger Bun's silent truncation of large piped console output (see also oven-sh/bun#36419), even after successful parsing and natural exit. The JSDoc and runner guide recommend process.stdout.write() and completion callbacks before explicit exit, since delays cannot recover dropped bytes. They also explain why disabling TTY detection is insufficient and link the upstream fix without naming an unverified fixed version.

Fixes #1007.

Explain how Bun can drop large piped console output after importing
@optique/run, even when parsing succeeds and the process exits naturally.
Document stream writes and completion callbacks in the runner JSDoc and
VitePress guide, with links to the upstream bug and merged fix.

Fixes #1007

Changelog: none
Assisted-by: Codex:gpt-6.1-sol
@dahlia dahlia self-assigned this Oct 5, 2026
@dahlia dahlia linked an issue Oct 5, 2026 that may be closed by this pull request
@dahlia

dahlia commented Oct 5, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@dahlia

dahlia commented Oct 5, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Pull request base or head changed.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-05T16:49:47.987910Z eeca3ec Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dahlia dahlia added the documentation Improvements or additions to documentation label Oct 5, 2026
@codecov

codecov Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.87%. Comparing base (8d8637e) to head (eeca3ec).
⚠️ Report is 1 commits behind head on 1.0-maintenance.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@                 Coverage Diff                 @@
##           1.0-maintenance    #1011      +/-   ##
===================================================
+ Coverage            88.85%   88.87%   +0.01%     
===================================================
  Files                   67       67              
  Lines                31992    31992              
  Branches              7520     7524       +4     
===================================================
+ Hits                 28428    28432       +4     
+ Misses                2784     2783       -1     
+ Partials               780      777       -3     

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 04aa28ac02

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/run/src/run.ts Outdated
The synchronous onExit hook cannot await queued stream writes. Explain
that custom output handlers must finish synchronously with the default
exit handler, and describe throwing an exit signal so the caller can
await write completion outside the runner before exiting.

#1011 (comment)

Changelog: none
Assisted-by: Codex:gpt-6.1-sol
@dahlia

dahlia commented Oct 5, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a30cb2101a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/concepts/runners.md
Large console.error output can be dropped just like console.log output.
Document process.stderr.write for diagnostics alongside the stdout
workaround, and warn users of custom stderr handlers in the JSDoc.

#1011 (comment)

Changelog: none
Assisted-by: Codex:gpt-6.1-sol
@dahlia

dahlia commented Oct 5, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: eeca3ec970

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@dahlia
dahlia merged commit de298ac into 1.0-maintenance Oct 5, 2026
8 checks passed
@dahlia
dahlia deleted the docs/bun-piped-console-workarounds branch October 6, 2026 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document Bun's piped console output truncation and workarounds

1 participant