Skip to content
Closed
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
e324c5c
fix(onboard): confirm readiness after runtime commit
jyaunches Aug 31, 2026
dd0a9ff
fix(onboard): confirm GPU runtime readiness
jyaunches Aug 31, 2026
dd0a669
fix(onboard): scope readiness probes to gateway
jyaunches Aug 31, 2026
661786d
fix(onboard): scope readiness lists to gateway
jyaunches Aug 31, 2026
9f3629d
test(onboard): isolate scoped Hermes readiness
jyaunches Aug 31, 2026
8507e63
fix(onboard): clarify retained sandbox recovery
jyaunches Aug 31, 2026
e990fca
fix(onboard): reject mutable-name portable cleanup
jyaunches Aug 31, 2026
347f252
test(e2e): expect gateway-scoped readiness probes
jyaunches Aug 31, 2026
89b851a
test(security): expect scoped readiness commands
jyaunches Aug 31, 2026
474b30a
docs(onboard): describe readiness phase handling
jyaunches Aug 31, 2026
008e834
docs(onboard): make debounce removal evidence explicit
jyaunches Aug 31, 2026
030f18c
merge(main): refresh readiness handoff fix
jyaunches Aug 31, 2026
6f27475
refactor(onboard): consolidate readiness probes
jyaunches Aug 31, 2026
9a472e2
merge(main): refresh readiness handoff fix
jyaunches Aug 31, 2026
f9dd609
merge(main): refresh readiness handoff fix
jyaunches Aug 31, 2026
4b04b86
fix(onboard): close readiness recovery gaps
jyaunches Aug 31, 2026
383cfe8
fix(onboard): block on recovery persistence
jyaunches Aug 31, 2026
73b3f38
test(onboard): reject unscoped readiness probes
jyaunches Aug 31, 2026
a5ab267
merge: refresh main after review
jyaunches Aug 31, 2026
7d26771
test(onboard): remove unused CLI recovery input
jyaunches Aug 31, 2026
d1a395a
refactor(onboard): reuse readiness waiter
jyaunches Aug 31, 2026
10014df
merge(main): refresh readiness handoff fix
jyaunches Aug 31, 2026
65fe317
fix(onboard): isolate publication wait clock
jyaunches Aug 31, 2026
2308f78
docs(onboard): remove stale readiness override
jyaunches Aug 31, 2026
1219882
merge: resolve conflicts with main
github-actions[bot] Aug 31, 2026
b3bc573
fix(onboard): preserve committed readiness recovery
jyaunches Aug 31, 2026
c5b71b3
fix(onboard): align readiness authority checks
jyaunches Sep 1, 2026
7d28354
merge: synchronize main
jyaunches Sep 1, 2026
aa28948
test(onboard): expose persistence failure assertions
jyaunches Sep 1, 2026
70ab052
docs: explain retained sandbox recovery
jyaunches Sep 1, 2026
e2eb009
Merge branch 'main' into codex/fix-create-dashboard-readiness-handoff
prekshivyas Sep 1, 2026
04ffb8a
fix(onboard): close readiness review gaps
prekshivyas Sep 1, 2026
92bc83f
docs: clarify retained recovery evidence
jyaunches Sep 1, 2026
f7186c3
fix(onboard): stop on publication probe errors
jyaunches Sep 1, 2026
f721f64
merge: synchronize with main
prekshivyas Sep 1, 2026
f5dc929
merge: reconcile upstream branch updates
prekshivyas Sep 1, 2026
37ce787
fix(onboard): close retained recovery gaps
prekshivyas Sep 1, 2026
7c398b6
fix(onboard): preserve APF recovery persistence
prekshivyas Sep 1, 2026
29dc79d
merge: synchronize latest main
prekshivyas Sep 1, 2026
e9bd3ee
fix(onboard): close remaining recovery review gaps
prekshivyas Sep 1, 2026
b2c0271
merge: synchronize latest main
prekshivyas Sep 1, 2026
657df80
fix(onboard): align retained recovery evidence
prekshivyas Sep 1, 2026
dd1cdc2
fix(onboard): share post-create readiness deadline
prekshivyas Sep 1, 2026
3286fb5
fix(onboard): complete shared readiness review
prekshivyas Sep 1, 2026
93f84e2
fix(onboard): close final advisor findings
prekshivyas Sep 1, 2026
8bc3dd1
refactor(onboard): move create cleanup ownership
prekshivyas Sep 1, 2026
249896e
fix(onboard): isolate portable operation recovery
prekshivyas Sep 1, 2026
6b969be
fix(onboard): honor shared readiness deadline
prekshivyas Sep 1, 2026
9ec635c
fix(onboard): register recovery retry lazily
prekshivyas Sep 1, 2026
d925401
test(onboard): prove lazy recovery retry registration
prekshivyas Sep 1, 2026
0df0e81
refactor(onboard): inline sandbox publication wait
prekshivyas Sep 1, 2026
f25e9b3
test(onboard): keep identity deadline proof behavioral
prekshivyas Sep 1, 2026
b257062
refactor(onboard): centralize readiness ownership
prekshivyas Sep 1, 2026
aeba4fe
fix(onboard): preserve resumed readiness deadline
prekshivyas Sep 1, 2026
1752bfd
test(e2e): execute managed startup probe
prekshivyas Sep 1, 2026
692e3cb
fix(e2e): bind cleanup to durable sandbox identity
prekshivyas Sep 1, 2026
87fb85d
fix(e2e): refuse mutable-name sandbox deletion
prekshivyas Sep 1, 2026
950b63d
fix(onboard): scope recovery evidence to gateway
prekshivyas Sep 1, 2026
f6738ad
fix(onboard): preserve post-commit readiness budget
prekshivyas Sep 1, 2026
23e2b65
fix(onboard): retain cleanup recovery evidence
prekshivyas Sep 1, 2026
2399ade
merge(main): resolve onboarding handoff
prekshivyas Sep 1, 2026
89ea9ee
merge: resolve conflicts with main
github-actions[bot] Sep 1, 2026
c9d2f92
merge(main): refresh PR base
prekshivyas Sep 1, 2026
bdf22b7
merge(pr): preserve concurrent branch update
prekshivyas Sep 1, 2026
59ea6e2
test(onboard): consolidate identity deadline coverage
prekshivyas Sep 1, 2026
0cebdf3
test(onboard): consolidate create handoff coverage
prekshivyas Sep 1, 2026
8417d00
fix(onboard): persist verified readiness recovery
prekshivyas Sep 1, 2026
a17dd2c
merge(main): refresh readiness handoff
prekshivyas Sep 2, 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
7 changes: 0 additions & 7 deletions docs/reference/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2053,13 +2053,6 @@ It tolerates 30 consecutive `Error` observations by default so this transient re
Only `Error` that persists through the debounce count is terminal, unless the overall `NEMOCLAW_SANDBOX_READY_TIMEOUT` deadline expires first.
Every terminal observation outside the `Error` phase, including one with no reported phase, fails immediately.

