Skip to content

πŸ’₯ Simplify sandbox lifecycle and operator contracts - #14

Merged
nbsp1221 merged 10 commits into
mainfrom
fix/launch-readiness
Sep 9, 2026
Merged

πŸ’₯ Simplify sandbox lifecycle and operator contracts#14
nbsp1221 merged 10 commits into
mainfrom
fix/launch-readiness

Conversation

@nbsp1221

@nbsp1221 nbsp1221 commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Simplify chat2sbx to a managed-only workspace model, externalize Secure MCP Tunnel ownership, and expose direct sandbox port-mapping controls.
  • Normalize controller restart and workspace archival semantics, and add minimal local sandbox list / sandbox destroy operator commands that reuse the loopback MCP gateway.
  • Correct shutdown, upgrade reconciliation, and IPv6 loopback behavior discovered during review and trusted-host QA.
  • Sync onboarding, architecture, security, and tests with the resulting public contract.

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 Sandboxes sbx v0.39.0 and the chat2sbx-codexpro:0.30.0 template. This exercised a real microVM, CodexPro routing, full shell, private Docker, port exposure, retention and reuse, and clean SIGTERM/SIGINT shutdown with a live sandbox.
  • Package smoke β€” clean install, pack, global install, CLI help/version/status, and the missing-sbx setup error path passed.
  • Review regressions β€” legacy host-backed runtimes are retired during startup reconciliation without touching host files, and local CLI/status calls connect correctly over IPv6 loopback.

Notes

  • This intentionally removes the public host clone/direct workspace modes and chat2sbx-owned tunnel configuration.
  • Legacy workspace capability and approval schema data remains preserved but inert. Startup reconciliation can still retire its recorded runtimes safely.
  • CodexPro starts as a background process inside its microVM because sbx exec -d v0.39.0 does not return for long-running commands. Its stdout/stderr is stored at /tmp/chat2sbx-codexpro.log inside the disposable microVM.
  • The public archived state maps compatibly to the existing stored legacy value.
  • No release version bump is included; release versioning can be decided separately before publication.

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

leverframe Bot commented Sep 9, 2026

Copy link
Copy Markdown

Leverframe review

🟒 Incremental review completed in 346s

  • 0 new findings
  • 2 existing findings were verified fixed
  • 1 of 1 changed files reviewed
  • Verification: 4 passed, 1 failed, 1 not run; no new defect was attributed to this push

Changes c3deae2..3394a88 Β· Commit 3394a88 Β· View check run

@leverframe leverframe Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 sbx executable and template are unavailable.

Comment thread src/state/database.ts
Comment thread src/cli/local-mcp.ts Outdated
@nbsp1221
nbsp1221 merged commit 2cc958a into main Sep 9, 2026
2 checks passed
@nbsp1221
nbsp1221 deleted the fix/launch-readiness branch September 9, 2026 17:50
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