Skip to content

fix(blueprint): fail rollback when sandbox name is missing - #3785

Merged
cv merged 1 commit into
NVIDIA:mainfrom
1PoPTRoN:fix/rollback-sandbox-name
Jun 1, 2026
Merged

cv merged 1 commit into
NVIDIA:mainfrom
1PoPTRoN:fix/rollback-sandbox-name

Conversation

@1PoPTRoN

@1PoPTRoN 1PoPTRoN commented May 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR makes blueprint rollback fail closed when plan.json does not contain a verifiable sandbox_name. Previously, a partial or corrupted rollback plan could fall back to openclaw, which risked stopping or removing the wrong sandbox.

Related Issue

Fixes #3783

Changes

  • Require sandbox_name to be present, a string, and non-empty before rollback runs sandbox cleanup.
  • Split rollback plan validation from best-effort openshell sandbox stop/remove cleanup so plan errors are not swallowed.
  • Update rollback tests to cover missing, corrupt, and partial plan.json cases.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Verification

  • npx prek run --all-files passes
  • npm test passes
  • Tests added or updated for new or changed behavior
  • No secrets, API keys, or credentials committed
  • Docs updated for user-facing behavior changes
  • make docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Focused verification run:

  • npx vitest run --project plugin nemoclaw/src/blueprint/runner.test.ts
  • npm --prefix nemoclaw run check

Note: I did not mark full npm test as passing because the broader suite has unrelated local/environment failures outside this rollback change.


Signed-off-by: 1PoPTRoN [email protected]

Summary by CodeRabbit

  • Bug Fixes

    • Rollback now requires a valid plan and an explicit, non-empty sandbox name; missing or corrupt plans cause rollback to fail with a clear error, make no subprocess calls, and will not mark as rolled back.
    • Sandbox cleanup is best-effort; cleanup failures no longer block writing the rolled-back marker or completing rollback.
  • Tests

    • Updated tests to expect failures when plan or sandbox name is missing/corrupt and to verify no cleanup or marker is produced; added a test for missing sandbox name.

Review Change Stack

Copilot AI review requested due to automatic review settings May 19, 2026 02:47
@copy-pr-bot

copy-pr-bot Bot commented May 19, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented May 19, 2026 •

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Rollback now requires a non-empty sandbox_name from plan.json and throws on missing/corrupt/invalid plans; sandbox stop/remove run only after validation and as best-effort so cleanup failures don't block writing the rolled_back marker.

Changes

Rollback safety: fail-closed on plan validation failure

Layer / File(s) Summary
Type contract and sandbox name validation
nemoclaw/src/blueprint/runner.ts
RollbackPlanSource.sandbox_name changed to unknown. readRollbackSandboxName now throws unless sandbox_name is a non-empty, trimmed string; the "openclaw" fallback was removed.
Rollback two-phase error handling
nemoclaw/src/blueprint/runner.ts
actionRollback now parses and validates plan.json (hard-fail with context) before attempting openshell sandbox stop/remove in a separate best-effort try/catch so cleanup errors don't block marking the run rolled back.
Test coverage for strict validation and two-phase error handling
nemoclaw/src/blueprint/runner.test.ts
Tests added/updated to expect actionRollback throws on missing plan.json or missing/invalid sandbox_name; these cases must make no subprocess calls and not write the rolled_back marker.

Sequence Diagram(s)

sequenceDiagram
  participant Runner as actionRollback
  participant FS as plan.json (filesystem)
  participant Validator as readRollbackSandboxName
  participant Shell as openshell (subprocess)
  participant State as run state (rolled_back marker)

  Runner->>FS: read plan.json
  FS-->>Runner: file contents / error
  Runner->>Validator: parse & validate sandbox_name
  Validator-->>Runner: sandboxName / throw
  alt validation succeeds
    Runner->>Shell: "openshell sandbox stop {sandboxName}"
    Shell-->>Runner: stop result / error
    Runner->>Shell: "openshell sandbox remove {sandboxName}"
    Shell-->>Runner: remove result / error
    Runner->>State: write rolled_back marker
  else validation fails
    Validator-->>Runner: throw (abort, no subprocess calls)
  end
Loading

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested labels: bug, Sandbox

Suggested reviewers:

  • cjagwani

I hop through plans with careful care,
No defaults where truth isn't there,
If the plan's a puzzle, I pause and shout,
Until sandbox is known, I won't go out. 🐰

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(blueprint): fail rollback when sandbox name is missing' clearly and concisely describes the main change: preventing rollback from defaulting to 'openclaw' when sandbox_name is absent.
Linked Issues check ✅ Passed All objectives from #3783 are met: rollback now requires sandbox_name, fails before invoking openshell commands when plan.json is missing/corrupt/invalid, and does not write rolled_back marker on validation failures.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the linked issue #3783: removing the 'openclaw' fallback, enforcing sandbox_name validation, and splitting plan validation from best-effort cleanup.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
nemoclaw/src/blueprint/runner.test.ts (1)

