Conversation
…ndle AsyncCommandHandle and the JS CommandHandle expose stdout, stderr, error and exit_code; the sync CommandHandle exposed only pid despite already storing all four values. Add the four properties, identical to the async twin, for sync/async/JS parity (AGENTS.md). The values are already reachable via wait() and CommandExitException, so this is a consistency change, not a correctness fix. Adds a hermetic unit test.
|
We require contributors to sign our Contributor License Agreement, and we don't have @Atishyy27 on file. You can sign our CLA at https://e2b.dev/docs/cla . Once you've signed, post a comment here that says '@cla-bot check' |
🦋 Changeset detectedLatest commit: d53f8df The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Author
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
This branch has not been deployed
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.
Summary
AsyncCommandHandleand the JSCommandHandleexposestdout,stderr,errorandexit_codeas public accessors. The syncCommandHandleexposes onlypid, even though it already stores all four values internally (_stdout_chunks,_stderr_chunks,_result).AGENTS.mdasks for JS + sync + async parity, so this mirrors the async twin's four properties on the sync handle.To be clear on scope: the values are already reachable from
wait()'s return value and fromCommandExitExceptionon the non-zero path, so this is a consistency and ergonomics change for people moving between the sync and async handles, not a correctness fix.Change
Add
stdout,stderr,errorandexit_codeto the syncCommandHandle, identical toAsyncCommandHandleincluding the "None while the command is still running" contract. Existing methods are unchanged.Testing
Added
test_sync_command_handle_exposes_result_accessorsintests/test_command_handle.py, hermetic (in-memory events, no sandbox or API key). Run withuv run pytest tests/test_command_handle.py.AI-WATERMARK
yes