Skip to content

Ilya/daytona cookbook sdk fixes - #518

Merged
jdchawla29 merged 4 commits into
hud-evals:mainfrom
shfunc:ilya/daytona-cookbook-sdk-fixes
Jul 30, 2026
Merged

Ilya/daytona cookbook sdk fixes#518
jdchawla29 merged 4 commits into
hud-evals:mainfrom
shfunc:ilya/daytona-cookbook-sdk-fixes

Conversation

@shfunc

@shfunc shfunc commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

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 (/tmp vs /private/tmp) are fixed by publishing cwd_aliases from Workspace and stripping them in SSHClient.map_path. SSH file tools return tool errors with remote stderr instead of raising on ProcessError.

Rollout error receipts use format_exception_only so provider __notes__ (e.g. sandbox env output) survive into run errors. hud trace prints agent/tool payloads as plain Text so Rich does not eat literal brackets in output.

Training GRPO pre-checks group completeness by group_id when 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.

Comment thread hud/eval/runtime.py Outdated
Comment thread hud/eval/runtime.py Outdated
@shfunc
shfunc force-pushed the ilya/daytona-cookbook-sdk-fixes branch from a34ee0c to 5395b0d Compare July 28, 2026 16:36

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread hud/eval/runtime.py Outdated
@shfunc
shfunc force-pushed the ilya/daytona-cookbook-sdk-fixes branch from 5395b0d to 56a22c5 Compare July 28, 2026 16:54
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
jdchawla29 self-requested a review July 30, 2026 20:05
@jdchawla29
jdchawla29 merged commit f388bb6 into hud-evals:main Jul 30, 2026
5 checks passed
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.

2 participants