π₯ Simplify sandbox lifecycle and operator contracts - #14
Merged
Conversation
Keep chat2sbx focused on the local MCP and sandbox lifecycle. Run the official tunnel client separately and remove chat2sbx-owned tunnel credentials, process supervision, and health reporting.
Replace the shorthand port input with explicit sandbox_port, host, and host_port fields. Default host binding to loopback and allocate the host port automatically when it is omitted.
Leverframe reviewπ’ Incremental review completed in 346s
Changes |
There was a problem hiding this comment.
Leverframe review
Found two actionable defects. Verification used the repository-declared Node v24.20.0 and pnpm 11.23.0 environment; the full CI-equivalent gate passed. Real Docker Sandboxes verification was unavailable because sbx is not installed.
Findings
2 findings were published inline.
Checks
6 passed Β· 0 failed Β· 1 not run
Show 7 checks
| Status | Check | Evidence |
|---|---|---|
| π’ passed | git diff --check caaa89de314d6a65541ef07951e49aa4785ed9b3...fcb45dfec8bdd1470e458932d88751ab4e757edf |
No whitespace errors. |
| π’ passed | pnpm install --frozen-lockfile |
Installed 464 packages from the locked dependency graph using pnpm 11.23.0. |
| π’ passed | pnpm check |
Formatting, oxlint/eslint, TypeScript, 13 unit/integration test files containing 68 tests, and the Node 24 production bundle all passed. |
| π’ passed | pnpm exec vitest run --project integration test/integration/database-migrations.test.ts -t 'keeps legacy host capability rows inert' |
Confirmed active legacy host-backed sandbox rows are excluded from listActiveSandboxes(). |
| π’ passed | pnpm exec tsc -p tsconfig.json --outDir /tmp/chat2sbx-review-build --noEmit false; node --input-type=module -e '<legacy host reconciliation fixture>' |
Reconciliation reported no runtime removal and left the legacy database row in running state. |
| π’ passed | node --experimental-strip-types --input-type=module -e '<IPv6 loopback server invoking callLocalTool>' |
The IPv6 listener started successfully, but received zero requests because the generated URL was invalid. |
| βͺ not run | pnpm test:e2e |
The documented prerequisite probe found no sbx executable in PATH. |
Limitations
- Real Docker Sandbox microVM, CodexPro routing, private Docker, and port-publication E2E behavior could not be exercised because the required
sbxexecutable and template are unavailable.
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 list/sandbox destroyoperator commands that reuse the loopback MCP gateway.Verification
pnpm checkβ format, lint, typecheck, 72 unit/integration tests across 13 files, and the production build passed locally. GitHub CI also passed for the functional head before the final documentation-only correction.pnpm test:e2eβ 3 tests across 2 files passed on a trusted host with Docker Sandboxessbxv0.39.0 and thechat2sbx-codexpro:0.30.0template. This exercised a real microVM, CodexPro routing, full shell, private Docker, port exposure, retention and reuse, and cleanSIGTERM/SIGINTshutdown with a live sandbox.sbxsetup error path passed.Notes
sbx exec -dv0.39.0 does not return for long-running commands. Its stdout/stderr is stored at/tmp/chat2sbx-codexpro.loginside the disposable microVM.archivedstate maps compatibly to the existing stored legacy value.