Skip to content

fix(cli): label the global status inference row as configured - #10471

Open
yanyunl1991 wants to merge 8 commits into
mainfrom
fix/status-configured-inference-label-10221
Open

fix(cli): label the global status inference row as configured#10471
yanyunl1991 wants to merge 8 commits into
mainfrom
fix/status-configured-inference-label-10221

Conversation

@yanyunl1991

@yanyunl1991 yanyunl1991 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Bare nemoclaw status printed each sandbox's configured route under a bare
Inference: label — the same field name nemoclaw <name> status uses for its
live route probe (Inference: healthy (<endpoint>)). One field name carrying
two different meanings reads as a broken rendering. This PR qualifies the
global row as Inference (configured): and reports the upstream endpoint the
registry already records, without adding any probe.

Closes #10221.

Reproduction

Executed on our Ubuntu 24.04 x86_64 test host (no GPU), matching the second
platform in the reporter's scope.

  1. Onboard against NVIDIA Endpoints with the reporter's model:
    nemoclaw onboard --name repro-10221 --non-interactive --yes --no-gpu
    with NEMOCLAW_PROVIDER=build,
    NEMOCLAW_MODEL=nvidia/nemotron-3-super-120b-a12b.
  2. nemoclaw status (no sandbox name)
  3. nemoclaw repro-10221 status (same sandbox, by name)
  4. Compare the Inference line between the two.

Environment

  • Test machine: our Ubuntu 24.04 x86_64 test host (no GPU)
  • Reproduced on v0.0.114 and a then-current main revision.
    git log confirms src/lib/inventory/index.ts has not changed this
    rendering path between the two.
  • Sandbox: repro-10221, agent OpenClaw, provider nvidia-prod, model
    nvidia/nemotron-3-super-120b-a12b, OpenShell 0.0.106 (docker)

Observed on main (before fix)

  Global status (registered sandboxes and host services):
  Sandboxes:
    repro-10221 * (nvidia/nemotron-3-super-120b-a12b) :18789
      Inference: nvidia-prod / nvidia/nemotron-3-super-120b-a12b
      SSH sessions: none

Per-sandbox status for the identical sandbox, in the same run:

  Sandbox-scoped status for 'repro-10221':
  Sandbox: repro-10221
    Model:    nvidia/nemotron-3-super-120b-a12b
    Provider: nvidia-prod
    Inference: healthy (https://inference.local/v1/models)
    Inference (route reachability): reachable (https://inference.local/v1/models)
    Inference (upstream): not probed (NVIDIA Endpoints health requires NVIDIA_INFERENCE_API_KEY; skipping model-invocation probe instead of reporting endpoint reachability as healthy.)

Observed on fix/... (after fix)

  Global status (registered sandboxes and host services):
  Sandboxes:
    repro-10221 * (nvidia/nemotron-3-super-120b-a12b) :18789
      Inference (configured): nvidia-prod / nvidia/nemotron-3-super-120b-a12b (https://integrate.api.nvidia.com/v1)
      SSH sessions: none

status --json, same run:

{
  "name": "repro-10221",
  "model": "nvidia/nemotron-3-super-120b-a12b",
  "provider": "nvidia-prod",
  "agent": "openclaw",
  "dashboardPort": 18789,
  "isDefault": true,
  "endpointUrl": "https://integrate.api.nvidia.com/v1"
}

Per-sandbox output is byte-identical before and after (verified by diffing the
Inference lines of both runs), so the probe format is untouched.

Analysis

Two renderers print a field literally named Inference, and they answer
different questions:

So the global view was not dropping a health word — it never had one. But
nothing in its output said so, and the unlabeled hop in the per-sandbox view
uses the identical field name, so the global row read as a degraded version of
the per-sandbox row. That ambiguity is the defect.

Reporting real reachability here would mean one SSH-plus-inference probe per
registered sandbox in a command documented as the host-wide summary that defers
live health to nemoclaw <name> status. That is a behavioral and performance
change, not a rendering fix, so this PR does not do it.

Separately, the registry already stores endpointUrl per sandbox
(src/lib/state/registry.ts; nvidia-prod resolves to
https://integrate.api.nvidia.com/v1 via src/lib/onboard/providers.ts), and
the global view discarded it — the reporter's "no endpoint URL" observation was
accurate about a real information gap.

Fix

  • Qualify the global row as Inference (configured):, reusing the per-sandbox
    Inference (<probe>): parenthetical convention rather than inventing a
    second vocabulary, so each view now names what it is reporting.
  • Append the registry's upstream endpoint when one is recorded.
  • resolveConfiguredEndpoint is the single source of truth for that value and
    is shared by the text renderer and buildStatusSandboxRow, so --json gains
    the same endpointUrl field — the text/JSON parity contract from fix(cli): report the sandbox agent in global list and status JSON #8710.

Boundaries the helper enforces:

  • The endpoint is passed through redactUrl, so a custom or legacy route
    carrying credentials in userinfo or a query parameter cannot leak into status
    output.
  • Terminal and bidirectional control characters are rendered as inert Unicode
    escapes instead of reaching the terminal.
  • It is omitted (and endpointUrl is null) when the registry records none or
    no configured provider owns it, so an unattributed endpoint is never shown.
  • It is suppressed for the default sandbox when the live gateway provider has
    drifted off the stored one. That row prefers the live provider ([NemoClaw][Linux][CLI&UX] nemoclaw list / status shows stale model after openshell inference set — live gateway state is queried but result is discarded #2369), and
    pairing a live provider with the stored endpoint would name an upstream the
    sandbox is no longer routed at.

Tests lock the qualified label, credential redaction, inert control rendering,
provider ownership, endpoint omission, route drift, and text/JSON parity. They
also assert that the global view never emits healthy, keeping it out of the
probe vocabulary.

Changes

  • src/lib/inventory/index.ts: qualify the global inference row, add
    resolveConfiguredEndpoint, add endpointUrl to StatusSandboxRow and
    SandboxEntry.
  • src/lib/inventory/status-configured-inference.test.ts: new co-located tests
    for the label, endpoint, redaction, inert controls, provider ownership,
    absent-endpoint, drift-suppression, non-default-row, and JSON-parity cases.
  • src/lib/inventory/index.test.ts: update the [NemoClaw][DGX Spark][Ubuntu 24.04][CLI] nemoclaw status omits Connected/Inference fields and shows cloudflared stopped with no context #2604 assertions to the
    qualified label.
  • docs/reference/commands.mdx: document the label, endpoint ownership,
    redaction and omission rules, agent-specific probe behavior, and that the
    global command runs no health probe.

Type of Change

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

Verification

  • npx prek run --all-files passes
  • npm test passes (touched files at minimum)
  • 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)

Maintainer validation

  • Integrated current main without file overlap.
  • 65 focused inventory tests passed.
  • CLI type-checking, repository checks, secret scanning, growth limits, and
    npm run validate:pr passed.
  • The documentation build completed with 0 errors and 2 existing warnings.
  • Independent technical, documentation, test-design, and nine-category security
    review passed on the combined tree.
  • Final change size: 4 files, +322/-7 (329 lines of churn). Tests account for
    +266/-4; production code accounts for +44/-3.

AI Disclosure

  • AI-assisted — tool: Claude Code

Signed-off-by: Yanyun Liao yanyunl@nvidia.com
Signed-off-by: Apurv Kumaria akumaria@nvidia.com

Summary by CodeRabbit

  • New Features

    • Global status now clearly labels configured inference routes.
    • Displays recorded upstream endpoints when available, with credentials redacted.
    • Omits stale, unavailable, or mismatched endpoints to prevent misleading information.
    • Text and JSON status views provide consistent configured-route details.
    • Configured status does not perform inference health checks; use sandbox-specific status for live reachability.
  • Documentation

    • Updated command reference to explain configured route and endpoint reporting.

Bare `nemoclaw status` printed each sandbox's registry route under a bare
`Inference:` label, the same field name `nemoclaw <name> status` uses for
its live route probe (`Inference: healthy (<endpoint>)`). One field name
carrying two different meanings reads as a broken rendering, which is how
it was reported: the global view looked like it had dropped the health
word and the endpoint.

Qualify the global row as `Inference (configured):`, following the
per-sandbox `Inference (<probe>):` convention, and append the upstream
endpoint the registry already records so the row says which upstream it
is routed at. The endpoint is redacted, is omitted when the registry has
none, and is suppressed for the default sandbox when the live gateway
route has drifted off the stored provider, since the stored endpoint no
longer describes the route in use. `status --json` reports the same value
as `endpointUrl` per sandbox row.

This view still runs no inference probe; reachability remains the job of
`nemoclaw <name> status`.

Fixes #10221

Signed-off-by: Yanyun Liao <yanyunl@nvidia.com>
@github-code-quality

github-code-quality Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall line coverage in commit 283cc1a in the fix/status-configure... branch remains at 96%, unchanged from commit 7cbc48d in the main branch.

TypeScript / code-coverage/cli

The overall line coverage in commit 283cc1a in the fix/status-configure... branch remains at 84%, unchanged from commit 7cbc48d in the main branch.


Updated August 31, 2026 18:32 UTC

@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 168c92ee-70dc-4b53-b90d-3486f67e8c9c

📥 Commits

Reviewing files that changed from the base of the PR and between 7cbc48d and 283cc1a.

📒 Files selected for processing (4)
  • docs/reference/commands.mdx
  • src/lib/inventory/index.test.ts
  • src/lib/inventory/index.ts
  • src/lib/inventory/status-configured-inference.test.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/lib/inventory/index.test.ts
  • docs/reference/commands.mdx
  • src/lib/inventory/index.ts

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

Global status now reports configured inference routes with redacted endpoints when applicable. It omits endpoints for missing or provider-drifted routes. Tests and documentation cover text and JSON output.

Changes

Configured inference status

Layer / File(s) Summary
Provider-aware endpoint resolution
src/lib/inventory/index.ts
Status rows now include configured endpoints. URL credentials and unsafe control characters are sanitized. Endpoints are omitted when providers differ or no provider owner exists.
Configured status rendering and validation
src/lib/inventory/index.ts, src/lib/inventory/status-configured-inference.test.ts, src/lib/inventory/index.test.ts, docs/reference/commands.mdx
Global status uses Inference (configured):. Tests and documentation cover endpoint display, omission, redaction, provider drift, JSON output, and the absence of health claims.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 283cc

This PR only clarifies the global status label and safely displays the configured endpoint; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: apurvvkumaria

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 3 files. (1 skipped: 1… 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 clearly identifies the primary change: labeling the global status inference row as configured.
Linked Issues check ✅ Passed The changes satisfy issue #10221 by distinguishing configured inference data from live reachability status, showing redacted endpoints when valid, suppressing stale default-sandbox endpoints, preservi…
Out of Scope Changes check ✅ Passed The implementation, documentation, and tests are directly related to the linked issue and stated objectives. No unrelated code changes are identified.
Full details: Linked Issues check

Explanation

The changes satisfy issue #10221 by distinguishing configured inference data from live reachability status, showing redacted endpoints when valid, suppressing stale default-sandbox endpoints, preserving JSON parity, and avoiding health probes in global status.

Full details: Docstring Coverage

Explanation

Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 3 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/status-configured-inference-label-10221

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

@github-actions

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit 3799152. Include the Advisor findings in the complete PR feedback collection. Verify and group valid findings before repair.

All previous runs

@yanyunl1991 yanyunl1991 added area: cli Command line interface, flags, terminal UX, or output bug-fix PR fixes a bug or regression v0.0.115 labels Aug 27, 2026
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@apurvvkumaria apurvvkumaria self-assigned this Aug 30, 2026
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@github-actions github-actions Bot added v0.0.119 v0.0.121 Release target and removed v0.0.118 labels Sep 1, 2026
@github-actions github-actions Bot removed the v0.0.120 label Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli Command line interface, flags, terminal UX, or output bug-fix PR fixes a bug or regression v0.0.121 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bare nemoclaw status shows provider/model instead of the documented healthy(endpoint) Inference format

3 participants