1215-1224: 💤 Low value

Consider adding edge case tests for invalid sandbox_name values.

The test covers the missing sandbox_name case well. The validation logic in readRollbackSandboxName also handles empty string and whitespace-only values—you could add quick test cases for these edge cases to strengthen coverage.

🧪 Optional additional test cases
it.each([
  ["empty string", { sandbox_name: "" }],
  ["whitespace only", { sandbox_name: "   " }],
  ["non-string type", { sandbox_name: 123 }],
])("throws when sandbox_name is %s", async (_label, plan) => {
  const runDir = `${RUNS_DIR}/nc-run-1`;
  addDir(runDir);
  addFile(`${runDir}/plan.json`, JSON.stringify(plan));

  await expect(actionRollback("nc-run-1")).rejects.toThrow(/missing sandbox_name/);

  expect(mockExeca).not.toHaveBeenCalled();
  expect(store.has(`${runDir}/rolled_back`)).toBe(false);
});
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@nemoclaw/src/blueprint/runner.test.ts` around lines 1215 - 1224, Add tests
for the invalid sandbox_name edge cases handled by readRollbackSandboxName by
extending the existing test block around actionRollback to include cases for
empty string, whitespace-only string, and non-string types; create a runDir as
before (using RUNS_DIR and "nc-run-1"), write a plan.json with the problematic
sandbox_name values, call actionRollback("nc-run-1") and assert it rejects with
/missing sandbox_name/, and ensure mockExeca is not called and
store.has(`${runDir}/rolled_back`) is false to match the existing test
assertions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@nemoclaw/src/blueprint/runner.test.ts`:
- Around line 1215-1224: Add tests for the invalid sandbox_name edge cases
handled by readRollbackSandboxName by extending the existing test block around
actionRollback to include cases for empty string, whitespace-only string, and
non-string types; create a runDir as before (using RUNS_DIR and "nc-run-1"),
write a plan.json with the problematic sandbox_name values, call
actionRollback("nc-run-1") and assert it rejects with /missing sandbox_name/,
and ensure mockExeca is not called and store.has(`${runDir}/rolled_back`) is
false to match the existing test assertions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: cebb9c17-3b42-4193-a516-7dba486de450

📥 Commits

Reviewing files that changed from the base of the PR and between 5a03166 and 60b91ad.

📒 Files selected for processing (2)
  • nemoclaw/src/blueprint/runner.test.ts
  • nemoclaw/src/blueprint/runner.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens blueprint rollback behavior by requiring a verifiable sandbox_name from the persisted plan.json and failing closed when rollback state is missing or corrupted, preventing accidental stop/remove of an unintended sandbox.

Changes:

  • Removed the "openclaw" fallback for rollback and require sandbox_name to be a non-empty string.
  • Split rollback plan parsing/validation from best-effort sandbox stop/remove so plan errors are surfaced.
  • Updated rollback tests to assert rollback aborts (and does not write the rolled_back marker) when plan.json is missing/corrupt/partial.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
nemoclaw/src/blueprint/runner.ts Enforces strict rollback plan validation and stops using a default sandbox name during rollback.
nemoclaw/src/blueprint/runner.test.ts Adjusts/extends rollback tests to cover missing/corrupt/partial plan scenarios and ensure fail-closed behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread nemoclaw/src/blueprint/runner.ts Resolved
@1PoPTRoN
1PoPTRoN force-pushed the fix/rollback-sandbox-name branch from 60b91ad to 21e3d1d Compare May 19, 2026 02:55
@1PoPTRoN

Copy link
Copy Markdown
Contributor Author

@cv @ericksoa @jyaunches, i found a rollback safety bug in nemoclaw/src/blueprint/runner.ts.

If plan.json exists but is missing sandbox_name, actionRollback() currently falls back to openclaw which means a rollback for a non-default sandbox could stop/remove the wrong sandbox. The safer behavior is to fail the rollback when the sandbox name cannot be verified from the plan.

I’ve put together a small fix that removes the fallback, fails closed on missing/corrupt plan data and adds regression coverage for the partial plan.json case.

@wscurran

Copy link
Copy Markdown
Contributor

✨ Thanks for submitting this detailed PR about fixing the blueprint rollback issue when the sandbox name is missing. This change proposes a way to fail the rollback when the plan.json does not contain a verifiable sandbox_name, which improves the reliability of the sandbox cleanup process.


Related open issues:

@1PoPTRoN
1PoPTRoN force-pushed the fix/rollback-sandbox-name branch 5 times, most recently from 035641b to 2c21192 Compare May 25, 2026 10:55
@1PoPTRoN
1PoPTRoN requested a review from cv May 25, 2026 10:55
@1PoPTRoN

Copy link
Copy Markdown
Contributor Author

@ericksoa @cv @jyaunches

@1PoPTRoN
1PoPTRoN force-pushed the fix/rollback-sandbox-name branch from 2c21192 to af06664 Compare May 30, 2026 03:36
@1PoPTRoN
1PoPTRoN force-pushed the fix/rollback-sandbox-name branch from af06664 to c1909eb Compare June 1, 2026 11:29
@1PoPTRoN

1PoPTRoN commented Jun 1, 2026 •

Copy link
Copy Markdown
Contributor Author

@cv thanks for approving, can you merge it?

@cv cv added the v0.0.56 label Jun 1, 2026
@cv cv added v0.0.57 and removed v0.0.56 labels Jun 1, 2026
@cv
cv merged commit 3bd38ae into NVIDIA:main Jun 1, 2026
17 checks passed
@wscurran wscurran added area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery bug-fix PR fixes a bug or regression labels Jun 3, 2026
rsliter added a commit that referenced this pull request Oct 27, 2026
## Outcome

Owned managed llama.cpp runtimes have a 30-second per-request limit and
a shared 90-second fingerprint deadline during onboarding, status, and
later context-window checks. Operator-attached servers keep the 5-second
limit. A timeout identifies the request phase. Managed rebuild rejects a
conflicting persisted gateway identity before probing.

## Reason

