Ilya/daytona cookbook sdk fixes - #518
Merged
jdchawla29 merged 4 commits intoJul 30, 2026
Merged
Conversation
shfunc
force-pushed
the
ilya/daytona-cookbook-sdk-fixes
branch
from
July 28, 2026 16:36
a34ee0c to
5395b0d
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5395b0d. Configure here.
shfunc
force-pushed
the
ilya/daytona-cookbook-sdk-fixes
branch
from
July 28, 2026 16:54
5395b0d to
56a22c5
Compare
A snapshot built from image= is now checked against the build Daytona recorded for it (Dockerfile text plus the SDK's own context hashes) and rebuilt in place when they differ. Names stay durable handles: no digest suffixes, no process-local registry, no prune_snapshots(), and a plain registry-ref string keeps working as image=. Per-row resources build sized variants under readable names (env-4cpu) since sizing is baked in at build. Verified against the live API: dockerfile_content round-trips verbatim, locally computed context hashes match the stored ones, and a deleted name stays taken for ~10s, so the rebuild waits for it to free before creating. The reward-spread warning forms groups by group_id the same way _check_groups does; positional slicing misjudged interleaved batches. Its tests stub the training service instead of suppressing a live request. hud trace renders payloads as rich Text rather than escaping them into markup strings, and the SSH tool error helper folds into the module's existing imports.
jdchawla29
self-requested a review
July 30, 2026 20:05
jdchawla29
approved these changes
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Note
Medium Risk
Daytona snapshot rebuild/delete polling and SSH path logic affect cloud rollouts and agent file tools; changes are well-tested but touch runtime provisioning and training batch validation.
Overview
This PR tightens Daytona snapshot handling: stale snapshots are detected (Dockerfile/context hashes or registry ref) and rebuilt under the same name, resource overrides with
image=build suffixed snapshots (e.g.env-4cpu), fractional CPUs are rejected, failed sandbox deletes are logged, and env session logs are attached to handshake failures via exception notes.SSH workspace paths on macOS-style symlink spellings (
/tmpvs/private/tmp) are fixed by publishingcwd_aliasesfromWorkspaceand stripping them inSSHClient.map_path. SSH file tools return tool errors with remote stderr instead of raising onProcessError.Rollout error receipts use
format_exception_onlyso provider__notes__(e.g. sandbox env output) survive into run errors.hud traceprints agent/tool payloads as plainTextso Rich does not eat literal brackets in output.Training GRPO pre-checks group completeness by
group_idwhen present, and warns when every group has identical rewards (zero advantage) instead of only checking batch divisibility.Reviewed by Cursor Bugbot for commit 8bf590d. Bugbot is set up for automated code reviews on this repo. Configure here.