Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
a40ca88
feat(readiness): define system readiness report contract
jyaunches Jul 23, 2026
20e905d
fix(readiness): format contract validator setup
jyaunches Jul 23, 2026
d8e5dea
fix(readiness): import schema as contract data
jyaunches Jul 23, 2026
a34e5c4
test(readiness): reject invalid calendar timestamps
jyaunches Jul 23, 2026
d6a3767
test(readiness): keep timestamp validator linear
jyaunches Jul 23, 2026
7b5e5b3
fix(readiness): format timestamp assertion
jyaunches Jul 23, 2026
8d76127
fix(readiness): apply biome assertion layout
jyaunches Jul 23, 2026
61afc45
fix(readiness): align schema version grammar
jyaunches Jul 23, 2026
97500e1
fix(readiness): apply contract formatting
jyaunches Jul 23, 2026
359d4c9
fix(readiness): name evidence IDs correctly
jyaunches Jul 25, 2026
6e7796e
merge: resolve conflicts with main
jyaunches Jul 27, 2026
f1c79e9
feat(readiness): project host observations into readiness report
jyaunches Jul 23, 2026
e157762
fix(readiness): preserve host CDI exclusions
jyaunches Jul 23, 2026
737f517
fix(readiness): preserve report outcome pairing
jyaunches Jul 27, 2026
cb2d07b
feat(cli): add read-only host readiness probe
jyaunches Jul 23, 2026
6714d63
fix(cli): satisfy readiness probe CI contracts
jyaunches Jul 23, 2026
28f9cab
test(cli): include host in command registry contract
jyaunches Jul 23, 2026
f3f1d85
fix(readiness): harden public report boundary
jyaunches Jul 23, 2026
5d54a71
chore(readiness): normalize effects test imports
jyaunches Jul 23, 2026
4b99325
test(readiness): assert presentation behavior
jyaunches Jul 23, 2026
05ad444
test(cli): validate nonzero readiness JSON
jyaunches Jul 23, 2026
0e40fda
test(cli): keep schema assertion behavioral
jyaunches Jul 23, 2026
7c3164d
test(cli): keep readiness schema helper linear
jyaunches Jul 23, 2026
897303d
test(cli): invoke readiness schema assertion directly
jyaunches Jul 23, 2026
50678c4
fix(readiness): preserve public outcome pairing
jyaunches Jul 27, 2026
0ad09b3
test(readiness): preserve outcome fixture pairing
jyaunches Jul 27, 2026
9d04090
docs(readiness): publish host probe reference
jyaunches Jul 27, 2026
871d4b1
fix(readiness): handle non-applicable GPU checks
jyaunches Jul 27, 2026
092d3aa
merge(readiness): incorporate host projection fixes
jyaunches Jul 27, 2026
ecdcd0b
fix(readiness): enforce public report boundaries
jyaunches Jul 27, 2026
b8f4381
docs(readiness): document host probe command
jyaunches Jul 27, 2026
4e40724
fix(readiness): preserve public report references
jyaunches Jul 27, 2026
7d249a7
merge: resolve conflicts with main
github-actions[bot] Jul 28, 2026
858a040
docs(readiness): align host probe contract
jyaunches Jul 28, 2026
7e3b601
fix(readiness): harden public report boundary
jyaunches Jul 28, 2026
d01f59f
Merge remote-tracking branch 'origin/main' into agent/issue-7412-read…
jyaunches Jul 28, 2026
9d29ff5
test(readiness): isolate reference boundary case
jyaunches Jul 28, 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
9 changes: 9 additions & 0 deletions docs/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ navigation:
- page: "Troubleshoot MCP Servers"
path: _build/agent-variants/reference/troubleshoot-mcp-servers.openclaw.generated.mdx
slug: troubleshoot-mcp-servers
- page: "System Readiness"
path: _build/agent-variants/reference/system-readiness.openclaw.generated.mdx
slug: system-readiness
- page: "Troubleshooting"
path: _build/agent-variants/reference/troubleshooting.openclaw.generated.mdx
slug: troubleshooting
Expand Down Expand Up @@ -682,6 +685,9 @@ navigation:
- page: "Troubleshoot MCP Servers"
path: _build/agent-variants/reference/troubleshoot-mcp-servers.deepagents.generated.mdx
slug: troubleshoot-mcp-servers
- page: "System Readiness"
path: _build/agent-variants/reference/system-readiness.deepagents.generated.mdx
slug: system-readiness
- page: "Troubleshooting"
path: _build/agent-variants/reference/troubleshooting.deepagents.generated.mdx
slug: troubleshooting
Expand Down Expand Up @@ -1052,6 +1058,9 @@ navigation:
- page: "Troubleshoot MCP Servers"
path: _build/agent-variants/reference/troubleshoot-mcp-servers.hermes.generated.mdx
slug: troubleshoot-mcp-servers
- page: "System Readiness"
path: _build/agent-variants/reference/system-readiness.hermes.generated.mdx
slug: system-readiness
- page: "Troubleshooting"
path: _build/agent-variants/reference/troubleshooting.hermes.generated.mdx
slug: troubleshooting
Expand Down
12 changes: 12 additions & 0 deletions docs/reference/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,18 @@ $$nemoclaw resources [--json]

