Skip to content

docs(sdk): onResume needs a control plane that knows the option - #1859

Open
bchalios wants to merge 1 commit into
mainfrom
docs/on-resume-control-plane-caveat
Open

docs(sdk): onResume needs a control plane that knows the option#1859
bchalios wants to merge 1 commit into
mainfrom
docs/on-resume-control-plane-caveat

Conversation

@bchalios

@bchalios bchalios commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Gap: the onResume / on_resume docstrings say the API rejects memory: false wherever the flag is off. On a control plane that predates the field (self-hosted or a lagging BYOC cluster) the resume body is bound without DisallowUnknownFields, 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 the egressProxy option already uses: needs E2B Cloud or an e2b-dev/infra build at or after the commit that added the memory field (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.

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>
@cla-bot cla-bot Bot added the cla-signed label Sep 9, 2026
@cursor

cursor Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

PR Summary

Low Risk
Docstring and changeset edits only; no API or client logic changes.

Overview
Adds a deployment caveat to onResume / on_resume docs in the JS SandboxConnectOpts JSDoc and in six Python connect :param on_resume: docstrings (async and sync overloads). The new text states that E2B Cloud or e2b-dev/infra from 2026-08-20 onward is required; older self-hosted or BYOC control planes strip the connect memory field and memory-restore while still returning success, so 'reboot' may not take effect. A patch changeset records the doc update for e2b and @e2b/python-sdk. No runtime behavior changes.

Reviewed by Cursor Bugbot for commit caf36c7. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot

changeset-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: caf36c7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
e2b Patch
@e2b/python-sdk Patch

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

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Package Artifacts

Built from 04b4f3a. Download artifacts from this workflow run.

JS SDK (e2b@2.49.1-docs-on-resume-control-plane-caveat.0):

npm install ./e2b-2.49.1-docs-on-resume-control-plane-caveat.0.tgz

CLI (@e2b/cli@2.19.1-docs-on-resume-control-plane-caveat.0):

npm install ./e2b-cli-2.19.1-docs-on-resume-control-plane-caveat.0.tgz

Code Interpreter JS SDK (@e2b/code-interpreter@2.8.1-docs-on-resume-control-plane-caveat.0):

npm install ./e2b-code-interpreter-2.8.1-docs-on-resume-control-plane-caveat.0.tgz

Desktop JS SDK (@e2b/desktop@2.4.1-docs-on-resume-control-plane-caveat.0):

npm install ./e2b-desktop-2.4.1-docs-on-resume-control-plane-caveat.0.tgz

Python SDK (e2b==2.49.0+docs.on.resume.control.plane.caveat):

pip install ./e2b-2.49.0+docs.on.resume.control.plane.caveat-py3-none-any.whl

Code Interpreter Python SDK (e2b-code-interpreter==2.10.0+docs.on.resume.control.plane.caveat):

pip install ./e2b_code_interpreter-2.10.0+docs.on.resume.control.plane.caveat-py3-none-any.whl

Desktop Python SDK (e2b-desktop==2.5.0+docs.on.resume.control.plane.caveat):

pip install ./e2b_desktop-2.5.0+docs.on.resume.control.plane.caveat-py3-none-any.whl

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@claude claude 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.

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.

@bchalios
bchalios enabled auto-merge (squash) September 9, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant