fix(daytona): avoid leaking internal hydrate temp path in type error#3615
Open
mshsheikh wants to merge 1 commit into
Open
fix(daytona): avoid leaking internal hydrate temp path in type error#3615mshsheikh wants to merge 1 commit into
mshsheikh wants to merge 1 commit into
Conversation
**fix(daytona): report workspace root in hydrate_workspace type errors**
## Summary
`hydrate_workspace()` currently raises `WorkspaceWriteTypeError` with the internal temporary tar path (`/tmp/sandbox-hydrate-...`) when the input payload is not bytes-like.
That path is an implementation detail and not the user-facing target of the operation. This change reports the workspace root instead, which matches the actual hydration target and keeps error reporting aligned with the rest of the Daytona sandbox code.
## Why this change
- Avoid exposing backend temp-file details in user-facing errors.
- Make the error path correspond to the workspace being hydrated, not the internal staging archive.
- Keep the failure mode consistent with other workspace archive errors in this module, which already report the workspace root on hydration failures.
## Scope
This is intentionally narrow:
- no functional behavior changes
- no change to tar extraction logic
- no change to upload or cleanup flow
- only the `WorkspaceWriteTypeError` path is adjusted
## Validation
- Confirmed the error now references the workspace root instead of `/tmp/sandbox-hydrate-...`
- Kept the change isolated to the type-check branch so the runtime behavior remains unchanged elsewhere. :contentReference[oaicite:1]{index=1}
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.
fix(daytona): report workspace root in hydrate_workspace type errors
Summary
hydrate_workspace()currently raisesWorkspaceWriteTypeErrorwith the internal temporary tar path (/tmp/sandbox-hydrate-...) when the input payload is not bytes-like.That path is an implementation detail and not the user-facing target of the operation. This change reports the workspace root instead, which matches the actual hydration target and keeps error reporting aligned with the rest of the Daytona sandbox code.
Why this change
Scope
This is intentionally narrow:
WorkspaceWriteTypeErrorpath is adjustedValidation
/tmp/sandbox-hydrate-...