Repository navigation
Include limit and bytes received in output_limit_exceeded errors - #134
Open
shrisukhani wants to merge 1 commit into
Open
shrisukhani wants to merge 1 commit into
shrisukhani wants to merge 1 commit into
Conversation
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
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
output_limit_exceedederrors now report the configuredmax_output_bytesand the number of bytes received. Before this, callers such as Harbor saw a generic message and could not tell how far over the limit a command went.Changes
Command output exceeds max_output_bytes (8 bytes received, limit 4); increase the collection limit or disconnect a detached processdetailsnow also includesmax_output_bytesandreceived_bytes, next to the existingprocess_idandlast_seq.ProcessOutput.failure()takes an optionaldetailsdict that is merged into the error details.Validation
ruff checkandruff format --checkon the changed filespytest tests/test_sandbox_process_collection.py(22 passed), including a new test for the error message and detailsLink to Devin session: https://app.devin.ai/sessions/12e69524b921442f8ad62f908b07df87
Open in Devin Desktop: https://app.devin.ai/desktop/session/12e69524b921442f8ad62f908b07df87?variant=devin
Requested by: @shrisukhani
Note
Low Risk
Backward-compatible error enrichment only; no change to collection limits or success paths.
Overview
When sandbox command output hits
max_output_bytes,HyperbrowserErrornow tells callers how far over they went instead of a generic limit message.ProcessOutput.failure()accepts an optionaldetailsmap merged withprocess_idandlast_seq. Theoutput_limit_exceededpath setsmax_output_bytesandreceived_bytesindetailsand embeds those counts in the error string (e.g. “8 bytes received, limit 4”).A focused test asserts the code,
details, and message text whenexecexceeds a small byte limit.Reviewed by Cursor Bugbot for commit efa49e5. Bugbot is set up for automated code reviews on this repo. Configure here.