Skip to content

feat: add safe Python MCP sandbox lifecycle tools - #33

Merged
anycodes merged 8 commits into
mainfrom
feat/mcp-lifecycle-20261016
Oct 16, 2026
Merged

anycodes merged 8 commits into
mainfrom
feat/mcp-lifecycle-20261016

Conversation

@anycodes

@anycodes anycodes commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Description

Expose ten Python MCP tools by adding bounded list_sandboxes, get_sandbox and set_sandbox_timeout, plus provider/region/CPU/memory creation options. Metadata is allowlisted and failures omit raw credential-bearing exception details. External metadata/TTL calls dispatch directly by ID, never connect/resume or adopt external resources, and temporary infrastructure closes in finally. Late timeout completion cannot restore a closed session's renewal ownership.

Refs #31. This delivers the lifecycle slice, not the full Skills/MCP roadmap. Stacked on #32 and #29.

Fixes #37. Fixes #41. Fixes #42. Fixes #43.

Type of Change

  • New feature
  • Bug fix
  • Documentation and tests

Review corrections

  • Run the full existing CI matrix for feature-branch pull requests; the old main-only filter left stacked work with just Markdown checks. All existing jobs remain intact.
  • Fix the mypy 2.4 optional-value narrowing error exposed by that matrix without suppressing its assertion.
  • Align the Express server E2E fixture with the production server_at credential boundary.
  • Fail empty or incomplete provider acceptance reports; resolve ABX_BIN/PATH without assuming a sibling checkout.
  • Require an explicit authorized CubeAPI live target instead of identifying it by an unrelated TCP listener. Native provider defaults are unchanged.
  • Accept host E1003 and provider E1001 credential refusals, while never borrowing Express keys. Test engines preserve explicit isolated sockets and otherwise include random suffixes.

Testing

  • Complete corrected make e2e: 113 passed, four unavailable native-backend skips, two slow deselections, one documented KI-009 platform expected failure; 232.56s. Actual CLI expected rows, 18 server cases and catalog credential refusals executed.
  • Final nonce/alias-isolation follow-up: 3 real CLI/credential tests passed in 56.17s. Generic E2B aliases and provider-scoped credentials were absent, canonical Express configuration preserved and dotenv refill unavailable.
  • Readonly cleanup: zero tagged candidates; final focused run listed zero sandboxes. No unrelated resources deleted, isolated Node engines stopped.
  • Fifteen offline acceptance regressions pass. Initial ten-test negative control against the old harness: six failed, four passed, exposing missing rows and obsolete CLI discovery.
  • Both packages lint/format/typecheck/hygiene pass; server mypy 56 files, client 83. Health: 106 PASS, one optional warning, zero FAIL.
  • Earlier complete client suite: 1974 passed, 21 skipped, plus separately executed later cases. New latest-head remote matrices provide current full-suite results.
  • Prior corrected head ade77f6: all 9 remote checks passed. Exact harness head 3fd592b passed all nine full checks. Final documentation integration head 5d62225 synchronizes accepted fix: resolve the server SDK from its uv workspace #29/fix: load dataclass command modules through the server CLI #32 without changing product or harness sources, and receives its own complete fresh matrix before merge.
  • Root independently reviewed the harness diff and regressions. Secret hooks and configured-value scan across 22 scoped files pass; no bypass.

Definition of Done

  • Scoped unit/regression and real Express verification with cleanup
  • English/Chinese docs, changelog, proposed decisions and independent evidence
  • Repository health and required local static gates
  • Exact final head 5d62225 passed all nine checks; both dependencies landed and independent review passed

Evidence: .agents/evidence/verify/2026-10-16-e2e-acceptance-integrity.md, 2026-10-16-mcp-ci-typing.md, and 2026-10-16-mcp-lifecycle-no-resume.md.

The earlier failed full runs are preserved as history. Native OpenSandbox/Cube/E2B/container backend acceptance remains unverified; skips are not passes. KI-009 remains the known platform Jupyter trailing-expression limitation. No Docker/new-image, IDE, hosted-service or complete Skills-roadmap delivery is inferred. Both upstream dependencies landed first. The final integration head passed all nine full normal checks and merged without bypass.

Actual remote state: MERGED at 2026-10-16 04:46:50 UTC, merge commit dcfbf14. Focused Issues 37/41/42/43 are closed; roadmap Issue 31 remains open.

@anycodes
anycodes marked this pull request as ready for review October 16, 2026 04:46
@anycodes
anycodes merged commit dcfbf14 into main Oct 16, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant