Repository navigation
fix(sandbox): split stderr from stdout in _parse_logs (#11629) - #11742
Merged
Merged
Conversation
Contributor
✅ SSOT Configuration Compliance: Passing🎉 No hardcoded values detected that have SSOT config equivalents! |
21 of 23 tasks
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.
Closes #11629
Thinking Path
_parse_logsalways returned empty stderr. The issue suggested demuxing frame headers, but docker-py's non-tty, non-streamingcontainer.logs()already strips the 8-byte headers and joins payloads (_multiplexed_buffer_helper) — the combined bytes are irreversibly merged before we ever see them, so header-parsing in_parse_logscan never work. Root cause fix: request the streams separately from the daemon (server-side filtering — same mechanism the #11613 broker path already uses). Sandbox containers are created without tty, so per-stream filtering is valid.What Changed
secure_sandbox_executor.py:_execute_container_with_timeoutfetcheslogs(stdout=True, stderr=False)andlogs(stdout=False, stderr=True);_parse_logs(stdout_raw, stderr_raw)decodes each via new_decode_log_streamand returns a real (stdout, stderr) pair; broker path_collect_broker_resultsreads stderr from element 1 instead of the old lump-into-stdout quirk.test_parse_logs_splits_stdout_and_stderrandtest_execute_container_with_timeout_fetches_streams_separately(asserts a combined fetch is never made).Verification
tests/unit/chat_workflow/test_code_exec.py: 69 passed (agent run and independent re-run identical). py_compile clean.test_codeexec_docker_smoke.py4 skipped — Docker-daemon-gated, deferred to the on-box followup(validation): on-box Docker stdio-broker smoke before enabling AUTOBOT_CODEEXEC_ENABLED #11596 smoke (code-exec feature remains flag-off).Model Used
Claude Fable 5 (subagent: general-purpose)