fix(sandbox-e2b): preserve zero exit codes in envd streams - #2804
Open
mikemikimike wants to merge 4 commits into
Open
fix(sandbox-e2b): preserve zero exit codes in envd streams#2804mikemikimike wants to merge 4 commits into
mikemikimike wants to merge 4 commits into
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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
Fixes #2793.
E2bEnvdProcessClientincorrectly relies on protobuf field presence for the proto3 scalarexit_code. That causes JSONexitCode: 0end events to be dropped, and causes both JSON and binary streams to retainInteger.MIN_VALUEinstead of the successful exit code.This change:
exitCode, including0;Validation
mvn -pl agentscope-extensions/agentscope-extensions-sandbox/agentscope-extensions-sandbox-e2b -am -Dspotless.check.skip=true -Dtest=E2bEnvdProcessClientTest -Dsurefire.failIfNoSpecifiedTests=false test— 8 passedmvn -pl agentscope-extensions/agentscope-extensions-sandbox/agentscope-extensions-sandbox-e2b spotless:check— passedgit diff --check— passedThe Maven commands were run with JDK 21 because the repository's Spotless plugin requires Java 17+; the shell's default
JAVA_HOMEpoints to JDK 8.