Add Ruby sandbox command with backends, spinner, and tests#1
Open
narkaTee wants to merge 1 commit intoruby-sandboxfrom
Open
Add Ruby sandbox command with backends, spinner, and tests#1narkaTee wants to merge 1 commit intoruby-sandboxfrom
narkaTee wants to merge 1 commit intoruby-sandboxfrom
Conversation
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.
Motivation
sandboxCLI to enable a modular, testable orchestration layer that mirrors the current Bash behavior.Description
ruby/bin/sandboxand a library underruby/lib/sandbox/implementingApp,CLI,CommandRunner,Spinner,SshAlias,AiBootstrapper,ProxyCli,BackendInterface,ConnectionInfo,Name,Paths, and a Bash-backed backend adapter (backends/bash_backend.rb).ruby/lib/sandbox/backends/that delegate to the existing Bash backend scripts and exposebackend_start,backend_stop,backend_enter,backend_is_running,backend_get_ssh_port, andbackend_get_ipmethods, and added proxy wrapper behavior and a.with_proxyflow.Spinnerwith TTY vs non-TTY behavior, PTY-friendly rendering model, and thread-safe task updates for long-running phases, and implementedCommandRunnerthat supports Open3 and PTY execution and a safeexecwrapper.Rakefileby adding:sandboxinstall task and a:test_sandboxRSpec task and added specs for naming, backend selection, spinner behavior and backend interface underruby/lib/sandbox/spec/.Testing
Sandbox::Name, backend selection inSandbox::App,Sandbox::SpinnerandSandbox::BackendInterfaceunderruby/lib/sandbox/spec/and wired them to therake test_sandboxtask.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.rake sandboxis wired intoRakefileso the Rubysandboxbinary is installed viainstall -m 755 ruby/bin/sandbox "$HOME/bin/sandbox"when run.Codex Task