If the gateway is not running, Kubernetes allocatable fields are omitted and host CPU/RAM totals are still shown.

### `$$nemoclaw host probe`

Inspect host readiness before onboarding without changing host, Docker, gateway, credential, policy, or sandbox state.
Use `--json` for the schema-versioned report.
The command exits with `0` for `supported`, `2` for `incompatible`, and `3` for `inconclusive`.

```bash
$$nemoclaw host probe [--json]
```

For capability IDs, evidence bounds, and compatibility guidance, refer to [System Readiness](system-readiness).

### `$$nemoclaw agents list`

List the installed agent runtimes that can be selected with `$$nemoclaw onboard --agent <name>`.
Expand Down
64 changes: 64 additions & 0 deletions docs/reference/system-readiness.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
title: "System Readiness"
sidebar-title: "System Readiness"
description: "Check host readiness before NemoClaw onboarding without changing system state."
description-agent: "Documents the read-only host readiness command, JSON contract, exit codes, redaction boundary, and mutation guarantees. Use when checking a host before onboarding or consuming readiness JSON."
keywords: ["nemoclaw host probe", "system readiness", "readiness json", "pre-onboarding check"]
content:
type: "reference"
---

Use the system readiness report to inspect a host before you run onboarding.
The command works without a registered gateway or sandbox.

## Run the readiness check

Run the human-readable check from the host:

```bash
$$nemoclaw host probe
```

Use JSON when another tool consumes the result:

```bash
$$nemoclaw host probe --json
```

Both presentations use the same structured report.
The JSON report includes its `schemaVersion`, `status`, `exitCode`, `observations`, `capabilities`, `qualifications`, `findings`, `evidence`, and `provenance`.
It also includes `mutated: false`.

## Interpret exit codes

The command uses deterministic exit codes:

| Exit code | Status | Meaning |
| --- | --- | --- |
| `0` | `supported` | Required readiness checks passed. |
| `2` | `incompatible` | A blocking or fatal finding prevents onboarding. |
| `3` | `inconclusive` | NemoClaw could not determine a required capability. |

The command writes a schema-valid JSON report for all three results.
Read the report before you handle a nonzero exit.

## Use the compatibility contract

The `schemaVersion` field uses `major.minor.patch` format.
Consumers must reject an unknown major version.
Consumers can ignore fields that they do not recognize within major version 1.
Use stable capability and finding IDs instead of parsing human summaries.
Treat bounded evidence as diagnostic context unless an observation, capability, or finding references that evidence ID.

## Understand the read-only boundary

`host probe` observes the host and does not run remediation.
Repeated runs do not change filesystem, service, Docker image or container, gateway, provider, credential, policy, or sandbox state.
A future command that changes the host must use a separate mutating mode.
That mode cannot run with `--json` probing.

The public report removes process environments and unrecognized fields from internal probe results.
It redacts token-shaped values and credential-bearing URLs.
It also limits finding summaries and command evidence before either presentation receives the report.
10 changes: 10 additions & 0 deletions docs/reference/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@ If you cannot add memory, configure at least 8 GB of swap to work around the iss

### Docker is not running

Check the host before onboarding:

```bash
$$nemoclaw host probe
```

The command does not start Docker or apply a repair.
A `host.docker.daemon_unreachable` finding means Docker is installed but NemoClaw cannot reach the daemon.
For JSON output and exit-code details, refer to [System Readiness](system-readiness).

The installer and onboard wizard require Docker to be running.
If you see a Docker connection error, start the Docker daemon:

Expand Down
131 changes: 131 additions & 0 deletions src/commands/host/probe.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

import Ajv2020, { type AnySchema } from "ajv/dist/2020.js";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import systemReadinessSchema from "../../../schemas/system-readiness.schema.json" with {
type: "json",
};
import type { SystemReadinessReport } from "../../lib/readiness/types";

const mocks = vi.hoisted(() => ({
createHostReadinessReport: vi.fn(),
createPublicReadinessReport: vi.fn(),
renderReadinessReport: vi.fn(),
}));

vi.mock("../../lib/readiness/index", () => ({
createHostReadinessReport: mocks.createHostReadinessReport,
createPublicReadinessReport: mocks.createPublicReadinessReport,
renderReadinessReport: mocks.renderReadinessReport,
}));

import HostProbeCommand from "./probe";

type ReadinessOutcome =
| { status: "supported"; exitCode: 0 }
| { status: "incompatible"; exitCode: 2 }
| { status: "inconclusive"; exitCode: 3 };

const READINESS_OUTCOMES = [
{ status: "supported", exitCode: 0 },
{ status: "incompatible", exitCode: 2 },
{ status: "inconclusive", exitCode: 3 },
] as const satisfies readonly ReadinessOutcome[];

function throwSchemaErrors(errors: unknown): never {
throw new Error(JSON.stringify(errors));
}

function assertSchemaValid(value: unknown): void {
const ajv = new Ajv2020({ allErrors: true, strict: true });
ajv.addFormat("date-time", true);
const validate = ajv.compile(systemReadinessSchema as AnySchema);
validate(value) || throwSchemaErrors(validate.errors);
}

function report(outcome: ReadinessOutcome): SystemReadinessReport {
return {
schemaVersion: "1.0.0",
...outcome,
mutated: false,
provenance: { nemoclawVersion: "0.1.0", observedAt: "2026-06-01T12:00:00.000Z" },
observations: [],
capabilities: [],
qualifications: [],
findings: [],
evidence: [],
};
}

describe("host probe command (#7412)", () => {
beforeEach(() => {
vi.clearAllMocks();
mocks.createHostReadinessReport.mockReturnValue(report(READINESS_OUTCOMES[0]));
mocks.createPublicReadinessReport.mockImplementation((value) => value);
mocks.renderReadinessReport.mockReturnValue("System readiness: supported");
});

afterEach(() => {
vi.restoreAllMocks();
});

it.each(READINESS_OUTCOMES)("returns the deterministic $status exit code", async (outcome) => {
const previousExitCode = process.exitCode;
process.exitCode = undefined;
mocks.createHostReadinessReport.mockReturnValueOnce(report(outcome));

try {
await HostProbeCommand.run([], process.cwd());
expect(process.exitCode).toBe(outcome.exitCode);
} finally {
process.exitCode = previousExitCode;
}
});

it.each(READINESS_OUTCOMES)("emits schema-valid JSON for $status hosts", async (outcome) => {
const expectedReport = report(outcome);
mocks.createHostReadinessReport.mockReturnValueOnce(expectedReport);
const log = vi.spyOn(console, "log").mockImplementation(() => undefined);
const previousExitCode = process.exitCode;
process.exitCode = undefined;

try {
await HostProbeCommand.run(["--json"], process.cwd());
const output = JSON.parse(String(log.mock.calls.at(-1)?.[0]));

assertSchemaValid(output);
expect(output).toEqual(expectedReport);
expect(process.exitCode).toBe(outcome.exitCode);
expect(mocks.renderReadinessReport).not.toHaveBeenCalled();
} finally {
process.exitCode = previousExitCode;
}
});

it("uses one readiness report for human output (#7412)", async () => {
const publicReport = report(READINESS_OUTCOMES[0]);
const log = vi.spyOn(console, "log").mockImplementation(() => undefined);
mocks.createPublicReadinessReport.mockReturnValueOnce(publicReport);

await HostProbeCommand.run([], process.cwd());

expect(mocks.createHostReadinessReport).toHaveBeenCalledWith({ nemoclawVersion: "0.1.0" });
expect(mocks.createPublicReadinessReport).toHaveBeenCalledWith(
mocks.createHostReadinessReport.mock.results[0]?.value,
);
expect(mocks.renderReadinessReport).toHaveBeenCalledWith(publicReport);
expect(log).toHaveBeenCalledWith("System readiness: supported");
});

it("repeats through the observation-only dependency graph", async () => {
vi.spyOn(console, "log").mockImplementation(() => undefined);

await HostProbeCommand.run([], process.cwd());
await HostProbeCommand.run(["--json"], process.cwd());

expect(mocks.createHostReadinessReport).toHaveBeenCalledTimes(2);
expect(mocks.createPublicReadinessReport).toHaveBeenCalledTimes(2);
expect(mocks.renderReadinessReport).toHaveBeenCalledTimes(1);
});
});
41 changes: 41 additions & 0 deletions src/commands/host/probe.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

import { NemoClawCommand } from "../../lib/cli/nemoclaw-oclif-command";
import {
createHostReadinessReport,
createPublicReadinessReport,
renderReadinessReport,
} from "../../lib/readiness";

export default class HostProbeCommand extends NemoClawCommand {
static id = "host:probe";
static strict = true;
static enableJsonFlag = true;
static summary = "Report host readiness without changing the system";
static description =
"Inspect host capabilities before onboarding. The command does not remediate findings or change host, Docker, gateway, credential, policy, or sandbox state.";
static usage = ["host probe [--json]"];
static examples = ["<%= config.bin %> host probe", "<%= config.bin %> host probe --json"];
static flags = {};
static publicDisplay = [
{
usage: "nemoclaw host probe",
description: "Report host readiness without changing the system",
flags: "[--json]",
group: "Troubleshooting",
scope: "global",
order: 37.5,
},
] as const;

public async run(): Promise<unknown> {
await this.parse(HostProbeCommand);
const report = createPublicReadinessReport(
createHostReadinessReport({ nemoclawVersion: this.config.version }),
);
this.setExitCode(report.exitCode);
if (this.jsonEnabled()) return report;
this.log(renderReadinessReport(report));
}
}
Loading
Loading