Skip to content

test: drop Code Interpreter server-behavior tests now covered in e2b-dev/code-interpreter - #1956

Merged
mishushakov merged 2 commits into
mainfrom
devin/1791375995-trim-ci-sdk-tests
Oct 7, 2026
Merged

mishushakov merged 2 commits into
mainfrom
devin/1791375995-trim-ci-sdk-tests

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Follow-up to e2b-dev/code-interpreter#345, which ports the Code Interpreter behavior suite into the template repo as a direct-HTTP (httpx) suite. The SDK suites in packages/code-interpreter-python and packages/code-interpreter-js now only test SDK surface; everything that asserted on server/template behavior is removed here (~-2900 LOC, no src/ changes).

Removed (py sync + async, js): charts/* live chart-shape tests (the Python charts/test_json.py to_json test stays), test_default_kernels/defaultKernels (js/ts/r/java/bash hello-worlds), test_cwd, test_bash, env_vars/* (per-language × sandbox-level/per-execution/overwrite), test_statefulness, test_execution_count, test_display_data, test_data, test_custom_repr_object, images/*, test_systemd, and test_kernels (its one SDK check, test_pass_context_and_language → InvalidArgumentException / InvalidArgumentError, moved into test_contexts / contexts.test.ts).

With the java/r kernel tests gone, the _wait_for_kernel* / waitForKernel readiness-retry helpers and their unit tests (test_java_kernel_readiness.py, javaKernelReadiness.test.ts) have no callers and are removed from conftest.py / setup.ts too.

Replaced with SDK-focused coverage (from review):

  • tests/{sync,async}/test_env_vars.py, tests/envVars.test.ts — one per-execution envs → env_vars pass-through test per implementation (the HTTP suite can't see the SDK's request mapping).
  • tests/charts/test_deserialize.py — fixture-based unit tests for _deserialize_chart / Result(chart=…) / to_json covering line, scatter, bar, pie, box-and-whisker, nested superchart, unknown type and unknown scale. No JS counterpart: Result in JS stores the raw chart payload, there is no deserialization step to test.

Kept: basic (incl. secure-traffic), callbacks, contexts, interrupt, killed, reconnect, streaming, messaging/utils/sandbox-url/timeout/exception-format unit tests, performance.py.

CI: code_interpreter_{python,js}_tests.yml run_recovery_tests=false paths no longer ignore the deleted systemd files (interrupt is the only remaining recovery suite).

Verified locally against code-interpreter-v1: Python 62 → now 77 incl. the new unit tests, JS 38 passed.

Linear: SDK-386

Link to Devin session: https://app.devin.ai/sessions/6fd302f062cc459796016eba4e06d9e1
Open in Devin Desktop: https://app.devin.ai/desktop/session/6fd302f062cc459796016eba4e06d9e1?variant=devin
Requested by: @mishushakov

…dev/code-interpreter

Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@cla-bot cla-bot Bot added the cla-signed label Oct 7, 2026
@changeset-bot

changeset-bot Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 7e178ad

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mishushakov
mishushakov marked this pull request as ready for review October 7, 2026 12:30
@mishushakov
mishushakov self-requested a review as a code owner October 7, 2026 12:30
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T12:34:47.821601Z 58e6b4c Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

TASTE.md review (e2b-dev/sdk-harness). This PR only touches tests and CI, so I checked the rules a test change can affect: T-1/T-1a/T-2 (JS / sync-Python / async-Python parity of the tests that remain or move), T-59 (InvalidArgumentError/InvalidArgumentException for pre-operation validation), and T-58/T-60 (specific error classes in assertions). Most of the diff deletes server-behavior tests and removes the matching systemd excludes from the workflows. No TASTE rule covers that.

Violations: 1

  • packages/code-interpreter-js/tests/contexts.test.ts: the relocated pass context and language test calls runCode with the wrong argument shape and accepts any rejection. It never reaches the client-side InvalidArgumentError guard, unlike its Python mirrors in this PR (T-59, T-1). Details are in the inline comment.

The Python test_pass_context_and_language additions (sync + async) and the conftest.py / setup.ts helper removals comply.

Written by Devin

Comment thread packages/code-interpreter-js/tests/contexts.test.ts
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Package Artifacts

Built from d9cca20. Download artifacts from this workflow run.

JS SDK (e2b@2.53.2-devin-1791375995-trim-ci-sdk-tests.0, with @e2b/dockerfile-utils@0.0.1-devin-1791375995-trim-ci-sdk-tests.0):

npm install ./e2b-dockerfile-utils-0.0.1-devin-1791375995-trim-ci-sdk-tests.0.tgz ./e2b-2.53.2-devin-1791375995-trim-ci-sdk-tests.0.tgz

CLI (@e2b/cli@2.21.2-devin-1791375995-trim-ci-sdk-tests.0):

npm install ./e2b-cli-2.21.2-devin-1791375995-trim-ci-sdk-tests.0.tgz

Code Interpreter JS SDK (@e2b/code-interpreter@2.8.3-devin-1791375995-trim-ci-sdk-tests.0):

npm install ./e2b-code-interpreter-2.8.3-devin-1791375995-trim-ci-sdk-tests.0.tgz

Desktop JS SDK (@e2b/desktop@2.4.1-devin-1791375995-trim-ci-sdk-tests.0):

npm install ./e2b-desktop-2.4.1-devin-1791375995-trim-ci-sdk-tests.0.tgz

Python SDK (e2b==2.53.1+devin.1791375995.trim.ci.sdk.tests, with e2b-dockerfile-utils==0.0.0+devin.1791375995.trim.ci.sdk.tests):

pip install ./e2b_dockerfile_utils-0.0.0+devin.1791375995.trim.ci.sdk.tests-py3-none-any.whl ./e2b-2.53.1+devin.1791375995.trim.ci.sdk.tests-py3-none-any.whl

Code Interpreter Python SDK (e2b-code-interpreter==2.10.3+devin.1791375995.trim.ci.sdk.tests):

pip install ./e2b_code_interpreter-2.10.3+devin.1791375995.trim.ci.sdk.tests-py3-none-any.whl

Desktop Python SDK (e2b-desktop==2.6.1+devin.1791375995.trim.ci.sdk.tests):

pip install ./e2b_desktop-2.6.1+devin.1791375995.trim.ci.sdk.tests-py3-none-any.whl

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🔍 Devin Review: 2 flags

Not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

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

I reviewed this PR and didn't find any bugs. Because it deletes a very large amount of test coverage (~3000 lines, 66 files) across both SDKs based on a claim that the coverage moved to another repository, a human look would still be worthwhile to confirm that migration actually happened before this coverage is lost here.

What was reviewed: confirmed no src/ changes accompany the test deletions; verified the CI workflow edits (code_interpreter_js_tests.yml, code_interpreter_python_tests.yml) correctly stop excluding the now-removed systemd test files; checked that the removed wait_for_kernel/waitForKernel readiness helpers in conftest.py/setup.ts have no remaining callers after the java/r kernel tests were deleted; verified the new contexts tests (JS and both Python sync/async) correctly preserve the one SDK-surface assertion that was in the deleted test_kernels files.

Extended reasoning...

Pure test-suite deletion (66 files removed, 2 small files added) plus matching CI workflow cleanup across packages/code-interpreter-python and packages/code-interpreter-js; no src/ or production code is touched, so there is no injection/auth/data-exposure surface here. The mechanics are internally consistent (no dangling helper references, CI exclusions updated to match deletions, the one real SDK assertion preserved in new contexts tests), which supports the PR's own description. The decisive factor for defer rather than approve is scale and policy risk: deleting ~3000 lines of behavior-test coverage based on an external claim that it was ported to a sibling repository is a large judgment call the repo's CLAUDE.md conventions flag as worth scrutinizing, and that verification (does e2b-dev/code-interpreter#345 actually cover this) is outside what this diff alone can confirm.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 58e6b4c7d6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/code-interpreter-js/tests/env_vars/python.test.ts
Comment thread packages/code-interpreter-python/tests/charts/test_superchart.py
…rough and chart deserialization coverage

Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
@mishushakov

Copy link
Copy Markdown
Member

can you check Devin's two flags review?

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

Both flags were against the first commit (58e6b4c) and are already fixed in 7e178ad:

  1. Chart model conversion loses SDK coverage → added tests/charts/test_deserialize.py: fixture-based unit tests for _deserialize_chart / Result(chart=…) / to_json covering line, scatter, bar, pie, box-and-whisker, nested superchart, unknown type and unknown scale (no sandbox needed).
  2. Context rejection test can pass for the wrong reason → contexts.test.ts now passes a code string plus { context, language } and asserts rejects.toThrowError(InvalidArgumentError), so it hits the SDK guard rather than a generic server error.

The re-review on 7e178ad reports 0 flags.

@mishushakov
mishushakov merged commit 3221e8e into main Oct 7, 2026
35 checks passed
@mishushakov
mishushakov deleted the devin/1791375995-trim-ci-sdk-tests branch October 7, 2026 13:38
@linear-code

linear-code Bot commented Oct 8, 2026

Copy link
Copy Markdown

SDK-386

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