On the N1X Windows/WSL Yukon board, the managed server loaded and
listened on port 8081, but a successful bridge `/health` response took
15.9 seconds. The 5-second fingerprint limit caused onboarding to fail
at step 3/8. [Redacted QA
evidence](#12285 (comment)).

The first PR Review Advisor pass found that later context-window checks
still used the short limit and that timeout errors did not identify the
failed request. The second commit addresses both findings. The next pass
found that context-window checks on a non-default gateway read managed
state from the default gateway. The third commit uses the selected
sandbox's gateway port. The third Advisor pass found that sequential
managed requests could delay a failed fingerprint decision. CodeRabbit
found that an invalid persisted gateway identity could fail only after a
route was committed. The fourth commit bounds the whole fingerprint and
validates the gateway before mutation.

### Related issues

Refs #12285

## Changes

- Apply the longer limit after a managed install or owned-runtime
inspection. For later context-window checks, require a matching private
managed API key, owner, and runtime receipt before using the longer
limit.
- Name the anonymous or authenticated fingerprint request that timed
out. Keep the fixed loopback endpoint, response-size limit,
authentication checks, and bounded requests.
- Pass the selected registry gateway port to context-window probes
during inference switching, rebuild, and clone. A non-default gateway
uses only its own managed owner, receipt, and API key to select the
longer limit.
- Extend focused tests for managed and operator timing, incomplete
managed state, all fingerprint timeout phases, onboarding, and status.
- Share one 90-second deadline across the managed fingerprint, shorten
each remaining curl allowance, and stop on the request that exhausts the
budget. Focused tests cover a 16-second-per-request bridge and aggregate
timeout.
- Validate the selected sandbox gateway port before inference route
mutation, then reuse it for Hermes and OpenClaw context-window checks. A
conflicting persisted identity fails without committing a route.
- Reject a conflicting persisted gateway name and port before managed
rebuild context-window probing, using the same identity check as
inference switching.
- Validate both persisted gateway fields before pending native-local
provider cleanup in `inference set`, so a rejected route cannot retire a
provider first.

- Keep protected-runtime inference receipts on a separate authenticated
E2E endpoint so the strict Ollama proxy-config response stays stable.
Forward only named response headers from the test recorder. Focused
proxy and E2E-support tests protect both contracts.

## Verification

- First commit `bb0bd31b83ffc373833d2180762cf761fb0a0dce`: 86 focused
CLI tests passed, 34 onboarding tests passed, and seven growth guardrail
tests passed.
- Second commit `c87fbef20d76f3334ad39441038025a116f6250d`: 76 focused
CLI tests and seven growth guardrail tests passed.
- Third commit `26bc480d1b71781ef6ba4f27662fb8542c181d6b`: 97 focused
CLI tests passed, including non-default gateway coverage for the
resolver and three callers. The source-architecture check, CLI type
check, formatter, lint, commit hooks, and isolated pre-push hooks
passed.
- Fourth commit `af5d9d28e30e1003c6588db021a2c68f4c628ff0`: 70 focused
llama.cpp and inference-set tests plus 14 Hermes tests passed. CLI type
checking passed with an 8 GiB Node heap; Oxlint, Oxfmt, commit hooks,
and the isolated pre-push hook passed.
- Fifth commit `8a74d9a2c539bdbf947167b63b298502b7bb6101`: merged
canonical `main` at `1e2b7d311ae585959cb9bfb21a90b1a603d4cffd`,
including dependency PR #13513. The overlapping rebuild preflight files
merged cleanly. All 119 focused CLI tests, CLI type checking with an 8
GiB Node heap, and `npm run validate:pr` passed. The normal push
pre-push hook passed, and GitHub marks the merge commit Verified.
- Sixth commit `75198410e909986645a8c292a0db521238848bbd`: asserted that
the gateway-scoped context window reaches the rebuild profile. The
focused test file passed 18/18 tests; `npm run validate:pr`, commit
hooks, and the normal pre-push hook passed. GitHub marks the commit
Verified.
- Seventh revision: integrated canonical `main` at
`841b01d30e6cda5ae2e0ceb93c0604ebf9443364`; commit
`7a475fa8e92f91c1aa0b81f27abaa33217fa6db3` rejects conflicting persisted
gateway identity before managed rebuild probing. The focused test file
passed 18/18 tests, CLI type checking passed with an 8 GiB Node heap,
the source architecture gate passed, and commit and normal pre-push
hooks passed. GitHub marks both published commits Verified.
- Eighth revision `1535be9c7e7e03fc5a40adc3a157038cf65b1ddc`:
consolidated the one-use managed rebuild gateway-port wrapper into the
existing canonical persisted gateway binding resolver. Three focused CLI
files passed 41/41 tests, repository architecture checks and CLI type
checking passed, `npm run validate:pr` passed, and normal commit and
push hooks passed. GitHub marks the commit Verified.
- Ninth revision `abe377b911994a1dc1487aeb57b46bd3e75c02cb`: merged
canonical `main` at `bbdd0bcf8913a537a1126a40a144bac4def5986f`,
including the reviewed Zod, body-parser, and Undici audit repair from PR
#13681. The previous-head managed-image audit failed on inherited
runtime graphs with those advisories; this PR changes no dependency
inputs of its own. The merge had no overlapping changed paths. Three
focused CLI files passed 41/41 tests; `npm run validate:pr` and normal
push hooks passed. GitHub marks the signed merge commit Verified. At
this head,
[CI](https://github.com/NVIDIA/NemoClaw/actions/runs/40234815519),
[managed-image
publication](https://github.com/NVIDIA/NemoClaw/actions/runs/40234815583),
and the [generic NVIDIA GPU
E2E](https://github.com/NVIDIA/NemoClaw/actions/runs/40234816970)
passed. The [Advisor
run](https://github.com/NVIDIA/NemoClaw/actions/runs/40236488391) had
nine clear specialists and zero P0/P1 findings, but its blocker gate
remained red on the unsupported Windows-on-Arm live-E2E recommendation.
- Tenth revision `f6a54181eef6e76bd748e27103555c741384e930`: merged
canonical `main` at `469591818feffee15bedf8704359298a6e47a399`,
including reviewed Node 24 and E2E runner updates. The PR-only diff
remains the same 24 source and test files. Three focused CLI test files
passed 97/97 tests. `NODE_OPTIONS=--max-old-space-size=8192 npm run
validate:pr` and the normal pre-push hook passed after installing the
repository-verified OpenShell SDK. GitHub marks the signed merge commit
Verified. [Exact-head
CI](https://github.com/NVIDIA/NemoClaw/actions/runs/40332473018) passed.
The [automatic Advisor
run](https://github.com/NVIDIA/NemoClaw/actions/runs/40335472552)
completed with eight clear specialists, one previously declined deadline
P1, and one waived unsupported Windows-on-Arm E2E recommendation; its
blocker gate is red. [Managed-image
publication](https://github.com/NVIDIA/NemoClaw/actions/runs/40332473057)
and the [generic NVIDIA GPU
E2E](https://github.com/NVIDIA/NemoClaw/actions/runs/40332491821) passed
for this commit. Other recommended E2Es remain in progress or need
focused validation.

- Eleventh revision `a97d1c426727ff56c8839371a23e11c76d46b807`:
mechanically integrated canonical `main` at
`27aa219854271a2bea893f64d4af17c3e1eeb0bc`, including reviewed transient
NVIDIA inference handling from #13642. Nine focused CLI files passed
237/237 tests; CLI type checking with an 8 GiB Node heap, `npm run
validate:pr`, and normal commit and pre-push hooks passed. GitHub marks
the signed merge commit Verified. [Exact-head
CI](https://github.com/NVIDIA/NemoClaw/actions/runs/40360515120),
[managed-image
publication](https://github.com/NVIDIA/NemoClaw/actions/runs/40360515402),
and the [generic NVIDIA GPU
E2E](https://github.com/NVIDIA/NemoClaw/actions/runs/40360517824)
passed.
[Advisor](https://github.com/NVIDIA/NemoClaw/actions/runs/40364106574)
found one valid P1 native-local cleanup ordering defect, repaired by the
twelfth revision; its blocker gate also remained red on the unsupported
Windows-on-Arm live E2E recommendation.
- Twelfth revision `1d7ce9899e253dcfe088198576835f2af2134a54`: fixes the
Advisor P1 that allowed pending native-local provider cleanup before a
conflicting persisted gateway identity was rejected. The regression test
reproduced an unintended `deleteProvider` call on the prior code and now
passes. All 26 `inference set` test files passed, 492/492 tests; CLI
type checking with an 8 GiB Node heap, normal commit hooks, and normal
pre-push publication and CLI TypeScript checks passed. GitHub marks the
commit Verified. For this exact head, [required
CI](https://github.com/NVIDIA/NemoClaw/actions/runs/40370552031),
[managed-image
publication](https://github.com/NVIDIA/NemoClaw/actions/runs/40370552081),
and the automatic [generic NVIDIA GPU
E2E](https://github.com/NVIDIA/NemoClaw/actions/runs/40370551233)
passed.
[Advisor](https://github.com/NVIDIA/NemoClaw/actions/runs/40374189950)
reported nine clear specialists and zero P0/P1 findings, while its
unsupported Windows-on-Arm live-E2E blocker gate remained red. Focused
[staging
Launchable](https://github.com/NVIDIA/NemoClaw/actions/runs/40392951526)
passed for this exact commit, including candidate provenance, restart,
inference, and cleanup. The first focused [protected
GPU](https://github.com/NVIDIA/NemoClaw/actions/runs/40395867955) run
failed when OpenClaw/Ollama answered `LONG` to the exact-`PONG` agent
prompt. A single bounded [same-head
diagnostic](https://github.com/NVIDIA/NemoClaw/actions/runs/40408527670)
passed both protected image startup jobs, all three Ollama agent cases,
vLLM readiness/CUDA, and OpenClaw/vLLM; it failed when Hermes/vLLM
answered `PING localhost completed successfully.` to the exact-`PONG`
prompt. NIM and rollback were not reached; failure-path cleanup passed
with zero failures. The deterministic Advisor risk plan includes this
protected-runtime job as required, so it remains a failed validation
result, separate from the [Windows-on-Arm
waiver](#13561 (comment)).
[Failure
classification](#13561 (comment))
preserves the candidate-ownership uncertainty; no third identical run is
planned.
- Thirteenth revision `ce6c6cd40a45ad397183d51e5150524aa2521ac5`:
integrated canonical `main` at
`dff9a02eb3e7c7354ef047db148b342ca0eb5bc9` in signed merge
`7e8066f9df5582edcd42e8723927e4f6a9296bd4`, then added a test-only
protected-runtime harness repair. The direct local-provider probe still
requires `PONG`; a completed agent turn now accepts a nonempty answer
that differs from `PONG`, while rejecting prompt echo and incomplete
turns. Thirteen focused test files passed 327/327 tests; `npm run
e2e:assertions:check`, `npm run validate:pr`, and the normal pre-push
publication and CLI TypeScript checks passed. GitHub marks both new
commits Verified. Exact-head CI and reviews are pending. The
protected-runtime workflow executes its test harness from trusted
`main`, so a pre-merge manual rerun cannot exercise this PR's new
assertion. The prior protected-runtime failures remain unqualified for
NIM and rollback; no new live pass is claimed.
- Fourteenth revision `1f5129a4de75dc164c4594da98ee47b3d71e099b`:
repairs the exact-head Advisor P1 verification gap. Protected-runtime
now requires a completed request through the configured local model
during each agent turn, so nonempty diagnostics alone cannot pass. The
existing authenticated Ollama proxy reports completed chat requests;
vLLM and NIM use an authenticated test-only recorder that counts
successful completions for the expected model. Focused integration tests
passed 132/132, E2E support tests passed 37/37, CLI type checking and
E2E assertion checks passed, and normal commit and pre-push publication
hooks passed. GitHub marks the commit Verified. This harness is loaded
from trusted `main` by the protected-runtime workflow, so a pre-merge
run cannot test it. Rebecca chose to monitor protected-runtime E2E after
merge. No protected-runtime live pass is claimed for this revision; NIM
and rollback remain unqualified until that run. Exact-head CI, Advisor,
and human review are pending.
- Fifteenth revision `613b5deb6fa210b994fcf36c5035a0dd896bea12`:
restores the strict authenticated `/_nemoclaw/proxy-config` response and
puts completed-request counts on a separate authenticated
`/_nemoclaw/e2e-inference-receipt` endpoint. The protected inference
recorder now forwards only named response headers; its test confirms
arbitrary backend headers do not pass through. The receipt contract test
moved to E2E support so stable integration shard balance and test-file
size budgets both pass. On this exact commit, 161 focused integration
tests and five E2E-support tests passed; one platform-specific
integration test skipped. The Vitest project census, CLI typecheck with
an 8 GiB heap, normal commit hooks and pre-push publication checks
passed. GitHub marks the signed commit Verified. No protected-runtime,
NIM, rollback, or Yukon live pass is claimed.
- Sixteenth revision `c775d371ae7629f69029fd75afb490fe7b03e5af`: raises
only the PR `static-checks` job timeout from 20 to 22 minutes, as
Rebecca approved. Both prior-head attempts reached the 20-minute job
limit during unchanged pinned v1 consumer tests; the latest `main` job
passed in 19m27s. The focused PR workflow contract passed 68 tests; YAML
parsing, `git diff --check`, `npm run validate:pr`, and normal commit
and pre-push hooks passed. GitHub marks the signed commit Verified. On
the prior head, all 12 CLI shards and CodeQL passed, and managed-image
publication passed after one Hermes amd64 `npm ci` network retry. The
automatic generic GPU E2E stopped in preflight while waiting for
managed-image publication, so it provides no live pass. Fresh exact-head
CI, image, E2E, automated reviews, and human approval are pending.
- Seventeenth revision `ba6ce36d6e390e705089fdf13c85f11b297fd3b0`:
repairs the prior-head Advisor P1 by counting completed Ollama chat
requests only for the selected model and requiring a matching
authenticated model-scoped receipt. It also validates upstream HTTP
status before forwarding in the protected inference test recorder,
addressing CodeQL alert #3785 while retaining the response-header
allowlist. Two focused E2E-support test files, 122 managed-image
contract integration tests, and seven growth guardrail tests passed; CLI
type checking with an 8 GiB heap, E2E assertion census, 18 repository
checks, and normal commit and pre-push hooks passed. GitHub marks the
signed commit Verified. The prior head passed required CI but its CodeQL
app check and Advisor blocker failed on the findings repaired here;
managed-image arm64 activation failed after OpenShell reported the
sandbox not ready during rebuild, and the automatic generic GPU E2E
stopped at image preflight without a live pass. Exact-head CI, CodeQL,
image, E2E, Advisor, and human review are pending.
- Eighteenth revision `a0d3eb947df231704e1bd77c1fa60ee5a9b63046`:
updates the Ollama receipt reader test fixture to echo the selected
model and expect the model query parameter, preserving the vLLM receipt
case. This repairs the sole candidate-owned CLI shard failure on the
prior head. The focused E2E-support file passed 3/3 tests; formatting,
diff check, normal commit hooks, and normal pre-push publication and CLI
TypeScript checks passed. GitHub marks the signed commit Verified. On
the prior head, the managed-image qualification passed all-agent
activation on amd64, arm64, and rootless Podman, and the automatic
[generic NVIDIA GPU
E2E](https://github.com/NVIDIA/NemoClaw/actions/runs/40575505452) passed
with artifact upload. Required CI passed 11 of 12 CLI shards and static
checks; shard 6 failed on the stale test fixture, which also prevented
automatic Advisor scheduling. The Security / Code Scanning JavaScript
job was canceled, so no green security gate is claimed. Fresh exact-head
CI, CodeQL, image, E2E, Advisor, and human review are pending.
- `NODE_OPTIONS=--max-old-space-size=8192 npm run typecheck:cli`:
passed. The default 4 GiB Node heap exhausted before the rerun.
- At `c87fbef`, `NODE_OPTIONS=--max-old-space-size=8192 npm run
validate:pr` passed, including repository hooks, builds, and pre-push
TypeScript checks.
- The diff contains no secrets, API keys, or credentials.

The fourth commit's manual Advisor review reported zero P0/P1 code
findings across nine specialists, but its blocker gate failed on an
unresolved Windows-on-ARM/WSL2/Docker Desktop E2E recommendation with no
supported selector. Rebecca confirmed the Yukon board can be made
available for a one-off test, but live Windows-on-ARM evidence is not
required for this PR. That decision does not make the Advisor gate
green. Advisor also recommended existing `llama-cpp-generic-gpu` and
`llama-cpp-dgx-spark-qualification` jobs. The exact-head generic-GPU run
[39517636312](https://github.com/NVIDIA/NemoClaw/actions/runs/39517636312)
stopped before testing because managed-image publication failed on
inherited mcporter advisories GHSA-22jm-h49p-29qw and
GHSA-46jr-4wx8-v453. Dependency PR #13513 is merged into the fifth
commit. Fifth-head CI passed and its Advisor review found zero P0/P1
defects across nine specialists, but the blocker gate failed on an
unsupported Windows-on-Arm E2E recommendation. The sixth-head Advisor
reported a real rebuild gateway identity inconsistency, repaired by the
seventh commit. Its proposed increase of the 90-second aggregate
fingerprint deadline is deferred: the Yukon evidence measures one
15.9-second `/health` request, without a full-request timing trace
showing that the deadline is too short. For exact head
`7a475fa8e92f91c1aa0b81f27abaa33217fa6db3`, required CI checks and
[managed-image
publication](https://github.com/NVIDIA/NemoClaw/actions/runs/39637664586),
and the [generic NVIDIA GPU
E2E](https://github.com/NVIDIA/NemoClaw/actions/runs/39637674363)
passed. The [Advisor
run](https://github.com/NVIDIA/NemoClaw/actions/runs/39640884068) had
nine clear specialists and zero P0/P1 code findings, but its blocker
gate failed on two unresolved Windows-on-Arm/WSL2/Docker Desktop
live-E2E recommendations with no supported selector. Its optional
`llama-cpp-dgx-spark-qualification` recommendation is unavailable
because no DGX runner is available; it has not run. On the Yukon board,
two exact-head runs passed the managed fingerprint stage, then the
OpenShell GPU container recreation entered `Error` before sandbox proof.
One earlier run reached the final inference proof and returned HTTP 403.
An exact-base run reproduced the original fingerprint timeout at stage
3, so it could not isolate the stage-6 failure. A further exact-head run
with `--no-sandbox-gpu` stopped at recipe admission: that flag skips the
required container CUDA proof, so it cannot validate this N1X managed
recipe and says nothing about current GPU health. No end-to-end Yukon
pass is claimed. The QA runtime was removed after these runs and the
shared model cache was preserved. The stage-6 and HTTP 403 symptoms are
tracked separately in
[#12287](#12287) and
[#13517](#13517); their
relationship to this change remains unproven. The GPU container
recreation implementation in `docker-gpu-patch.ts`,
`docker-gpu-patch-recreate.ts`, `docker-gpu-sandbox-create.ts`,
`docker-gpu-supervisor-reconnect.ts`, and
`sandbox-gpu-create-run-attempt.ts` is unchanged between the recorded PR
base and head. Issue #12287 records a similar WSL2 symptom before this
PR, but does not establish the cause on Yukon.

## Maintainer validation decision

For the prior PR commit, `1d7ce9899e253dcfe088198576835f2af2134a54`,
Rebecca [recorded the one-off Yukon manual-test plan and limited Advisor
live-E2E waiver for this exact
head](#13561 (comment)).
No Yukon pass is claimed. The Advisor P1 native-local cleanup finding is
repaired by this commit; all nine exact-head specialists reported clear
finding ledgers. The unsupported platform E2E gate remains red. Focused
staging and the [grouped exact-head E2E
run](https://github.com/NVIDIA/NemoClaw/actions/runs/40419525460)
passed. The grouped run verified ten supported deterministic selectors
across twelve jobs and twenty cases, with twenty cleanup records
reporting zero failures. The separate protected-runtime job remains
failed at strict agent-answer assertions; NIM and rollback were not
reached on this head. Independent human approval remains pending. The
waiver does not change a failed check or bypass branch protection.

For the prior PR commit, `a97d1c426727ff56c8839371a23e11c76d46b807`, the
branch includes the reviewed `main` fix for transient NVIDIA inference
failures. The previous-head [staging Launchable
E2E](https://github.com/NVIDIA/NemoClaw/actions/runs/40339547403) tested
`f6a54181eef6e76bd748e27103555c741384e930`: candidate and image
provenance passed, hosted and sandbox inference passed, then phase 6
failed when `nemoclaw start` could not obtain a trusted
`inference.local` result after a native configuration edit. The retained
cleanup record confirms the Brev workspace `ABSENT`. The merged
inference fix passed [its own staging
E2E](https://github.com/NVIDIA/NemoClaw/actions/runs/40332700478); the
combined PR commit still needs its own validation. The prior [grouped PR
E2E](https://github.com/NVIDIA/NemoClaw/actions/runs/40339485347) had
fifteen passing jobs but ended cancelled: `rebuild-openclaw` failed
during Docker DNS preflight and protected amd64 validation was
interrupted. The early [focused
dispatch](https://github.com/NVIDIA/NemoClaw/actions/runs/40345300013)
was cancelled before candidate work. These are not passing evidence for
the new head.

Rebecca [waived the Advisor's unsupported live Windows-on-Arm E2E
recommendation and recorded a one-off Yukon
plan](#13561 (comment)).
The Yukon test has not passed on this head. The prior Advisor blocker
gate was red, and the [declined 90-second deadline
recommendation](#13561 (comment))
remains excluded without full-path timing evidence. No DGX Spark runner
is available. Required CI, managed-image publication, the automatic
generic GPU E2E, and all nine Advisor specialist finding ledgers were
complete for the prior PR commit. At
`ce6c6cd40a45ad397183d51e5150524aa2521ac5`, required CI, managed-image
publication, and the automatic generic GPU E2E passed. Advisor found one
valid protected-runtime verification P1, addressed by
`1f5129a4de75dc164c4594da98ee47b3d71e099b`. At
`1f5129a4de75dc164c4594da98ee47b3d71e099b`, CI exposed the strict
proxy-config response regression and deterministic shard-balance
failure, and CodeQL flagged arbitrary recorder response headers. The
fifteenth revision repairs these candidate-owned findings. The same
prior head failed arm64 managed activation when OpenShell marked a
restarted Hermes sandbox unready, while amd64 and rootless Podman
activation passed. Its self-hosted sandbox-image build failed a pinned
get-stream checksum mismatch on unchanged image inputs; the generic GPU
E2E stopped at managed-image publication preflight. These failures do
not provide passing live evidence. The prior Advisor
unsupported-platform gate was red; prior-head staging passed, while
protected GPU qualification and independent human approval remain open.
The waiver does not turn a red check green or bypass branch protection.
The product code change remains the step-3 managed fingerprint fix;
later Yukon GPU recreation and inference-proof symptoms are tracked
separately.

## Review notes

The diff touches sensitive inference and onboarding paths. I reviewed
the four code commits and the current diff; the fifth commit integrates
`main`. Advisor identified two P1 findings on `bb0bd31`, addressed by
`c87fbef`, and one gateway-scoping finding on `c87fbef`, addressed by
`26bc480`. Advisor then found an aggregate fingerprint delay on
`26bc480`, and CodeRabbit found late gateway identity validation; both
are addressed by `af5d9d2`. The fourth commit's Advisor specialists
reported no code findings. The Advisor gate remains failed on the
unsupported Windows-on-ARM E2E recommendation, which is recorded
separately from candidate defects. CodeRabbit's latest summary reported
no actionable findings for `af5d9d2`; both earlier inline threads are
resolved and outdated. The fifth commit integrates `main`; its CI
passed, while its Advisor blocker gate failed on the unsupported
Windows-on-Arm E2E recommendation. CodeRabbit found a rebuild handoff
test gap on that head, addressed by the sixth commit. The sixth-head
Advisor found conflicting gateway identity handling in rebuild,
addressed by the seventh commit. A later seventh-head Advisor pass found
one redundant gateway-port wrapper; the eighth commit consolidates it
with the existing canonical binding resolver while preserving the
repository architecture budget. The proposed aggregate deadline increase
is excluded from this PR because no full-request timing evidence
establishes the need. Seventh-head CI and the generic GPU E2E passed.
The Advisor blocker remains red for unavailable Windows-on-Arm live
coverage; the optional DGX Spark E2E has no available runner. Neither
gate is presented as passing. Resume provider mismatch and Docker
authority drift are separate recovery failures outside this patch.

---

Signed-off-by: Rebecca Sliter <[email protected]>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **New Features**
* Managed llama.cpp runtimes receive longer time limits for model,
health, properties, and metrics checks.
* Context-window detection accounts for the selected gateway during
inference, onboarding, cloning, and rebuilds.

* **Bug Fixes**
* Managed llama.cpp checks identify the failed probe phase, and invalid
managed API keys are reported as authentication failures.
* Conflicting gateway settings are rejected before inference
configuration changes are applied.
  * Unmanaged runtimes retain standard probe time limits.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Rebecca Sliter <[email protected]>
Co-authored-by: Rebecca Sliter <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery bug-fix PR fixes a bug or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

actionRollback defaults sandbox name to "openclaw" when plan.json has no sandbox_name

4 participants