Skip to content

feat(bench): add gbash and gbash-server benchmark runners#1269

Merged
chaliy merged 1 commit intomainfrom
claude/add-gbash-benchmarks-mDbVi
Apr 13, 2026
Merged

feat(bench): add gbash and gbash-server benchmark runners#1269
chaliy merged 1 commit intomainfrom
claude/add-gbash-benchmarks-mDbVi

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Apr 13, 2026

Summary

  • Add gbash subprocess runner (cold start, new Go process per run)
  • Add gbash-server persistent child runner (JSON-RPC server on Unix socket, warm interpreter)
  • Python wrapper script bridges gbash's JSON-RPC protocol to the PersistentChild stdin/stdout JSON lines protocol

Why

gbash is a Go-based sandboxed bash runtime for AI agents. Adding it to the benchmark suite enables direct performance comparison across all three runtimes (bashkit/Rust, gbash/Go, just-bash/TypeScript) in both subprocess and persistent execution models.

Smoke test results

Runner startup_echo (ms) Execution model
bashkit 0.086 in-process
gbash-server 1.86 persistent child
bash 9.14 subprocess
gbash 17.58 subprocess
  • 96 benchmarks tested across all categories
  • 100% output match on all supported commands
  • Expected errors on awk (6) and jq (5) cases — gbash sandboxes unknown commands (exit 127)

Test plan

  • cargo test --all-features — all 2564+ tests pass (pre-existing ssh_supabase failure unrelated)
  • cargo fmt --check clean
  • cargo clippy -p bashkit-bench clean (pre-existing warnings in bashkit lib only)
  • ruff check and ruff format --check on Python wrapper
  • Smoke tested both runners across startup, variables, arithmetic, control, strings, arrays, pipes, tools, complex, large categories

Add two runners for gbash (Go bash runtime):
- gbash: subprocess runner (cold start, like bash)
- gbash-server: persistent child via JSON-RPC server (warm interpreter)

The server runner bridges gbash's JSON-RPC Unix socket protocol to the
PersistentChild stdin/stdout JSON lines protocol via a Python wrapper.
@chaliy chaliy merged commit b9b1885 into main Apr 13, 2026
11 checks passed
@chaliy chaliy deleted the claude/add-gbash-benchmarks-mDbVi branch April 13, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant