Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
dff7679
fix(vllm): retire the last sandbox's managed vLLM container and probe…
laitingsheng Sep 11, 2026
433461f
fix(vllm): make managed retirement race-safe
rsliter Sep 11, 2026
b001a10
test(vllm): satisfy destroy guardrails
rsliter Sep 11, 2026
35972c6
fix(vllm): close route and lifecycle review gaps
rsliter Sep 11, 2026
73e965e
test(vllm): compact route validation cases
rsliter Sep 11, 2026
1805c86
merge: resolve main conflicts for vLLM lifecycle
rsliter Sep 11, 2026
969b2ef
test(vllm): prove connect uses recorded port
rsliter Sep 11, 2026
e6a8722
merge: resolve main conflicts for vLLM lifecycle
rsliter Sep 11, 2026
89e79d1
docs(vllm): state what the live connect probe verifies
laitingsheng Sep 12, 2026
707c7ca
fix(vllm): retire managed vLLM on a destroy retry and finish stale ke…
laitingsheng Sep 12, 2026
52284ed
fix(vllm): preserve retirement retry authority
rsliter Sep 19, 2026
8f38c3f
merge: sync main for managed vLLM retirement
rsliter Sep 19, 2026
02dc596
merge: resolve main conflict for managed vLLM retirement
rsliter Sep 20, 2026
c2477e1
fix(vllm): preserve retirement recovery state
laitingsheng Sep 27, 2026
7ea4979
merge: resolve conflicts with main
github-actions[bot] Sep 27, 2026
6f34bd9
merge(main): prepare current budget conflict resolution
ericksoa Sep 28, 2026
4f219c9
merge(main): integrate current OpenClaw configuration ownership
ericksoa Sep 28, 2026
bed508f
fix(vllm): qualify retirement and preserve recovery state
ericksoa Sep 28, 2026
2d41c09
fix(deps): resolve fast-uri production audit failures
ericksoa Sep 29, 2026
84538da
ci: audit the corrected production dependency fingerprints
ericksoa Sep 29, 2026
b33f99d
fix(ci): separate audit fingerprints from npm image identity
ericksoa Sep 29, 2026
72af03c
test(deps): refresh fixtures for the fast-uri security update
ericksoa Sep 29, 2026
b06c2a1
merge: resolve main integration conflicts
ericksoa Sep 29, 2026
a791086
Merge branch 'main' into fix/managed-vllm-destroy-and-status-port
ericksoa Sep 29, 2026
dfb95dd
fix(ci): repair existing vLLM qualification setup
ericksoa Sep 29, 2026
0bbcbee
fix(ci): supply existing cache fixture inputs
ericksoa Sep 29, 2026
445ff46
fix(ci): keep the GPU user runtime active during qualification
ericksoa Sep 29, 2026
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
27 changes: 27 additions & 0 deletions .github/workflows/e2e-standard-profile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,25 @@ jobs:
-u NVIDIA_API_KEY -u NVIDIA_INFERENCE_API_KEY -u BRAVE_API_KEY -u GITHUB_TOKEN \
-u COMPATIBLE_API_KEY bash scripts/install-openshell.sh

- name: Prepare GPU launch-readiness runtime directory
id: gpu_runtime_directory
if: ${{ inputs.catalogue_id == 'gpu-e2e' && inputs.runtime_provider == 'docker' }}
shell: /bin/bash --noprofile --norc -e -o pipefail {0}
run: |
set -euo pipefail
uid="$(/usr/bin/id -u)"
unit="user@${uid}.service"
prior_state="$(/usr/bin/systemctl show "$unit" --property=ActiveState --value)"
if [[ "$prior_state" != "active" ]]; then
[[ "$prior_state" == "inactive" ]]
printf 'started=true\n' >> "$GITHUB_OUTPUT"
/usr/bin/sudo -n /usr/bin/systemctl start "$unit"
fi
/usr/bin/systemctl is-active --quiet "$unit"
runtime_directory="/run/user/$uid"
[[ -d "$runtime_directory" && ! -L "$runtime_directory" ]]
[[ "$(/usr/bin/stat -c '%u:%a' "$runtime_directory")" == "${uid}:700" ]]