If your host needs more observations for slower re-registration, raise the debounce. Raise `NEMOCLAW_SANDBOX_READY_TIMEOUT` too if the overall deadline is too short. To fail fast on the first `Error` poll, set the debounce to `1`:

```bash
export NEMOCLAW_SANDBOX_READY_ERROR_DEBOUNCE=1
$$nemoclaw onboard
```

If the failure persists after the debounce, the sandbox is stuck. Inspect the retained diagnostics and gateway state:

```bash
Expand Down
94 changes: 94 additions & 0 deletions src/lib/onboard/created-sandbox-finalization.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
finalizeCreatedSandbox,
} from "./created-sandbox-finalization";
import { getDcodeSelectionDrift } from "./dcode-selection-drift";
import * as dockerGpuLocalInference from "./docker-gpu-local-inference";
import type { HermesPortableConfiguredReceipt } from "./experimental/hermes-portable-receipt";
import { pendingSandboxCreateIdentityForBoundary } from "./sandbox-create/identity-boundary";
import type { SandboxGpuCreateFlowResult } from "./sandbox-gpu-create-flow";
Expand Down Expand Up @@ -984,6 +985,99 @@ describe("created OpenClaw sandbox finalization", () => {
});

describe("created sandbox completion actions", () => {
it("stops GPU dashboard and registry effects when committed readiness does not return", async () => {
vi.spyOn(
dockerGpuLocalInference,
"verifyGpuSandboxLocalInferenceAndCommitAfterReady",
).mockResolvedValue();
const ensureForward = vi.fn();
const registerCreatedSandbox = vi.fn();
const lifecycleRegistration = {
lifecycleGeneration: "generation-1",
lifecycleLiveIdentityFingerprint: "a".repeat(64),
};
const verifiedCreateBoundary = {
sandboxName: "alpha",
gatewayName: "nemoclaw",
gatewayPort: 8080,
...lifecycleRegistration,
route: "native" as const,
};
const completion = createCreatedSandboxCompletionActions(
{
finalization: { sandboxName: "alpha" },
registration: { gatewayName: "nemoclaw", gatewayPort: 8080 },
policy: {
initialPolicyPath: "/private/initial-policy.yaml",
compatibilityPolicyPath: null,
getVerifiedCreateBoundary: () => verifiedCreateBoundary,
getVerifiedCreateRegistrationAuthority: vi.fn(),
},
gpu: {
config: {} as SandboxGpuConfig,
provider: "nvidia-prod",
dockerDriverGateway: true,
verifyDirectSandboxGpu: vi.fn(),
runCaptureOpenshell: vi.fn(),
},
dashboard: {
chatUiUrl: "http://127.0.0.1:8643",
initialHermesState: { config: null, enabled: false },
releasePort: vi.fn(),
ensureForward,
getForwardPort: vi.fn(),
resolveHermesState: vi.fn(),
ensureHermesForward: vi.fn(),
},
workload: {},
} as never,
{
revalidateSandboxIdentity: vi.fn(),
discoverFreshOpenClawImagePluginInstalls: vi.fn(),
restoreRecreatedSandboxState: vi.fn(),
getDcodeSelectionDrift: vi.fn(),
note: vi.fn(),
error: vi.fn(),
exitProcess: vi.fn() as never,
registerCreatedSandbox,
},
);
const confirmManagedRuntimeCommitReadiness = vi.fn(() => {
throw new Error("managed runtime did not return to Ready");
});
const created = {
origin: "created",
createResult: { status: 0, output: "", sawProgress: true },
route: "native",
firstCreateOutput: "",
registryImageRef: null,
lifecycleRegistrationFields: { lifecycleGeneration: "generation-1" },
runtimePatch: {},
confirmManagedRuntimeCommitReadiness,
} as unknown as SandboxGpuCreateFlowResult;
const lifecycle = {
generation: "generation-1",
recordExactIdentity: vi.fn(),
capture: vi.fn(() => lifecycleRegistration),
revalidate: vi.fn(() => lifecycleRegistration),
};

await expect(
completion.complete(
created,
null,
"created",
true,
() => ({ lifecycleGeneration: "generation-1" }),
lifecycle,
),
).rejects.toThrow("managed runtime did not return to Ready");

expect(confirmManagedRuntimeCommitReadiness).toHaveBeenCalledOnce();
expect(ensureForward).not.toHaveBeenCalled();
expect(registerCreatedSandbox).not.toHaveBeenCalled();
});

it.each([
["ordinary", true, false],
["schema-5", false, true],
Expand Down
1 change: 1 addition & 0 deletions src/lib/onboard/created-sandbox-finalization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ export function createCreatedSandboxCompletionActions(
`committing GPU capability for sandbox '${options.finalization.sandboxName}'`,
),
);
await created.confirmManagedRuntimeCommitReadiness();
}
function recordHermesGpuProof(): void {
options.gpu.config.sandboxGpuProof = options.gpu.verifyDirectSandboxGpu(
Expand Down
24 changes: 22 additions & 2 deletions src/lib/onboard/experimental/hermes-portable-onboarding.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1346,19 +1346,39 @@ network_policies:
const run = createHermesPortableReadyRunner("alpha", "nemoclaw", capture);

expect(run(["sandbox", "get", "alpha"]).status).toBe(0);
expect(run(["sandbox", "delete", "alpha"]).status).toBe(0);
expect(run(["sandbox", "exec", "--name", "alpha", "--", "true"]).status).toBe(0);
expect(capture.mock.calls).toEqual([
[["sandbox", "get", "-g", "nemoclaw", "alpha"]],
[["sandbox", "delete", "-g", "nemoclaw", "alpha"]],
[["sandbox", "exec", "-g", "nemoclaw", "--name", "alpha", "--", "true"]],
]);
expect(() => run(["sandbox", "delete", "alpha"])).toThrow("unsupported OpenShell command");
expect(() => run(["sandbox", "get", "beta"])).toThrow("unsupported OpenShell command");
expect(() => run(["sandbox", "exec", "--name", "beta", "--", "true"])).toThrow(
"unsupported OpenShell command",
);
});

it("accepts readiness commands already scoped to the receipt gateway", () => {
const capture = vi.fn(() => ({
status: 0,
stdout: Buffer.from("ready"),
stderr: Buffer.alloc(0),
}));
const run = createHermesPortableReadyRunner("alpha", "nemoclaw", capture);

expect(run(["sandbox", "list", "-g", "nemoclaw"]).status).toBe(0);
expect(
run(["sandbox", "exec", "-g", "nemoclaw", "--name", "alpha", "--", "true"]).status,
).toBe(0);
expect(capture.mock.calls).toEqual([
[["sandbox", "list", "-g", "nemoclaw"]],
[["sandbox", "exec", "-g", "nemoclaw", "--name", "alpha", "--", "true"]],
]);
expect(() => run(["sandbox", "list", "-g", "other-gateway"])).toThrow(
"unsupported OpenShell command",
);
});

it("rejects exact-gateway identity that has not reached Ready (#9203)", () => {
const capture = vi
.fn()
Expand Down
6 changes: 6 additions & 0 deletions src/lib/onboard/sandbox-gpu-create-flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ export interface SandboxGpuCreateFlowDeps {
runCaptureOpenshell: RunCaptureOpenshell;
sandboxObserver: OpenShellSandboxObserver;
sleep: Sleep;
/** Production callers use the system clock; tests may inject publication-wait time. */
publicationNow?: () => number;
openshellArgv(args: string[]): string[];
verifyDirectSandboxGpu(sandboxName: string): SandboxGpuProofResult;
printCreateFailureDiagnostics?: (
Expand All @@ -309,6 +311,8 @@ export interface SandboxGpuCreateFlowDeps {

interface SandboxGpuCreateFlowResultCommon {
runtimePatch: ManagedBootstrapRuntimePatch;
/** Confirm executable Ready state after the managed runtime commit. */
confirmManagedRuntimeCommitReadiness(): Promise<void>;
route: SelectedDockerGpuRoute;
/** Mutable tag/reference retained only for registry and image-GC bookkeeping. */
registryImageRef: string | null;
Expand Down Expand Up @@ -628,6 +632,8 @@ export async function runSandboxGpuCreateFlow(

const common = {
runtimePatch: gpuCreateOutcome.value.runtimePatch,
confirmManagedRuntimeCommitReadiness:
gpuCreateOutcome.value.confirmManagedRuntimeCommitReadiness,
route: gpuCreateOutcome.route,
registryImageRef,
lifecycleRegistrationFields: {
Expand Down
Loading