fix(daytona): bulk upload, config bridge, silent disk cap (#7362)#7447
fix(daytona): bulk upload, config bridge, silent disk cap (#7362)#7447alt-glitch wants to merge 5 commits into
Conversation
FileSyncManager now accepts an optional bulk_upload_fn callback. When provided, all changed files are uploaded in one call instead of iterating one-by-one with individual HTTP POSTs. DaytonaEnvironment wires this to sandbox.fs.upload_files() which batches everything into a single multipart POST — ~580 files goes from ~5 min to <2s on init. Parent directories are pre-created in one mkdir -p call. Fixes #7362 (item 1).
Add terminal.container_cpu, container_memory, container_disk, and container_persistent to the _config_to_env_sync dict so that `hermes config set terminal.container_memory 8192` correctly writes TERMINAL_CONTAINER_MEMORY=8192 to ~/.hermes/.env. Previously these YAML keys had no effect because terminal_tool.py reads only env vars and the bridge was missing these mappings. Fixes #7362 (item 2).
warnings.warn() is suppressed/invisible when running as a gateway or agent. Switch to logger.warning() so the disk cap message actually appears in logs. Fixes #7362 (item 3).
Cover the three key behaviors: - bulk_upload_fn is called instead of per-file upload_fn - Fallback to upload_fn when bulk_upload_fn is None - Rollback on bulk upload failure retries all files
|
|
@BugBot review |
PR SummaryMedium Risk Overview Fixes terminal config/env bridging by syncing Makes disk-cap messages visible in gateway/agent mode by switching Daytona’s disk limit notice from Reviewed by Cursor Bugbot for commit c724aa8. Configure here. |
Benchmark ResultsTested against live Daytona sandbox with 581 files (skills, credentials, caches):
188× faster. The Bulk upload log |
|
|
@BugBot review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit c724aa8. Configure here.
|
Merged via PR #7538. Your commits were cherry-picked onto current main with authorship preserved in git log. Thanks for the contribution @alt-glitch — the bulk upload optimization is a big win for Daytona users. |
Wire bulk_upload_fn into SSH and Modal backends, matching the pattern established for Daytona in NousResearch#7447. SSH: stages files in a temp directory mirroring the remote path layout, then pipes tar cf | ssh tar xf in a single TCP stream. Eliminates per-file scp round-trips. Modal: builds an in-memory gzipped tar archive, base64-encodes it, and decodes+extracts in one exec call. Eliminates per-file base64|exec overhead. Both backends pre-create all unique parent directories in a single call before the bulk transfer. Closes NousResearch#7465 Closes NousResearch#7467
Fixes #7362 — three issues with the Daytona backend.
Changes
1. Bulk file upload (perf)
bulk_upload_fncallback toFileSyncManagerDaytonaEnvironmentwires this tosandbox.fs.upload_files()(single multipart POST)mkdir -pcallupload_fn2. Config-to-env bridge (config)
container_cpu,container_memory,container_disk,container_persistentto_config_to_env_syncdict inconfig.pyhermes config set terminal.container_memory 8192now correctly writesTERMINAL_CONTAINER_MEMORY=8192to.env3. Disk cap visibility (logging)
warnings.warn()withlogger.warning()for disk cap messagewarnings.warn()is suppressed in agent/gateway mode;logger.warning()always visibleTests