Skip to content

refactor: share sandbox tar exclude arg generation#2987

Merged
alfozan merged 1 commit intomainfrom
refactor/sandbox-tar-exclude-args
Apr 21, 2026
Merged

refactor: share sandbox tar exclude arg generation#2987
alfozan merged 1 commit intomainfrom
refactor/sandbox-tar-exclude-args

Conversation

@seratch
Copy link
Copy Markdown
Member

@seratch seratch commented Apr 21, 2026

This pull request improves sandbox workspace persistence internals by sharing the shell tar --exclude argument generation used by Blaxel, Daytona, and E2B sandbox sessions.

It adds a small common helper under src/agents/sandbox/session/ and keeps each provider's existing private _tar_exclude_args() surface as a thin delegate, preserving the generated command strings while removing duplicated quoting, sorting, and path-normalization logic. Direct unit coverage was added for empty/dot paths, stable sorting, shell quoting, dot-prefixed patterns, and absolute-path normalization.

@@ -0,0 +1,18 @@
from __future__ import annotations
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: we prob should have a utils lib to keep these

@alfozan alfozan merged commit 4c68780 into main Apr 21, 2026
10 checks passed
@alfozan alfozan deleted the refactor/sandbox-tar-exclude-args branch April 21, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants