Skip to content

fix: prevent Daytona rollout failures (HUD-2206)#506

Merged
jdchawla29 merged 2 commits into
mainfrom
jaideep/hud-2206-daytona-fixes
Jul 24, 2026
Merged

fix: prevent Daytona rollout failures (HUD-2206)#506
jdchawla29 merged 2 commits into
mainfrom
jaideep/hud-2206-daytona-fixes

Conversation

@jdchawla29

@jdchawla29 jdchawla29 commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Launch Daytona environment servers with uv run hud serve so scaffold images resolve the SDK from /app/.venv in fresh process sessions.
  • Disable Daytona's inherited auto-stop interval for both image-backed and snapshot-backed ephemeral rollout sandboxes.
  • Cover the injected serve command and both sandbox creation parameter shapes in provider tests.

Root cause

Daytona process sessions start a fresh shell rather than running the image CMD, so /app/.venv/bin is not added to PATH. The previous injected hud serve command therefore failed for images produced by hud init, whose Dockerfile installs the SDK with uv sync and launches it through uv run.

Ephemeral sandboxes also inherited the organization default 15-minute auto-stop interval. Running processes do not count as activity, and stopping an ephemeral sandbox deletes it, so long rollouts could disappear mid-run. The provider already owns sandbox cleanup through its finally deletion path, so rollout sandboxes now set auto_stop_interval=0.

Impact

Daytona rollouts built from standard HUD scaffold images start reliably and remain available until the rollout completes or fails, after which the provider deletes the sandbox.

Validation

  • uv run --no-sync pytest hud/eval/tests/test_docker_provider.py -q — 17 passed
  • uv run --no-sync ruff check hud/eval/runtime.py hud/eval/tests/test_docker_provider.py
  • uv run --no-sync ruff format --check hud/eval/runtime.py hud/eval/tests/test_docker_provider.py
  • git diff --check

Note

Medium Risk
Changes Daytona sandbox lifecycle and startup commands for all Daytona rollouts; scoped to the Daytona provider with test coverage.

Overview
Fixes Daytona rollout sandboxes failing to start or vanishing mid-run.

The default injected serve command now prepends PATH="$PWD/.venv/bin:$PATH" before hud serve, so scaffold images that install the SDK with uv sync can find hud in fresh Daytona process sessions (where /app/.venv/bin is not on PATH).

Image-backed and snapshot-backed ephemeral sandboxes now pass auto_stop_interval=0, so org default idle auto-stop does not tear down rollout boxes while the env server runs; cleanup stays on the provider’s delete path.

Provider tests assert the updated execute command, auto_stop_interval=0 on both create param shapes, and add coverage for snapshot sandboxes.

Reviewed by Cursor Bugbot for commit 4e8841d. Bugbot is set up for automated code reviews on this repo. Configure here.

@jdchawla29
jdchawla29 marked this pull request as ready for review July 23, 2026 10:25

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5e8ad2ea2a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread hud/eval/runtime.py Outdated
@jdchawla29
jdchawla29 merged commit 3189a4b into main Jul 24, 2026
8 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.

1 participant