Repository navigation
feat: extend uf sandbox with create/destroy lifecycle and CDE backend (Spec 029) - #97
Merged
Merged
Conversation
… (Spec 029) - Add Backend interface (Strategy pattern per SOLID Open/Closed) with PodmanBackend and CheBackend implementations - PodmanBackend: named volumes (uf-sandbox-<project>) for persistent state, per-project container names, partial failure cleanup - CheBackend: chectl CLI primary path with REST API fallback, devfile-based workspace provisioning - Add Create() and Destroy() dispatch functions for persistent workspace lifecycle - Add WorkspaceStatus, SandboxConfig with YAML parsing, LoadConfig with env var overrides, bidirectional git sync helpers - Add create subcommand (--backend, --demo-ports, --name flags) and destroy subcommand (--yes, --force with confirmation prompt) - Update start with --backend flag, stop/status for persistent mode - Add 52 new test functions (91 total) covering backend resolution, PodmanBackend lifecycle, CheBackend chectl/REST paths, workspace helpers, config parsing, backward compatibility, git sync - All existing Spec 028 tests pass (backward compatible) - Add spec artifacts (spec, plan, tasks, research, data-model, quickstart, contracts, checklists)
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.
Summary
Extends
uf sandbox(Spec 028) with persistent workspace lifecycle (create/destroy) and CDE backend (Eclipse Che / Dev Spaces). Enables the iterative demo loop without extraction.Closes #95
Backend Interface (Strategy Pattern)
Backendinterface with 7 methods (Name,Create,Start,Stop,Destroy,Status,Endpoints) and two implementations:uf-sandbox-<project>) for persistent state, per-project container names, partial failure cleanupchectlCLI primary path with REST API fallback, devfile-based workspace provisioningResolveBackend()implements resolution matrix: flag > env > config > auto-detect (CDE preferred when available).Persistent Lifecycle
createstartstopdestroyNew Files
internal/sandbox/backend.go— Backend interface, ResolveBackend(), constantsinternal/sandbox/podman.go— PodmanBackend (named volumes, persistent lifecycle)internal/sandbox/che.go— CheBackend (chectl + REST API)internal/sandbox/workspace.go— WorkspaceStatus, SandboxConfig, LoadConfig, git sync, demo endpointsBackward Compatibility
All 39 existing Spec 028 tests pass unchanged.
isPersistentWorkspace()auto-detects mode — ephemeral path preserved for engineers who don't usecreate.Tests
52 new test functions (91 total), covering backend resolution, PodmanBackend lifecycle, CheBackend chectl/REST paths, workspace helpers, config parsing, backward compatibility, git sync.