- name: Run catalogue E2E target
env:
INSTALL_MODE: ${{ inputs.install_mode }}
Expand Down Expand Up @@ -635,6 +654,14 @@ jobs:
with:
enabled: "true"

- name: Restore GPU launch-readiness runtime directory
if: ${{ always() && inputs.catalogue_id == 'gpu-e2e' && inputs.runtime_provider == 'docker' && steps.gpu_runtime_directory.outputs.started == 'true' }}
shell: /bin/bash --noprofile --norc -e -o pipefail {0}
run: |
set -euo pipefail
uid="$(/usr/bin/id -u)"
/usr/bin/sudo -n /usr/bin/systemctl stop "user@${uid}.service"

- name: Clean up Docker auth
if: always()
shell: bash
Expand Down
65 changes: 29 additions & 36 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4878,50 +4878,43 @@ jobs:
- id: runtime-bases
name: Resolve digest-pinned amd64 runtime base images
env:
CHECKOUT_SHA: ${{ inputs.checkout_sha || github.sha }}
DCODE_BASE_REF: ${{ needs.base-image-publication.outputs.dcode_base_ref }}
HERMES_BASE_REF: ghcr.io/nvidia/nemoclaw/hermes-sandbox-base@${{ steps.runtime-hermes-base.outputs.digest }}
shell: bash
run: |
set -euo pipefail
work_dir="$(mktemp -d "${RUNNER_TEMP}/nemoclaw-runtime-bases.XXXXXX")"
trap 'rm -rf -- "$work_dir"' EXIT

resolve_base() {
local output_name="$1"
local alias="$2"
local repository="$3"
local alias_raw="$work_dir/${output_name}-alias.raw"
local exact_raw="$work_dir/${output_name}-exact.raw"
docker buildx imagetools inspect "$alias" --raw > "$alias_raw"
local digest
digest="$(
jq -er '
if (
.mediaType == "application/vnd.oci.image.index.v1+json" or
.mediaType == "application/vnd.docker.distribution.manifest.list.v2+json"
) then
[.manifests[] | select(.platform.os == "linux" and .platform.architecture == "amd64")]
| if length == 1 then .[0].digest else error("not one exact amd64 descriptor") end
else
error("base alias is not a platform index")
end
' "$alias_raw"
)"
[[ "$digest" =~ ^sha256:[a-f0-9]{64}$ ]] || {
echo "::error::${output_name} base alias returned an invalid digest" >&2
exit 1
}
local reference="${repository}@${digest}"
docker buildx imagetools inspect "$reference" --raw > "$exact_raw"
[[ "sha256:$(sha256sum "$exact_raw" | awk '{print $1}')" == "$digest" ]] || {
echo "::error::${output_name} exact base bytes do not match the selected digest" >&2
exit 1
}
printf '%s=%s\n' "$output_name" "$reference" >> "$GITHUB_OUTPUT"
# The mutable base alias can move after the startup job prepared this cache.
# Reuse that job's exact OpenClaw base and preserve the other identity checks.
prepared_inputs="$NEMOCLAW_PROTECTED_MANAGED_IMAGE_BUILD_CACHE/prepared-inputs"
[[ -f "$prepared_inputs" && ! -L "$prepared_inputs" ]] || {
echo "::error::protected build cache has no safe prepared-input identity" >&2
exit 1
}

resolve_base openclaw \
ghcr.io/nvidia/nemoclaw/sandbox-base:latest \
ghcr.io/nvidia/nemoclaw/sandbox-base
read -r cached_revision cached_platform cached_openclaw cached_hermes cached_dcode extra < "$prepared_inputs"
[[ -z "$extra" &&
"$cached_revision" == "$CHECKOUT_SHA" &&
"$cached_platform" == "linux/amd64" &&
"$cached_hermes" == "$HERMES_BASE_REF" &&
"$cached_dcode" == "$DCODE_BASE_REF" &&
"$(cat "$prepared_inputs")" == "$cached_revision $cached_platform $cached_openclaw $cached_hermes $cached_dcode" ]] || {
echo "::error::protected build-cache identity does not match this run" >&2
exit 1
}
[[ "$cached_openclaw" =~ ^ghcr[.]io/nvidia/nemoclaw/sandbox-base@sha256:[a-f0-9]{64}$ ]] || {
echo "::error::prepared OpenClaw base is not an exact approved image reference" >&2
exit 1
}
openclaw_digest="${cached_openclaw##*@}"
docker buildx imagetools inspect "$cached_openclaw" --raw > "$work_dir/openclaw-exact.raw"
[[ "sha256:$(sha256sum "$work_dir/openclaw-exact.raw" | awk '{print $1}')" == "$openclaw_digest" ]] || {
echo "::error::OpenClaw exact base bytes do not match the prepared digest" >&2
exit 1
}
printf 'openclaw=%s\n' "$cached_openclaw" >> "$GITHUB_OUTPUT"
[[ "$DCODE_BASE_REF" =~ ^ghcr[.]io/nvidia/nemoclaw/langchain-deepagents-code-sandbox-base@sha256:[a-f0-9]{64}$ ]] || {
echo "::error::dcode base publication returned an invalid exact reference" >&2
exit 1
Expand Down
14 changes: 7 additions & 7 deletions ci/e2e-assertion-budget.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@
"testFileCount": 77,
"liveFileCount": 186,
"direct": {
"expectCalls": 1278,
"matcherAssertions": 1257,
"expectCalls": 1275,
"matcherAssertions": 1254,
"nodeAssertions": 104,
"namedAssertionHelpers": 436,
"failCalls": 0,
"throwGuards": 60,
"objectFieldAssertions": 163,
"objectFieldAssertions": 166,
"assertionPoints": 2020,
"generatedProbeBlocks": 91,
"generatedProbeConditions": 221
},
"unique": {
"expectCalls": 1703,
"matcherAssertions": 1677,
"expectCalls": 1700,
"matcherAssertions": 1674,
"nodeAssertions": 127,
"namedAssertionHelpers": 681,
"failCalls": 1,
"throwGuards": 540,
"objectFieldAssertions": 240,
"objectFieldAssertions": 243,
"assertionPoints": 3266,
"generatedProbeBlocks": 213,
"generatedProbeConditions": 726
Expand Down Expand Up @@ -63,7 +63,7 @@
"test/e2e/live/external-gateway-health.test.ts": [4,5,4,11,0],
"test/e2e/live/full-e2e.test.ts": [27,31,28,61,7],
"test/e2e/live/gpu-double-onboard.test.ts": [21,24,21,24,0],
"test/e2e/live/gpu-e2e.test.ts": [39,44,72,90,3],
"test/e2e/live/gpu-e2e.test.ts": [36,44,69,90,3],
"test/e2e/live/hermes-discord.test.ts": [10,25,17,64,14],
"test/e2e/live/hermes-e2e.test.ts": [82,93,112,127,3],
"test/e2e/live/hermes-gpu-startup.test.ts": [19,27,59,84,12],
Expand Down
2 changes: 1 addition & 1 deletion ci/source-architecture-budget.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"src/lib/runner.ts": 80,
"src/lib/sandbox-name-contract.ts": 20,
"src/lib/security/redact.ts": 50,
"src/lib/state/mcp-lifecycle-lock.ts": 20,
"src/lib/state/mcp-lifecycle-lock.ts": 19,
"src/lib/state/onboard-session.ts": 35,
"src/lib/state/registry.ts": 87,
"src/lib/state/state-root.ts": 21,
Expand Down
15 changes: 13 additions & 2 deletions docs/inference/set-up-vllm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ The vLLM `/v1/responses` endpoint does not run the configured tool-call parser,
<Warning>
Local vLLM does not require authentication by default.
Existing-server and single-host managed-vLLM paths use `NEMOCLAW_VLLM_PORT`, which defaults to `8000`, on host loopback for validation and on the OpenShell Docker bridge for sandbox traffic.
After onboarding, `status` and `doctor` probe an authenticated managed single-host vLLM container on its published loopback port.
For a bearerless server, they use the port in the sandbox's recorded `http://host.openshell.internal:<port>/v1` route.
When that route is valid, no later port environment override is required.
For vLLM, `connect` runs these host probes only when it repairs the route.
A missing or invalid recorded route makes a bearerless probe fall back to `NEMOCLAW_VLLM_PORT`, which defaults to `8000`.
Use a host firewall with default-deny inbound rules.
Allow the configured TCP port only from the OpenShell Docker subnet to its gateway address, keep loopback access, and deny the port on every other interface.
Do not expose the port to your LAN or the internet.
Expand Down Expand Up @@ -152,7 +157,13 @@ $$nemoclaw onboard --profile <profile-id> --vllm-gpu-device <index-or-uuid>
#### Handle a Running vLLM Server

The single-host managed vLLM runtime is host-global.
Destroying a sandbox does not stop it, and the container remains available for other sandboxes.
`$$nemoclaw <name> destroy` keeps the container while any registered sandbox in any gateway state root reports provider `vllm-local`.
Local NIM uses the same provider identifier and counts as a possible consumer.
After the last such sandbox is destroyed, an eligible `destroy` removes the verified NemoClaw-managed container and frees its GPU memory.
When ownership or Docker state cannot be verified, NemoClaw retains recovery state and reports the reason instead of claiming completed retirement.
Resolve the cause, then rerun the same `destroy` command.
Pass `--keep-vllm` or set `NEMOCLAW_KEEP_VLLM=1` to preserve the container for a later sandbox.
Refer to [CLI Commands](../../reference/commands) for the cleanup conditions.
Later standard onboarding normally reuses a server that is already listening on the configured vLLM port instead of replacing it automatically.
When a managed GPU selection accompanies explicit managed-install intent, NemoClaw preserves that intent and reports the running-server conflict.

Expand Down Expand Up @@ -189,7 +200,7 @@ Choose one action:
```

Accept the result when onboarding completes and `$$nemoclaw list` reports the new sandbox with provider `vllm-local` and the expected model.
NemoClaw does not stop or recreate a running vLLM server automatically because another sandbox can use it.
Onboarding does not stop or recreate a running vLLM server automatically because another sandbox can use it.

NemoClaw requires a resumed session to reuse the recorded GPU selector.
A legacy in-progress session cannot add one, and a resumed session cannot change one.
Expand Down
31 changes: 29 additions & 2 deletions docs/reference/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2000,7 +2000,33 @@ The sandbox must be running for `nemohermes my-assistant gateway-token --quiet`

### `$$nemoclaw <name> destroy`

Stop managed local inference resources, remove runtime-provider-owned resources created during onboarding, and delete the sandbox. This removes the sandbox from the registry. NemoClaw resolves the registry that owns the sandbox before it starts cleanup, even when another local OpenShell gateway is active. For Ollama-backed sandboxes, `destroy` also asks Ollama to unload currently loaded models and clears stale auth proxy state on a best-effort basis. For Model Router sandboxes, `destroy` keeps the process and recovery identity when another sandbox uses the port or when session, process, or absence checks are inconclusive. It also preserves a replacement onboarding session when the captured session identity changed. If the captured session uses the destroyed sandbox name with another router port, `destroy` clears only the sandbox association and preserves that router's recovery identity. For lock order, same-port peer handling, and cleanup checks, refer to [Set Up Model Router](../inference/hosted-inference/set-up-model-router#router-and-sandbox-lifecycle-locks).
Stop managed local inference resources, remove runtime-provider-owned resources created during onboarding, and delete the sandbox. This removes the sandbox from the registry. NemoClaw resolves the registry that owns the sandbox before it starts cleanup, even when another local OpenShell gateway is active. For Ollama-backed sandboxes, `destroy` also asks Ollama to unload currently loaded models and clears stale auth proxy state on a best-effort basis.

`destroy` considers retirement of the host-global `nemoclaw-vllm` container for a sandbox with provider `vllm-local`, including Local NIM.
It requires confirmed sandbox deletion and no remaining registered `vllm-local` consumer in any gateway state root.
Sandboxes with a runtime-provider host-local inference receipt use that provider's cleanup instead.
`destroy` removes a verified NemoClaw-managed container by its inspected ID and frees any GPU memory it held.
Pass `--keep-vllm` or set `NEMOCLAW_KEEP_VLLM=1` to preserve the container for a later sandbox.

`destroy` does not claim that retirement completed when:

- Another registered sandbox uses provider `vllm-local`.
- The container lacks the NemoClaw managed label.
- The container carries distributed vLLM labels but has no matching ownership receipt.
- An authenticated container does not match its persisted API key and receipt.
- A distributed vLLM receipt owns the container.
- NemoClaw cannot read every gateway sandbox registry.
- Docker is unavailable or cannot confirm whether the container exists.
- Container removal or private-state cleanup fails.

Before eligible registry removal, `destroy` writes the sandbox name to `~/.nemoclaw/host-local-vllm-pending-retirement.json`.
This record supports a same-name retry after the registry entry is gone.
If the write fails and no matching record can be read, `destroy` preserves the registry entry and exits with an error.
Unfinished retirement retains the pending record.
Resolve the reported cause, then rerun the same `destroy` command to finish cleanup.
A completed retirement or a decision to keep the container for a consumer, preservation option, or distributed owner clears the record.

For Model Router sandboxes, `destroy` keeps the process and recovery identity when another sandbox uses the port or when session, process, or absence checks are inconclusive. It also preserves a replacement onboarding session when the captured session identity changed. If the captured session uses the destroyed sandbox name with another router port, `destroy` clears only the sandbox association and preserves that router's recovery identity. For lock order, same-port peer handling, and cleanup checks, refer to [Set Up Model Router](../inference/hosted-inference/set-up-model-router#router-and-sandbox-lifecycle-locks).

If `destroy` warns that it could not identify or stop a listener for the deleted sandbox:

Expand Down Expand Up @@ -2104,7 +2130,7 @@ Retry after the recorded gateway is available.
An MCP source that cannot be safely inspected disables the local-only fallback.

```bash
$$nemoclaw my-assistant destroy [--yes|-y|--force] [--cleanup-gateway|--no-cleanup-gateway]
$$nemoclaw my-assistant destroy [--yes|-y|--force] [--cleanup-gateway|--no-cleanup-gateway] [--keep-vllm]
```

After OpenShell confirms deletion of a sandbox that owns managed llama.cpp, `destroy` revalidates the exact container, internal network, lifecycle journal, and gateway-scoped receipt. It removes those resources by inspected ID, then removes the API key and managed ownership state. It preserves the shared `~/.cache/huggingface/` cache. If exact cleanup fails, `destroy` preserves the sandbox registry entry and ownership state so you can correct the reported conflict and retry.
Expand Down Expand Up @@ -4589,6 +4615,7 @@ The following flags change defaults for commands that manage existing sandboxes.
| Variable | Format | Effect |
| --- | --- | --- |
| `NEMOCLAW_CLEANUP_GATEWAY` | `1`, `true`, or `yes` to enable; `0`, `false`, or `no` to disable | Overrides the platform default (macOS unattended: cleanup; Linux/Windows: preserve) for whether `$$nemoclaw <name> destroy` removes the shared gateway when destroying the last sandbox. Command-line `--cleanup-gateway` and `--no-cleanup-gateway` still take precedence. |
| `NEMOCLAW_KEEP_VLLM` | `1`, `true`, or `yes` to keep; `0`, `false`, or `no` to remove | Keeps the NemoClaw-managed `nemoclaw-vllm` container running when `$$nemoclaw <name> destroy` deletes the last registered sandbox that uses Local vLLM. By default, that destroy removes the container. Command-line `--keep-vllm` has the same effect. |

<AgentOnly variant="hermes">
| `NEMOCLAW_CONFIG_ACCEPT_NEW_PATH` | Exactly `"1"` to opt in (`true`, `yes`, `on` are not accepted) | Allows `nemohermes <name> config set` to write a dotpath that does not already exist in the sandbox config, without the interactive confirmation. Equivalent to passing `--config-accept-new-path`, and it takes precedence over `NEMOCLAW_NON_INTERACTIVE=1`. Without it, a run without a TTY refuses the write instead. |
Expand Down
Loading
Loading