Skip to content

feat(ci): add non-root sandbox smoke test as PR gate #2571

@jyaunches

Description

@jyaunches

Problem

All PR-level and nightly E2E sandboxes run with full root privileges. The Brev Launchable and DGX Spark environments run with no-new-privileges / Landlock restrictions active during entrypoint execution. Bug 1 of the weekend regression (#2472) — a 5-day outage where the gateway never started on non-root sandboxes — was invisible to every CI gate.

Proposal

Add a lightweight non-root-sandbox-smoke job to pr-self-hosted.yaml that:

  1. Builds the production Docker image (already done by build-sandbox-images)
  2. Starts the container with --security-opt no-new-privileges (replicates Brev Launchable constraints)
  3. Waits for the gateway to respond on /health (HTTP 200 or 401) within 60 seconds
  4. Verifies openclaw tui can start without "Missing gateway auth token"

This does NOT need live inference or an API key — it only validates that the entrypoint completes and the gateway binds its port under restricted execution. Estimated runtime: ~2 minutes on top of the existing image build.

What This Would Have Caught

Implementation

Add to pr-self-hosted.yaml after build-sandbox-images:

test-non-root-sandbox-smoke:
  runs-on: linux-amd64-cpu4
  timeout-minutes: 5
  needs: build-sandbox-images
  steps:
    - name: Checkout
      uses: actions/checkout@v6
    - name: Download image
      uses: actions/download-artifact@v4
      with:
        name: isolation-image
        path: /tmp
    - name: Load image
      run: gunzip -c /tmp/isolation-image.tar.gz | docker load
    - name: Run non-root smoke test
      run: bash test/e2e/test-non-root-smoke.sh

The test script starts the container with --security-opt no-new-privileges, polls /health, and verifies openclaw tui --help succeeds.

Context

Metadata

Metadata

Assignees

Labels

04-25-regressionIssues raised from the Apr 25 weekend regression analysisarea: ciCI workflows, checks, release automation, or GitHub Actionsarea: e2eEnd-to-end tests, nightly failures, or validation infrastructure

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions