feat(sandbox): restructure file handling by introducing a new inspector module with runtime and archive sources

This commit is contained in:
Harry
2026-01-27 18:57:46 +08:00
parent 951af125af
commit 506163ab2d
8 changed files with 561 additions and 464 deletions

View File

@ -59,7 +59,10 @@ class ArchiveSandboxStorage(SandboxStorage):
(
pipeline(sandbox)
.add(["curl", "-fsSL", download_url, "-o", archive_name], error_message="Failed to download archive")
.add(["tar", "-xzf", archive_name], error_message="Failed to extract archive")
.add(
["sh", "-c", 'tar -xzf "$1" 2>/dev/null; exit $?', "sh", archive_name],
error_message="Failed to extract archive",
)
.add(["rm", archive_name], error_message="Failed to cleanup archive")
.execute(timeout=ARCHIVE_DOWNLOAD_TIMEOUT, raise_on_error=True)
)