chore: mark task as in progress after sandbox has been created #314
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.
Improves error handling in the sandbox creation flow by ensuring that if the Docker container creation fails, the task is properly reset to NEW status and the error is propagated to the caller.
Previously, when sandbox creation failed, the error was caught but not re-thrown, causing the task command to continue execution and mark the task as in progress despite the failure. This resulted in an inconsistent state where the task appeared to be running but had no container.
Changes
Sandbox.createAndStart()to re-throw errors after failing the process manager item inpackages/cli/src/lib/sandbox/types.ts:49-54createSandboxin restart command tests to prevent actual Docker/Podman callsNotes
This change ensures proper error propagation through the sandbox creation flow, allowing the task command to properly handle failures and reset task state when container creation fails.
Closes: #313