docs(sdk): onResume needs a control plane that knows the option - #1859
docs(sdk): onResume needs a control plane that knows the option#1859bchalios wants to merge 1 commit into
Conversation
The docstrings promised the API rejects memory:false wherever the flag is off. On a control plane that predates the field — a self-hosted or lagging BYOC deployment — the JSON decoder drops the unknown field and the sandbox resumes memory-restored with a normal 2xx, the exact silent downgrade the option exists to avoid. State the requirement and the failure shape in the JSDoc and all six Python docstrings, in the deployment-caveat shape the egressProxy option already uses. Signed-off-by: Babis Chalios <babis.chalios@e2b.dev>
PR SummaryLow Risk Overview Reviewed by Cursor Bugbot for commit caf36c7. Bugbot is set up for automated code reviews on this repo. Configure here. |
🦋 Changeset detectedLatest commit: caf36c7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Package ArtifactsBuilt from 04b4f3a. Download artifacts from this workflow run. JS SDK ( npm install ./e2b-2.49.1-docs-on-resume-control-plane-caveat.0.tgzCLI ( npm install ./e2b-cli-2.19.1-docs-on-resume-control-plane-caveat.0.tgzCode Interpreter JS SDK ( npm install ./e2b-code-interpreter-2.8.1-docs-on-resume-control-plane-caveat.0.tgzDesktop JS SDK ( npm install ./e2b-desktop-2.4.1-docs-on-resume-control-plane-caveat.0.tgzPython SDK ( pip install ./e2b-2.49.0+docs.on.resume.control.plane.caveat-py3-none-any.whlCode Interpreter Python SDK ( pip install ./e2b_code_interpreter-2.10.0+docs.on.resume.control.plane.caveat-py3-none-any.whlDesktop Python SDK ( pip install ./e2b_desktop-2.5.0+docs.on.resume.control.plane.caveat-py3-none-any.whl |
There was a problem hiding this comment.
TASTE.md review: checked T-1/T-2 (JS ↔ sync ↔ async parity — the caveat is added identically to SandboxConnectOpts.onResume and all three connect overloads in both Python mirrors), T-12 (acronyms all-caps in prose: BYOC, E2B), T-62/T-69 (failure mode documented), T-70/T-71 (JSDoc / reST style preserved), plus the changeset requirement. 0 violations — the PR complies.
There was a problem hiding this comment.
LGTM, straightforward documentation-only change.
What was reviewed: the new caveat paragraph added to the JS onResume JSDoc and to the matching Python on_resume docstrings in both sandbox_async/main.py and sandbox_sync/main.py (connect/create/resume) — text is applied identically and consistently across all three surfaces, matching the CLAUDE.md cross-language parity convention. Confirmed no code paths, types, or control flow are touched (diff is entirely comment/docstring/changeset additions). Changeset correctly declares patch bumps for e2b and @ e2b/python-sdk.
Extended reasoning...
Overview
The diff adds a single explanatory paragraph to the onResume/on_resume connect option documentation in packages/js-sdk/src/sandbox/sandboxApi.ts (JSDoc) and the three corresponding docstrings in each of packages/python-sdk/e2b/sandbox_async/main.py and packages/python-sdk/e2b/sandbox_sync/main.py, plus a new changeset file. No function signatures, types, control flow, or exported behavior change — every hunk is either inside a /** ... */ comment, a Python docstring, or the changeset markdown file.
Security risks
None. No code executes differently; the change only clarifies existing documented behavior (a known limitation where older control planes silently drop an unknown field rather than reject the request). No new attack surface, no credentials, no injection points.
Level of scrutiny
Low. This is a textbook mechanical/documentation change: comment-only edits applied uniformly across JS and both Python sync/async implementations, consistent with the project's parity convention, plus a correctly-scoped patch changeset. There is no ambiguity in intent and no behavioral risk to weigh.
Other factors
The changeset appropriately uses patch for a docs-only change to the published package surface, which is reasonable since docstrings ship with the published packages. No CODEOWNERS concerns apply to comment-only diffs of this kind, and no bugs were reported by the automated hunt.
Gap: the
onResume/on_resumedocstrings say the API rejectsmemory: falsewherever the flag is off. On a control plane that predates the field (self-hosted or a lagging BYOC cluster) the resume body is bound withoutDisallowUnknownFields, so the field is dropped and the sandbox resumes memory-restored with a 2xx — the silent downgrade the option exists to avoid. Not client-detectable (no capability handshake), and the SDK is already on npm/PyPI.Change: one deployment-caveat paragraph in the JSDoc and in all six Python
:param on_resume:docstrings, in the shape theegressProxyoption already uses: needs E2B Cloud or ane2b-dev/infrabuild at or after the commit that added thememoryfield (2026-08-20); an older control plane drops the field and restores memory while reporting success. Patch changeset for both packages so the published docstrings pick it up.Verification: prettier and ruff format clean; docstring-only, no code paths touched.