Repository navigation
test(e2e): run an E2E suite against the published gateway in CI - #15
Merged
Merged
Conversation
TcpForwardInit names the workspace in a plain `workspace` field and has no `workspace_scope`. forward() spread the sandbox target helper into the init, so the gateway got no workspace and rejected every connection with "workspace name is required"; the local socket closed with no data. The unit tests use a fake gateway and didn't catch it. Send the workspace name, `default` when omitted, and assert it in the forward unit test. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Port the sdk-python E2E lane: scripts/e2e/start-gateway.sh and stop-gateway.sh (copied unchanged) start the published gateway of a core version from core's deploy/docker files and register it as `e2e`, and e2e.yml runs `mise run e2e` against it. ci.yml calls it on every run without making it required, since a fresh core tag can be pinned before its gateway image is published; it can also be dispatched with any core version. The vitest suite in e2e/ covers health, the sandbox lifecycle, label selectors and paging, exec, execStream, execInteractive (output drained after input EOF, tty allocation), forward, setSetting/getConfig, and watchLogs. It replaces e2e/interactive-exec.mjs, which nothing ran, and is skipped without OPENSHELL_GATEWAY. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
TaylorMutch
approved these changes
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an E2E lane modeled on sdk-python's. It runs a vitest suite against the published gateway of the pinned core version (Docker compute driver) on every CI run. Running it surfaced a bug:
forward()failed every connection against a real gateway. This PR fixes that too.Related Issue
None. This is the E2E lane sdk-python already has, plus the bug it found.
Changes
fix(forward):
TcpForwardInithas a plainworkspacefield and noworkspace_scope.forward()didn't setworkspace, so the gateway rejected every connection with "workspace name is required" and the local socket closed with no data. The init now sends the workspace name (defaultwhen omitted). The forward unit test asserts it. No public API change.Suite in
e2e/sandbox.e2e.test.ts, which covers:waitReady,get,listAll,delete,waitDeleted, thennot_foundexecwith stdin, environment and working directoryexecStream, with the exit event lastexecInteractive: output drained after input EOF, and a tty only when requestedforwardto a loopback HTTP server inside the sandboxsetSetting/getConfigwatchLogsIt replaces
e2e/interactive-exec.mjs, which nothing ran. Every test is skipped withoutOPENSHELL_GATEWAY.Wiring:
vitest.e2e.config.tsand amise run e2etask.tsconfig.jsonnow type-checkse2e/and the config files.Gateway scripts:
scripts/e2e/start-gateway.shandstop-gateway.sh, copied unchanged from sdk-python.Workflow:
.github/workflows/e2e.yml, which can also be dispatched with any core version.ci.ymlcalls it but doesn't require it for thecicheck, as in sdk-python, because a fresh core tag can be pinned before its gateway image is published.Docs:
CONTRIBUTING.mdandscripts/README.md.Testing
mise run cipasses (206 unit tests)Locally, the suite passed twice (10/10) against the published v0.1.9 gateway, started from core's compose files with a private sandbox namespace. Before the fix, the forward test failed with "workspace name is required".
mise run workflows:checkpasses.Checklist