Skip to content

fix(cli): complete short output writes - #1691

Merged
Lorenzobattistela merged 2 commits into
bendlang:mainfrom
toprameen:complete-cli-short-writes
Oct 19, 2026
Merged

Lorenzobattistela merged 2 commits into
bendlang:mainfrom
toprameen:complete-cli-short-writes

Conversation

@toprameen

Copy link
Copy Markdown
Contributor

CLI output could end successfully after a short write to a nonblocking pipe.
The writer now encodes each message once and continues from the last byte
written until the output is complete. Temporary write errors are retried,
zero progress fails, and closed readers leave the command's exit status intact.

The new compiled-CLI test sends Unicode guide text through a real nonblocking
pipe and restores the guide afterward.

The regression fails on the baseline and passes with the fix in source and
compiled CLIs on macOS and Linux arm64. Local retry and closed-reader checks
pass, as does the repository gate (54/54). Strict TypeScript retains the same
11 baseline diagnostics.

@toprameen
toprameen marked this pull request as ready for review October 18, 2026 00:36
@Lorenzobattistela Lorenzobattistela self-assigned this Oct 19, 2026
@Lorenzobattistela
Lorenzobattistela merged commit 933c588 into bendlang:main Oct 19, 2026
1 check 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.

2 participants