Skip to content

Conversation

@narkaTee
Copy link
Owner

@narkaTee narkaTee commented Feb 7, 2026

Motivation

  • Provide a Ruby implementation of the existing sandbox CLI to enable a modular, testable orchestration layer that mirrors the current Bash behavior.
  • Encapsulate backend semantics (container, kvm, hcloud, proxy) behind a strict interface to simplify detection, selection and IDE/SSH integrations.
  • Improve long-running operation UX with a reusable TTY spinner and add automated specs to verify core selection and naming logic.

Description

  • Added a new CLI entrypoint ruby/bin/sandbox and a library under ruby/lib/sandbox/ implementing App, CLI, CommandRunner, Spinner, SshAlias, AiBootstrapper, ProxyCli, BackendInterface, ConnectionInfo, Name, Paths, and a Bash-backed backend adapter (backends/bash_backend.rb).
  • Implemented concrete backend wrappers for container, kvm and hcloud in ruby/lib/sandbox/backends/ that delegate to the existing Bash backend scripts and expose backend_start, backend_stop, backend_enter, backend_is_running, backend_get_ssh_port, and backend_get_ip methods, and added proxy wrapper behavior and a .with_proxy flow.
  • Implemented Spinner with TTY vs non-TTY behavior, PTY-friendly rendering model, and thread-safe task updates for long-running phases, and implemented CommandRunner that supports Open3 and PTY execution and a safe exec wrapper.
  • Integrated installation and test tasks into Rakefile by adding :sandbox install task and a :test_sandbox RSpec task and added specs for naming, backend selection, spinner behavior and backend interface under ruby/lib/sandbox/spec/.

Testing

  • Added RSpec tests for Sandbox::Name, backend selection in Sandbox::App, Sandbox::Spinner and Sandbox::BackendInterface under ruby/lib/sandbox/spec/ and wired them to the rake test_sandbox task.
  • Ran rake test_sandbox, which printed a warning and skipped the sandbox specs because RSpec is not installed in the environment (tests therefore did not execute); the test task is functional when RSpec is available.
  • Verified that installation task rake sandbox is wired into Rakefile so the Ruby sandbox binary is installed via install -m 755 ruby/bin/sandbox "$HOME/bin/sandbox" when run.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant