Skip to content

fix(harness): stream sandbox uploads through tar#1881

Open
guslegend0510 wants to merge 9 commits into
agentscope-ai:mainfrom
guslegend0510:fix/issue-1876-sessiontree-upload-tar
Open

fix(harness): stream sandbox uploads through tar#1881
guslegend0510 wants to merge 9 commits into
agentscope-ai:mainfrom
guslegend0510:fix/issue-1876-sessiontree-upload-tar

Conversation

@guslegend0510

Copy link
Copy Markdown
Contributor

AgentScope-Java Version

2.0.0-SNAPSHOT

Description

This PR fixes #1876.

On Windows, large SessionTree mirror uploads in the Docker sandbox could hit CreateProcess error=206 because SandboxBackedFilesystem.uploadFiles() inlined file contents as Base64 into a docker exec command.

The fix changes sandbox uploads to stream each file as a single-file tar archive and hydrate it through Sandbox.hydrateWorkspace(InputStream) instead of passing the payload through the command line. This removes the Windows command-line length limit from session mirror uploads while keeping existing sandbox behavior unchanged.

A regression test was added to verify that uploads go through tar hydration and no longer shell out via exec().

How to test

mvn -pl agentscope-harness -am -Dtest=SandboxBackedFilesystemTest test

Related issues

Fixes #1876

@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.83673% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...nt/filesystem/sandbox/SandboxBackedFilesystem.java 91.83% 0 Missing and 4 partials ⚠️

📢 Thoughts on this report? Let us know!

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.

[Bug]: Windows 下 SessionTree 镜像大文件触发 CreateProcess error=206

3 participants