Skip to content

chore(cli): tighten up sandbox exec piping tests#1129

Open
matthewlouisbrockman wants to merge 14 commits intomainfrom
piping-tone-down-the-tests-configs-eng-3497
Open

chore(cli): tighten up sandbox exec piping tests#1129
matthewlouisbrockman wants to merge 14 commits intomainfrom
piping-tone-down-the-tests-configs-eng-3497

Conversation

@matthewlouisbrockman
Copy link
Copy Markdown
Contributor

@matthewlouisbrockman matthewlouisbrockman commented Feb 13, 2026

  • refactors the CLI tests to better follow the js sdk patterns

following up from comments on #1127


Note

Low Risk
Low risk: behavior change is limited to error-handling cleanup when closeStdin fails, and the rest is test-only refactoring via shared helpers.

Overview
Tightens sandbox exec stdin EOF failure handling by inlining a best-effort remote kill when closeStdin errors (to avoid leaving a process blocked on stdin).

Refactors CLI integration tests to use shared helpers in tests/setup.ts (runCli, runCliWithPipedStdin, bufferToText, parseEnvInt, isDebug), centralizing env setup/timeout behavior and adding a probe step in exec_pipe.test.ts to gracefully skip strict byte-count assertions in environments where piped stdin isn’t detected.

Written by Cursor Bugbot for commit 05b85e7. This will update automatically on new commits. Configure here.

@linear
Copy link
Copy Markdown

linear bot commented Feb 13, 2026

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 13, 2026

⚠️ No Changeset found

Latest commit: 05b85e7

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

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

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: 045cf19a96

ℹ️ 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".

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@matthewlouisbrockman matthewlouisbrockman changed the title chore(cli): tighten up sandbox exec piping chore(cli): tighten up sandbox exec piping tests Feb 13, 2026
@matthewlouisbrockman matthewlouisbrockman added the cli Improvements or additions to CLI label Feb 16, 2026
@matthewlouisbrockman
Copy link
Copy Markdown
Contributor Author

uh oh

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 18, 2026

Package Artifacts

Built from 6e64cad. Download artifacts from this workflow run.

JS SDK (e2b@2.16.1-piping-tone-down-the-tests-configs-eng-3497.0):

npm install ./e2b-2.16.1-piping-tone-down-the-tests-configs-eng-3497.0.tgz

CLI (@e2b/cli@2.9.1-piping-tone-down-the-tests-configs-eng-3497.0):

npm install ./e2b-cli-2.9.1-piping-tone-down-the-tests-configs-eng-3497.0.tgz

Python SDK (e2b==2.17.0+piping-tone-down-the-tests-configs-eng-3497):

pip install ./e2b-2.17.0+piping.tone.down.the.tests.configs.eng.3497-py3-none-any.whl

@ValentaTomas ValentaTomas removed their request for review March 12, 2026 19:59
…he-tests-configs-eng-3497

# Conflicts:
#	packages/cli/tests/commands/sandbox/backend_integration.test.ts
…e-down-the-tests-configs-eng-3497"

This reverts commit cab6388.
…tests-configs-eng-3497

# Conflicts:
#	packages/cli/tests/commands/sandbox/backend_integration.test.ts
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

userConfig?.domain ||
'e2b.app'
const apiKey = process.env.E2B_API_KEY || userConfig?.teamApiKey
const integrationTest = test.skipIf(isDebug)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing API key skip guard in exec_pipe tests

Medium Severity

The refactor removed the API key availability check from the test skip guard. Previously, shouldSkip was !hasCreds || isDebug, but now integrationTest only checks isDebug. In environments without E2B_API_KEY set, the test will attempt Sandbox.create (which also lost its explicit apiKey and domain options) and fail with an auth error instead of being gracefully skipped. This is inconsistent with backend_integration.test.ts, which still guards on !apiKey || isDebug.

Additional Locations (1)
Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Improvements or additions to CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants