Skip to content

test: run an E2E suite against the published gateway of the pinned core version #6

Closed

Description

@pimlock

Part of the automation phase of NVIDIA/OpenShell#5287. It depends on #2 and #3 being on main, and core bump PRs (#5) will call it.

Problem

CI runs only unit tests. Nothing checks the SDK against a real gateway, so a bump PR from #5 can regenerate the bindings and pass CI while the curated API is broken against the new gateway.

Proposal

Port the sdk-go E2E lane (e2e.yml, start-gateway.sh, stop-gateway.sh) and seed the suite from core's e2e/python.

Gateway:

  • start-gateway.sh <core-version> runs the published gateway for that core version, using core's own deploy/docker/docker-compose.yml and gateway.toml at the tag.
  • It uses the Docker compute driver and plaintext gRPC on 127.0.0.1:8080, pins the supervisor and sandbox images to the same version, and registers the gateway as e2e.
  • It waits up to 15 minutes for the gateway image of a fresh tag to be published.
  • stop-gateway.sh cleans up. The gateway log is uploaded when a run fails.
  • The scripts should stay identical to sdk-go's apart from the pin lookup, which reads OPENSHELL_CORE_REF in mise.toml here.

Workflow:

  • e2e.yml is reusable (workflow_call) and can also be started by hand (workflow_dispatch). It takes a core-version input that defaults to the pin.
  • It runs on PRs and on main, and ci: propose bindings updates for new core releases and track drift against core main #5's bump PRs call it with the proposed tag.
  • mise run e2e runs the suite against OPENSHELL_GATEWAY=e2e.
  • The suite lives in tests/e2e/. The default mise run test excludes it, so unit tests need no gateway.

Workload image. Sandbox.exec_python pickles the callable with cloudpickle and runs it inside the sandbox. The sandbox therefore needs the same Python minor version as the client, plus cloudpickle. Core builds that image from e2e/python/Dockerfile.workload (openshell/e2e-python:dev):

  • Vendor that Dockerfile.
  • Build it in the job and point the gateway's sandbox image at it.
  • Add a drift check against core at the pin, like the OAuth fixture's.

Which tests move

Only tests whose subject is the SDK move here. Tests whose subject is gateway or sandbox enforcement stay in core and are ported to the Rust testkit there; NVIDIA/OpenShell#5287 tracks that work.

Core file Here? Why
test_sandbox_api.py Yes CRUD, exec, interactive exec, listing, labels and selectors, all through the curated API
test_workspace_api.py Yes Workspace client, request ID replay
test_sandbox_exec_python.py Yes exec_python, cloudpickle round trip
test_exec_admission.py Yes Exec request IDs, timeouts and cancellation as the SDK sees them
oidc/oidc_auth_test.py Later The SDK's OIDC token flow; needs Keycloak, so a separate follow-up
test_sandbox_landlock.py, test_sandbox_policy.py, test_policy_validation.py, test_sandbox_venv.py No Sandbox policy enforcement
test_security_tls.py, test_sandbox_providers.py, oidc/workspace_authz_test.py No Gateway TLS, credential injection and authorization

Some of these tests call private client._stub.<RPC> methods. Keep those calls, because real users depend on _stub too, and note which RPCs have no curated wrapper.

Acceptance criteria

Activity

  1. added
    enhancementNew feature or request
    and removed
    enhancementNew feature or request
    on Nov 6, 2026
  2. self-assigned this
    on Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions