fix(status): report SSH-session count instead of a misleading Connected field - #7820
Conversation
…ed field `nemoclaw status` and `nemoclaw list` derived a `Connected:` field solely from the local interactive SSH-session count (getActiveSandboxSessions -> ps | grep ssh), not from gateway or messaging health. With a healthy foreground-managed gateway and a live Slack path but no SSH session open, the field printed `Connected: no`, so consumers that trust the summary classified an active agent as offline. - Rename the human-readable field to `SSH sessions:` (the term already used by `nemoclaw connect` and the docs) and report the count, or `none`. - Drop the redundant `connected` boolean from the `nemoclaw list --json` row and the `SandboxInventoryRow` type; it was derived from `activeSessionCount`, which already carries the honest value. The `●` list marker now reads `activeSessionCount` directly. - Update the command reference docs and add a regression test that zero sessions render `SSH sessions: none`, never connection-negative language. The genuine gateway-connectivity signal remains the doctor / `gateway: down` diagnostic, which is unchanged. Refs #7805 Signed-off-by: Dongni Yang <dongniy@nvidia.com>
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe CLI now reports active SSH session counts instead of derived connection states. Inventory data exposes ChangesSSH session reporting
Estimated code review effort: 2 (Simple) | ~15 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in commit d269872 in the TypeScript / code-coverage/cliThe overall coverage in commit d269872 in the Show a code coverage summary of the most impacted files.
Updated |
|
🌿 Preview your docs: https://nvidia-preview-pr-7820.docs.buildwithfern.com/nemoclaw |
PR Review Advisor — No blocking findings reportedAdvisor assessment: No blocking advisor findings reported Model lanes
6 additional E2E selections from the second opinionAdvisory only. The primary lane did not select these E2E jobs or targets.
Second-opinion E2E selections are advisory. They do not change the primary assessment or E2E / PR Gate. E2E guidanceAdvisory only. E2E / PR Gate selects and runs jobs independently. Recommended E2E: 1 optional E2E recommendation
This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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.
Inline comments:
In `@docs/reference/commands.mdx`:
- Line 1372: Update the `SSH sessions` documentation to state that the line is
emitted only when the active-session probe is available; when OpenShell or
session detection is unavailable, the line is omitted rather than reporting
`none`.
In `@src/lib/inventory/index.ts`:
- Around line 347-355: The list renderer in src/lib/inventory/index.ts lines
347-355 should preserve the existing session dot while emitting “SSH sessions:
<count|none>” for non-null activeSessionCount, using “none” for zero and
omitting the field when the probe is unavailable. Update
docs/reference/commands.mdx line 3084 to document this count-or-none output and
omission behavior; ensure the shared list rendering is authoritative for all
in-scope entrypoints.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 2ac85957-1284-4981-80bf-62fff8f6983f
📒 Files selected for processing (6)
docs/reference/commands.mdxsrc/lib/actions/sandbox/status-flow.test.tssrc/lib/actions/sandbox/status-text.tssrc/lib/inventory/index.test.tssrc/lib/inventory/index.tstest/cli/list-inference.test.ts
💤 Files with no reviewable changes (1)
- test/cli/list-inference.test.ts
|
Thanks @coderabbitai — resolutions below. Finding 1 (docs, Finding 2 (list renderer, |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
git show --no-patch --format='%H%n%s' f4e32b5d9 2>/dev/null || true
docs_file=$(fd -t f '^commands\.mdx$' | head -n 1)
inventory_file=$(fd -t f '^index\.ts$' src/lib/inventory | head -n 1)
printf '\n--- docs: relevant headings and SSH-session wording ---\n'
rg -n -C 4 'SSH sessions|### nemoclaw status|### nemoclaw list|session probe' "$docs_file"
printf '\n--- inventory: renderer/status symbols ---\n'
ast-grep outline "$inventory_file" --items all --type function --match 'renderSandboxInventoryText|showStatusCommand' --view expanded
printf '\n--- inventory: relevant implementation excerpts ---\n'
rg -n -A 45 -B 8 'function renderSandboxInventoryText|function showStatusCommand|SSH sessions|activeSessionCount' "$inventory_file"Length of output: 21596
🐇 ✓ ✏️ Learnings added
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/lib/actions/sandbox/status-flow.test.ts (1)
151-160: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winCover the complete SSH-session migration contract.
This only exercises
detected: truewith zero sessions and rejects the exact"Connected: no"string. It would still pass if an unavailable probe incorrectly renderedSSH sessions: none, or if the removed field returned as anotherConnected:value. Add adetected: falsecase expecting noSSH sessions:line, and assert no legacy field prefix (for example,/^\s*Connected:/m).As per path instructions, tests should prove the observable migrated contract rather than only a narrow implementation string.
🤖 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 `@src/lib/actions/sandbox/status-flow.test.ts` around lines 151 - 160, Add coverage to the SSH-session migration tests around showSandboxStatus: add a detected: false case that verifies the output contains no “SSH sessions:” line, and strengthen the existing detected: true assertion to reject any legacy “Connected:” field using a line-anchored prefix check rather than only “Connected: no”.Source: Path instructions
🤖 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 `@src/lib/actions/sandbox/status-flow.test.ts`:
- Around line 151-160: Add coverage to the SSH-session migration tests around
showSandboxStatus: add a detected: false case that verifies the output contains
no “SSH sessions:” line, and strengthen the existing detected: true assertion to
reject any legacy “Connected:” field using a line-anchored prefix check rather
than only “Connected: no”.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: cad0b2e4-940c-4a78-84ba-f777548e2a57
📒 Files selected for processing (2)
docs/reference/commands.mdxsrc/lib/actions/sandbox/status-flow.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- docs/reference/commands.mdx
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
cjagwani
left a comment
There was a problem hiding this comment.
Approved exact head 33f09f7 after the .98 maintainer gate. The SSH-session status change and added regression coverage have no remaining security blocker; all commits are validly signed, both advisor lanes report 0 findings, no unresolved current threads remain, the unrelated CI flake passed on retry, and trusted plan 255968d9 passed onboard repair and resume. Documentation review found no user-facing update needed.
|
Exact-head review remains approved at |
|
Correction to my prior handoff: conflict-free base refreshes are explicitly waived. Please do not merge main solely for base currency; preserving exact-head CI/E2E and documentation receipts is preferred unless GitHub reports a real conflict or reviewed behavior requires a change. The existing approval/review evidence remains in force, and I will continue monitoring mergeability. This is a plain coordination comment, not Changes Requested. |
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary Adds the canonical dated `v0.0.101` changelog entry that was missing when the release tag was cut. This post-release recovery records the shipped behavior on current `main` without changing or replacing the existing tag. ## Changes - Add `docs/changelog/2026-08-03.mdx` with the exact `## v0.0.101` heading, release summary, detailed behavior changes, support boundaries, and links to durable documentation. - [#7317](#7317) -> `docs/changelog/2026-08-03.mdx`: Records experimental OpenClaw Google Chat support and its restricted credential and webhook boundary. - [#7715](#7715) -> `docs/changelog/2026-08-03.mdx`: Records strict onboarding recovery state and authoritative resume identity. - [#7749](#7749) -> `docs/changelog/2026-08-03.mdx`: Records the provider-neutral policy seam and unchanged runtime support boundary. - [#7817](#7817) -> `docs/changelog/2026-08-03.mdx`: Records preserved Hermes home-channel assignments across rebuilds. - [#7820](#7820) -> `docs/changelog/2026-08-03.mdx`: Records the SSH-session status field correction. - [#7847](#7847) -> `docs/changelog/2026-08-03.mdx`: Records fail-closed credential filtering for migration and rebuild backups. - [#7870](#7870) -> `docs/changelog/2026-08-03.mdx`: Records sandbox-qualified in-sandbox host command hints. - [#7875](#7875) -> `docs/changelog/2026-08-03.mdx`: Records Microsoft Teams stop and start E2E coverage. - [#7885](#7885) -> `docs/changelog/2026-08-03.mdx`: Records Hermes managed gateway detection in status. - [#7889](#7889) -> `docs/changelog/2026-08-03.mdx`: Records policy-authenticated HTTPS Pin Runtime route revocation. - [#7891](#7891) -> `docs/changelog/2026-08-03.mdx`: Records default fallback for negative timeout and polling overrides. - [#7993](#7993) -> `docs/changelog/2026-08-03.mdx`: Records correct sibling detection during uninstall. - [#7995](#7995) -> `docs/changelog/2026-08-03.mdx`: Records absent configuration-hash handling before shields lock. - [#8001](#8001) -> `docs/changelog/2026-08-03.mdx`: Records the dormant atomic managed workload replacement foundation. - [#8029](#8029) -> `docs/changelog/2026-08-03.mdx`: Records repository terminology review in PR Review Advisor. - [#8031](#8031) -> `docs/changelog/2026-08-03.mdx`: Records provider-neutral managed snapshot authority. - [#8032](#8032) -> `docs/changelog/2026-08-03.mdx`: Records immutable managed clone handoff contracts. - [#8034](#8034) -> `docs/changelog/2026-08-03.mdx`: Records the dormant provider-owned clone transaction surface. - [#8035](#8035) -> `docs/changelog/2026-08-03.mdx`: Records the dormant Hermes managed clone broker boundary. - [#8036](#8036) -> `docs/changelog/2026-08-03.mdx`: Records the dormant transactional managed bootstrap boundary. - [#8037](#8037) -> `docs/changelog/2026-08-03.mdx`: Records dormant Docker bootstrap primitives and the unchanged provider support boundary. - [#8070](#8070) -> `docs/changelog/2026-08-03.mdx`: Records consolidated sandbox resource-limit E2E coverage. - [#8071](#8071) -> `docs/changelog/2026-08-03.mdx`: Records escaped and bounded CLI validation diagnostics. - [#8081](#8081) -> `docs/changelog/2026-08-03.mdx`: Records bounded linear snapshot Base64 validation. - [#8085](#8085) -> `docs/changelog/2026-08-03.mdx`: Records commit-bound workflow approval for eligible same-repository maintainers. - [#8088](#8088) -> `docs/changelog/2026-08-03.mdx`: Records Hermes managed-policy E2E selection. - [#8090](#8090) -> `docs/changelog/2026-08-03.mdx`: Records pinned CI search-tool provisioning. - [#8106](#8106) -> `docs/changelog/2026-08-03.mdx`: Records fallback from failed managed OpenShell gateway startup. - [#8107](#8107) -> `docs/changelog/2026-08-03.mdx`: Records Hermes adapter lifecycle E2E selection. - [#8128](#8128) -> `docs/changelog/2026-08-03.mdx`: Records the dormant transactional Docker bootstrap adapter and rollback authority. - [#8140](#8140) -> `docs/changelog/2026-08-03.mdx`: Records Slack conflict scope across independent OpenShell gateways. - [#8147](#8147) -> `docs/changelog/2026-08-03.mdx`: Records completion of durable v0.0.100 documentation audit follow-ups. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [x] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [ ] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [x] Tests not applicable — justification: This documentation-only recovery does not change executable behavior. - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [ ] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [ ] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Documentation Writer Review - [x] Documentation writer subagent reviewed the completed changes - Result: `docs-updated` - Evidence: Independently reviewed `docs/changelog/2026-08-03.mdx` at commit `0bebe1f568e3dc85cf410aac1dfb8f8830070b85`. Its blob is `82887920f9720eafd75db6b2271c35f7477edb9b`. The entry follows the writing guide, controlled terminology, changelog structure, MDX SPDX format, literal CLI-name rule, and root-absolute route requirements. It accurately records the `v0.0.100...v0.0.101` release range, Announcement #8162, accepted scope boundaries, and shipped security behavior. There are no code samples. Focused changelog tests and the documentation build pass for this commit. - Agent: Codex Desktop independent documentation writer <!-- docs-review-head-sha: 0bebe1f --> <!-- docs-review-agents-blob-sha: 3dd7c24 --> ## Security Review - Result: `PASS` - Reviewed commit: `0bebe1f568e3dc85cf410aac1dfb8f8830070b85` - Base commit: `643a4ab8b5f583d8555192a37927268b26022c51` - Findings: None. - Secrets and credentials: `PASS`. No credential values or secret files are present. - Input validation and data sanitization: `PASS`. No executable input path changes. - Authentication and authorization: `PASS`. No identity or permission logic changes. - Dependencies and third-party libraries: `PASS`. No dependency changes. - Error handling and logging: `PASS`. No runtime path changes; diagnostic-security claims are precise. - Cryptography and data protection: `PASS`. No implementation changes. - Configuration and security controls: `PASS`. No configuration, container, port, or HTTP changes. - Security testing: `PASS`. No coverage is removed; the entry records shipped test and security behavior. - System security: `PASS`. No runtime control changes; dormant and non-activation boundaries are explicit. - Agent: Codex Desktop independent security reviewer ## Verification - [ ] PR description includes a `Signed-off-by:` line and every commit appears as `Verified` in GitHub — verification is pending after commit `0bebe1f568e3dc85cf410aac1dfb8f8830070b85` is pushed. - [ ] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run validate:pr` passed after refreshing `origin/main` when hooks were skipped or unavailable — commit hooks passed; pre-push is pending. - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — tests are not applicable to this documentation-only recovery. - [x] Applicable broad gate passed — not applicable to this documentation-only recovery. - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, credentials, or private keys are added by this diff. - [ ] `npm run docs` builds without warnings (doc changes only) — GitHub documentation checks are pending. - [x] Doc pages follow the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) — independent documentation review passed. - [x] New doc pages include SPDX header and frontmatter (new pages only) — the native changelog entry uses the required parser-safe MDX SPDX comment and intentionally has no frontmatter. GitHub CI is authoritative. Focused changelog tests and `npm run docs` passed after the merge refresh. --- Signed-off-by: Apurv Kumaria <akumaria@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added experimental Google Chat support. * Improved runtime and session status visibility. * Added onboarding recovery and persistence safeguards. * Added snapshot validation and dormant managed-workload support. * **Bug Fixes** * Improved backup sanitization, route handling, and gateway reliability. * **Documentation** * Added the v0.0.101 changelog and related updates. * **Tests** * Expanded end-to-end coverage and strengthened trusted CI validation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Apurv Kumaria <akumaria@nvidia.com> Signed-off-by: Carlos Villela <cvillela@nvidia.com> Co-authored-by: Carlos Villela <cvillela@nvidia.com> Co-authored-by: Senthil Ravichandran <senthilr@nvidia.com>
Summary
nemoclaw statusandnemoclaw listprinted aConnected:field that was derived only from the local interactive SSH-session count (ps | grep ssh), not from gateway or messaging health. A healthy foreground-managed gateway with a live Slack path but no open SSH session therefore showedConnected: no, and consumers that trust the summary classified an active agent as offline. This renames the field toSSH sessions:(reporting the count, ornone) so it names what it actually measures, and drops the redundant, identically-misleadingconnectedboolean fromnemoclaw list --json.Related Issue
Closes #7805
Scope note. This resolves the reported defect by removing the misleading signal: the
Connected:line and thenemoclaw list --jsonconnectedboolean no longer report SSH-session presence as connection state, so an active agent is never misclassified as offline. It does not add a positive "effective managed Gateway and messaging state" indicator (the other half of the Expected Result); the genuine gateway diagnostic already exists as thegateway: down [state] (reason)line thatnemoclaw statusprints and exits1on. If you want the affirmative gateway/messaging readout, please reopen and we'll scope it as a follow-on.Changes
Connected:line toSSH sessions:innemoclaw status(status-text.ts) andnemoclaw list(inventory/index.ts); it reports the active SSH-session count, ornone.SSH session(s)is the term already used bynemoclaw connectand the command docs.connectedboolean from thenemoclaw list --jsonrow and theSandboxInventoryRowtype. It was derived fromactiveSessionCount, which already carries the honest value; the●list marker now readsactiveSessionCountdirectly (threshold> 0unchanged, so marker behavior is identical). This is a small--jsoncontract change (a redundant field is dropped, not added).docs/reference/commands.mdx(and the regenerated agent-variant mirrors) for the renamed field.status-flow.test.ts,#7805): a sandbox with zero SSH sessions rendersSSH sessions: noneand never connection-negative language.The genuine gateway-connectivity signal (the doctor checks and the
gateway: downexit-1 diagnostic) is intentionally unchanged.Type of Change
Quality Gates
Documentation Writer Review
docs-updateddocs/reference/commands.mdxdocuments theactiveSessionCountinteger-or-null contract, removal ofconnected, and exact SSH-session text behavior. All three generated agent variants contain the corrected contract. Focused tests pass 91/91, andnpm run docspasses with 0 errors and two existing warnings.Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run check:diffpassed when hooks were skipped or unavailablegit diff --checkpass.npm run docsbuilds without errors (doc changes only; two existing Fern warnings)Signed-off-by: Dongni Yang dongniy@nvidia.com
Signed-off-by: Charan Jagwani cjagwani@nvidia.com
Summary by CodeRabbit
SSH sessions: <count>(orSSH sessions: none) for both per-sandbox and global views.activeSessionCountinstead of aconnectedboolean.