feat: Go launcher + docs consolidation#11
Merged
Merged
Conversation
Replace the bash+Python launcher (entrypoint.sh) with a single-file Go program. Eliminates python3, pip, and tomli dependencies. Produces a 3.2MB static binary that runs from a scratch-based Docker image alongside the openshell CLI — ~50MB total vs ~200MB with UBI9. Same observable behavior: gateway mTLS config, TOML profile parsing, provider detection, file staging, sandbox creation with retry, upload, and startup. 7 unit tests covering config parsing and file staging. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
sandbox/launcher/entrypoint.sh(bash+Python) as a single-file Go program (main.go). Eliminates python3/pip/tomli dependencies. Produces a 3.2MB static binary running from a scratch Docker image (~50MB vs ~200MB with UBI9). Same observable behavior, 7 unit tests.SPEC.md(implementation-independent harness spec), rewrites README, extracts TOML parsing tolib/parse-profile.py, removes dead code.Changes
Launcher (Go rewrite)
sandbox/launcher/main.go— gateway mTLS config, TOML parsing, provider detection, file staging, sandbox creation with retry, upload, startupsandbox/launcher/main_test.go— 7 unit tests (config parsing with defaults, missing/invalid files, env staging, GWS credential copying)sandbox/launcher/go.mod— single dependency:github.com/BurntSushi/tomlsandbox/launcher/Dockerfile— scratch-based (was UBI9 with bash+python3+pip+openssh)Makefile— newcli-launchertarget for cross-compilationDocs
SPEC.md— implementation-independent specification of the harnessREADME.md— rewritten for claritylib/parse-profile.py— extracted from inline Python in profile.shTest plan
go test ./...passes (7/7 tests)GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go buildproduces static ELF binarymake launcherbuilds scratch-based Docker imagemake test-ocppasses with Go launcher (same behavior as bash)🤖 Generated with Claude Code