Skip to content

fix(runtime): preserve OpenSandbox stdout line boundaries - #411

Merged
zpzjzj merged 1 commit into
alibaba:mainfrom
bababoom721:codex/fix-opensandbox-stdout-join
Nov 16, 2026
Merged

zpzjzj merged 1 commit into
alibaba:mainfrom
bababoom721:codex/fix-opensandbox-stdout-join

Conversation

@bababoom721

@bababoom721 bababoom721 commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

joinOutputMessages concatenated OpenSandbox SSE stdout messages without separators, so multi-line command output such as find . -type f became a single line and artifact collection saw only one file entry. This fix inserts a newline between adjacent messages only when neither message already carries a line ending, and updates the tests to cover both plain and newline-bearing multi-message output.

Related issues

Changes

  • Insert \n between opensandbox.OutputMessage entries in joinOutputMessages.
  • Reserve one extra byte per message in the builder capacity.
  • Update TestOpenSandboxExecutionToResult to expect out\nput instead of output.

Test plan

  • go test ./internal/runtime passes
  • make test passes
  • make verify passes (fmt + vet + lint)
  • Manual testing steps (if applicable):
    • Run an eval against the OpenSandbox runtime with collect_artifacts configured.
    • Confirm multi-file workspace output is matched and downloaded instead of reported as a single file.

Notes for reviewers

@CLAassistant

CLAassistant commented Nov 15, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T15:17:11.211237Z f3361d4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f3361d4919

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread internal/runtime/opensandbox.go Resolved
Comment thread internal/runtime/opensandbox.go Resolved
Comment thread internal/runtime/opensandbox_test.go Resolved
Comment thread internal/runtime/opensandbox.go Resolved
@bababoom721
bababoom721 force-pushed the codex/fix-opensandbox-stdout-join branch 3 times, most recently from a040c6e to 91a4cbd Compare November 15, 2026 15:40
@bababoom721 bababoom721 changed the title Fix OpenSandbox stdout join losing line boundaries fix(runtime): preserve OpenSandbox stdout line boundaries Nov 15, 2026
joinOutputMessages concatenated SSE stdout messages without separators, so multi-line commands like 'find . -type f' became one line and artifact collection saw a single file. Insert a newline between adjacent messages only when neither message already carries a line ending, and update the executionToResult tests.
@bababoom721
bababoom721 force-pushed the codex/fix-opensandbox-stdout-join branch from 91a4cbd to d511d72 Compare November 15, 2026 15:44

@zpzjzj zpzjzj left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zpzjzj
zpzjzj added this pull request to the merge queue Nov 16, 2026
Merged via the queue into alibaba:main with commit f898425 Nov 16, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants