Skip to content
Open
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
07a42aa
feat(components/execd): modify bash runtime by pty
Pangjiping Jan 16, 2026
d9c20ab
feat(components/execd): use concurrent-safe maps to avoid single poin…
Pangjiping Jan 17, 2026
31db4ac
feat(tests): add python integration test for bash execution
Pangjiping Jan 18, 2026
bb70a0d
feat(tests): add js integration test for bash execution
Pangjiping Jan 18, 2026
1e2ed97
fix(components/execd): reject commands after exit and surface clear s…
Pangjiping Jan 18, 2026
2e9add9
fix(components/execd): preserve bash exit status without killing session
Pangjiping Jan 18, 2026
4b20500
feat(sandboxes/code-interpreter): remove bash jupyter kernel installa…
Pangjiping Jan 18, 2026
d8909da
fix(sandboxes/code-interpreter): fix stderr discard error
Pangjiping Jan 19, 2026
d28a674
fix(sandboxes/code-interpreter): fix windows bash session start state…
Pangjiping Jan 19, 2026
2c9af4c
fix(tests): remove bash context management test
Pangjiping Jan 19, 2026
4d5372a
fix(components/execd): keep bash session newlines to support heredoc …
Pangjiping Jan 29, 2026
ebb9b4b
fix(components/execd): fix exec issue
Pangjiping Jan 30, 2026
1e7f2fa
feat(components/execd): override session's cwd if request.cwd is not …
Pangjiping Feb 5, 2026
575ca47
fix(components/execd): avoid env dump leak when command lacks trailin…
Pangjiping Feb 5, 2026
3532fc9
chore(execd): emit bash session exit errors
Pangjiping Feb 25, 2026
7d28368
fix(execd): run bash session from temp script file to avoid argument …
Pangjiping Feb 26, 2026
beff38c
Merge remote-tracking branch 'origin/main' into feat/run_in_session
Pangjiping Mar 15, 2026
dc145d1
feat(execd): support new API for create_session and run_in_session
Pangjiping Mar 15, 2026
caf11cb
fix(execd): propagate caller cancellation into bash session execution
Pangjiping Mar 16, 2026
55f12e4
fix(execd): apply requested cwd during bash session creation
Pangjiping Mar 16, 2026
f1ad75c
fix(execd): accept empty request bodies for session creation
Pangjiping Mar 16, 2026
83d3633
fix(execd): terminate running bash process when closing a session
Pangjiping Mar 16, 2026
381bcf8
Merge remote-tracking branch 'pangjiping/feat/run_in_session' into fe…
danieliser Mar 16, 2026
8c4c6f0
ci: add GitHub Actions pipeline and FORK.md
danieliser Mar 16, 2026
c431dbb
fix: A3 sentinel markers, A4 cmd.Dir, A5 empty body guard
danieliser Mar 16, 2026
5a6b006
fix: A1 TOCTOU race in trackCurrentProcess, A2 stderr pipe separation
danieliser Mar 16, 2026
809d421
feat: output replay buffer for WebSocket reconnect (Phase 0.5)
danieliser Mar 16, 2026
2592a7e
feat: WebSocket stdin endpoint GET /ws/session/:sessionId (Phase 1)
danieliser Mar 16, 2026
9efbdf0
feat: PTY opt-in via ?pty=1 on session creation (Phase 2)
danieliser Mar 16, 2026
51128dc
fix: address Codex review P1/P2 issues in WS session handler
danieliser Mar 16, 2026
3561735
fix: address second round of Codex review P1/P2 issues
danieliser Mar 16, 2026
cd3ccaf
fix: revert CloseOutputPipes; fix commandSnapshot data race
danieliser Mar 16, 2026
2f161bc
fix: broadcast goroutine + WaitGroup for safe scanner lifecycle on re…
danieliser Mar 16, 2026
0bb16a7
fix: P0 run() deadlock, P1 WS lock leak on upgrade fail, P1 replay gap
danieliser Mar 16, 2026
c4214b1
fix: os.Pipe for run(), WS lock leak on start fail, replay.Total() mutex
danieliser Mar 16, 2026
de472b6
fix: stream raw bytes in WS pumps instead of line scanning
danieliser Mar 16, 2026
d9c68bb
fix: 404 for missing session in RunInSession + unblock WS read on exit
danieliser Mar 17, 2026
036c508
fix: fd leaks, replay/attach race, SSE 200 before validation, resize …
danieliser Mar 17, 2026
6d32a7b
fix: Windows build conflict on GetBashSession + replay duplicate output
danieliser Mar 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI
on:
push:
branches: [feat/paop-steering, main]
pull_request:
branches: [feat/paop-steering, main]

jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
go: ["1.21", "1.22"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
cache: true
- name: Build
working-directory: components/execd
run: go build ./...
- name: Vet
working-directory: components/execd
run: go vet ./...
- name: Test
working-directory: components/execd
run: go test ./... -race -timeout 60s
57 changes: 57 additions & 0 deletions FORK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# OpenSandbox Fork — PAOP WebSocket Steering Integration

This is `danieliser/OpenSandbox`, a fork of [`alibaba/OpenSandbox`](https://github.com/alibaba/OpenSandbox).

## Purpose

This fork adds WebSocket-based steering support to `execd` so that PAOP (Persistent Agent
Orchestration Platform) can replace its tmux/poll executor with a push-based, in-container
execution model.

Key goals:

- Add `GET /ws/session/:sessionId` WebSocket endpoint to `components/execd` (Phase 1)
- Add PTY opt-in via `?pty=1` query parameter for interactive programs (Phase 2)
- Fix residual bugs from upstream PR #104 (`feat/bash-session`) (Phase 0)

The PAOP-side counterpart lives in the `persistence` repo under `paop/executor/`.

## Working Branch

All active development happens on `feat/paop-steering`.

## Upstream Sync

To pull in upstream changes from `alibaba/OpenSandbox`:

```bash
git fetch upstream
git checkout feat/paop-steering
git merge upstream/main
# Resolve conflicts, then push
git push origin feat/paop-steering
```

If the `upstream` remote is not yet configured:

```bash
git remote add upstream https://github.com/alibaba/OpenSandbox.git
```

## What's PAOP-Only vs. Upstream Candidates

| Phase | Changes | Upstream candidate? |
|-------|---------|---------------------|
| Phase 0 | Bug fixes for PR #104 (TOCTOU race, stderr routing, sentinel collision, context leak, shutdown race) | **Yes** — these are correctness fixes valuable to all users |
| Phase 1 | `GET /ws/session/:sessionId` WebSocket endpoint | **Possibly** — generic enough; needs upstream discussion |
| Phase 2 | PTY opt-in (`?pty=1`) | **Possibly** — generic; needs upstream discussion |
| Phase 3 | PAOP `WSExecutor` integration (lives in `persistence` repo) | **No** — PAOP-specific, stays here / in persistence repo |

Phase 0 bug fixes are the strongest upstream PR candidates. They fix real correctness issues
independent of any PAOP integration and should be submitted back once validated.

## CI

GitHub Actions runs on every push and pull request targeting `feat/paop-steering` or `main`.
Matrix: Go 1.21 and 1.22. Steps: build, vet, race-detector test suite (60s timeout).
See `.github/workflows/ci.yml`.
1 change: 1 addition & 0 deletions components/execd/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ require (
github.com/bytedance/sonic/loader v0.1.1 // indirect
github.com/cloudwego/base64x v0.1.4 // indirect
github.com/cloudwego/iasm v0.2.0 // indirect
github.com/creack/pty v1.1.24 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.10 // indirect
Expand Down
2 changes: 2 additions & 0 deletions components/execd/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJ
github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=
github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s=
github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down
Loading