Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions test/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,90 @@ discovery command locally to inspect the generated test matrix:
npx tsx tools/e2e/credential-free-tests.mts
```

## Inactive Windows MXC OpenClaw qualification

`windows-mxc-openclaw-process-container.test.ts` is an explicit local
qualification target for epic #8178. It exercises an operator-supplied native
Windows OpenShell package and a staged OpenClaw artifact through the OpenShell
`process_container` driver. It does not register MXC, call `wxc-exec.exe`
directly, or establish Windows support.
The generated driver configuration requests the stricter less-privileged
AppContainer mode and records that choice in the receipt.

The target requires a Windows x64 host that passes the minimum MXC candidate
check. It rejects a dirty NemoClaw checkout and requires exact expected
identities for that checkout, the OpenShell CLI and gateway, the
OpenShell-supplied `wxc-exec.exe`, the complete OpenClaw artifact tree, Node.js,
and the OpenClaw entrypoint. Compute the canonical artifact-tree digest after
staging:

```powershell
npx tsx tools/e2e/windows-mxc-openclaw-artifact-tree.mts $env:NEMOCLAW_WINDOWS_MXC_OPENCLAW_ROOT
```

Set the following environment variables to paths or exact lowercase identity
values. Do not put credentials in them.

| Variable | Meaning |
| --- | --- |
| `E2E_ARTIFACT_DIR` | Existing directory for the secret-free qualification receipt |
| `NEMOCLAW_E2E_EXPECTED_SHA` | Exact 40-character NemoClaw checkout revision |
| `NEMOCLAW_WINDOWS_MXC_OPENSHELL_CLI` | Extracted `openshell.exe` path |
| `NEMOCLAW_WINDOWS_MXC_OPENSHELL_GATEWAY` | Extracted `openshell-gateway.exe` path |
| `NEMOCLAW_WINDOWS_MXC_WXC_EXEC` | `wxc-exec.exe` supplied for that OpenShell package |
| `NEMOCLAW_WINDOWS_MXC_OPENSHELL_VERSION` | Exact OpenShell package version |
| `NEMOCLAW_WINDOWS_MXC_OPENSHELL_REVISION` | Exact 40-character OpenShell source revision |
| `NEMOCLAW_WINDOWS_MXC_OPENSHELL_CLI_SHA256` | Expected OpenShell CLI SHA-256 |
| `NEMOCLAW_WINDOWS_MXC_OPENSHELL_GATEWAY_SHA256` | Expected OpenShell gateway SHA-256 |
| `NEMOCLAW_WINDOWS_MXC_WXC_EXEC_SHA256` | Expected `wxc-exec.exe` SHA-256 |
| `NEMOCLAW_WINDOWS_MXC_OPENCLAW_ROOT` | Staged native OpenClaw artifact root |
| `NEMOCLAW_WINDOWS_MXC_NODE` | Node.js executable beneath the artifact root |
| `NEMOCLAW_WINDOWS_MXC_OPENCLAW_ENTRY` | OpenClaw entrypoint beneath the artifact root |
| `NEMOCLAW_WINDOWS_MXC_OPENCLAW_VERSION` | Expected OpenClaw version |
| `NEMOCLAW_WINDOWS_MXC_OPENCLAW_ARTIFACT_TREE_SHA256` | Expected canonical artifact-tree SHA-256 |
| `NEMOCLAW_WINDOWS_MXC_NODE_SHA256` | Expected Node.js SHA-256 |
| `NEMOCLAW_WINDOWS_MXC_OPENCLAW_ENTRY_SHA256` | Expected OpenClaw entrypoint SHA-256 |

The target creates a random OpenClaw gateway token for readiness checks. It
passes that token through the MXC agent environment; current OpenShell
`process_container` packaging can therefore expose its encoded configuration,
including the token, to privileged host process inspection while `wxc-exec.exe`
starts the sandbox. The token is never written to the receipt or supplied in
the OpenClaw command arguments, is not reused, and is useful only for the
temporary loopback OpenClaw gateway. Cleanup attempts sandbox deletion, stops
the recorded OpenClaw process, clears the in-memory environment value, and
removes the runtime home, state, configuration, and gateway logs. A direct
process-tree termination is an emergency cleanup fallback only. The host-side
OpenShell processes receive an allowlist of Windows runtime variables rather
than the complete caller environment. Before using a termination fallback,
the host binds the process ID to the expected executable, command arguments,
and creation time. For OpenClaw, it also validates the probe-parent ancestry.
The host rejects a mismatched or reused PID. The fallback uses the
`taskkill.exe` beneath the validated Windows system root. If either the
OpenClaw process or OpenShell gateway needs that fallback, the qualification
fails. The delete retry and process-termination paths are failure containment,
not compatibility workarounds that permit a passing result; their presence does
not assume a specific upstream defect. Remove them only when failed or partial
OpenShell lifecycle operations can still guarantee teardown without host-side
cleanup.

Run only the explicit target:

```powershell
$env:NEMOCLAW_RUN_LIVE_E2E = "1"
$env:NEMOCLAW_RUN_WINDOWS_MXC_OPENCLAW_E2E = "1"
npx vitest run --project e2e-live test/e2e/live/windows-mxc-openclaw-process-container.test.ts
```

The target verifies OpenClaw startup and in-sandbox health, read-write and denied
filesystem behavior, registry cleanup, and termination of the recorded
OpenClaw process on sandbox delete. After preflight and local setup succeed, it
writes a secret-free receipt for either verdict and records whether sensitive
runtime artifacts were removed. When that cleanup succeeds, a failed run retains
only non-sensitive probe files for diagnosis.
Gateway mTLS, governed egress, managed inference, gateway-restart recovery, and
production activation remain outside this target.

The retired `hermes-dashboard` selector remains a compatibility alias for
`hermes-e2e` in both selector inputs. Reports use the canonical
`hermes-e2e` name. That lane always enables dashboard coverage while preserving
Expand Down
Loading
Loading