Restore original 7-field ReadPipe event contract in Boost.Asio implementation#5988
Draft
akleshchev wants to merge 29 commits into
Draft
Restore original 7-field ReadPipe event contract in Boost.Asio implementation#5988akleshchev wants to merge 29 commits into
akleshchev wants to merge 29 commits into
Conversation
5db14a6 to
e7aa1fd
Compare
e7aa1fd to
e0d7b6d
Compare
9008bcc to
0166827
Compare
Copilot
AI
changed the title
Fix LLProcess large-write scheduling that stalls LLLeap
Restore original ReadPipe EOF event contract
Jul 12, 2026
Copilot
AI
changed the title
Restore original ReadPipe EOF event contract
Restore original 7-field ReadPipe event contract in Boost.Asio implementation
Jul 12, 2026
Copilot stopped work on behalf of
akleshchev due to an error
July 12, 2026 17:49
920d5f7 to
5e1418b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The new Boost.Asio-based
ReadPipeImplbroke the original APR implementation's event contract in two ways: it posted only 4–5 fields per event instead of 7, and at EOF it split the final data and the eof signal into two separate events rather than one combined event.Original APR contract — every pump post included all 7 fields:
What was broken:
name(e.g."stdout","stderr") was never includedeofboolean was absent from normal data eventsexhstboolean was absent from all eventsdatawas omitted whenmLimit == 0(original always emitted it, as an empty string)Fix in
llprocess.cpp: Both the normal-read and EOF branches now always post all 7 fields. The async read states map to the original APR state machine as follows:eofexhstfalsetruetruefalseFix in
llprocess_test.cpp: Reverted thesetLimit()test (test 20) workaround —history.back()is correct again since the last event is the combined eof+data event.Related Issues
Issue Link:
Checklist
Please ensure the following before requesting review:
Additional Notes
The
exhstfield semantics in the async model: Boost.Asio'sasync_read_somereturns whenever any bytes are available, which corresponds to EXHAUSTED (read until no more data, pipe still open). There is no RETRY loop equivalent in the async model, soexhstis alwaystrueon non-EOF events andfalseon the EOF event.