Skip to content

fix(docs): drop the unsupported audit option from the documented logs command - #8334

Merged
jyaunches merged 3 commits into
mainfrom
fix/troubleshoot-mcp-logs-flag
Aug 5, 2026
Merged

fix(docs): drop the unsupported audit option from the documented logs command#8334
jyaunches merged 3 commits into
mainfrom
fix/troubleshoot-mcp-logs-flag

Conversation

@laitingsheng

@laitingsheng laitingsheng commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

The MCP troubleshooting page told readers to run logs --audit, but the sandbox logs command declares only --follow, --tail/-n, and --since and rejects any other flag, so the documented invocation exited with Nonexistent flag: --audit. The page now shows the supported invocation and states that the command already reads both OpenClaw gateway output and OpenShell audit events.

Related Issue

Fixes #8315

Changes

  • Correct the audit-record lookup in docs/reference/troubleshoot-mcp-servers.mdx to logs --tail 200, name the two log sources with the wording already used in docs/reference/commands.mdx, and state the warning path when OpenShell audit logs cannot be enabled.
  • Add test/cli/logs-documented-invocations.test.ts, which collects every runnable logs invocation from the published pages and runs each one through the CLI, so a documented flag that the parser rejects fails the suite.

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)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • 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

  • Documentation writer subagent reviewed the completed changes
  • Result: docs-updated
  • Evidence: docs/reference/troubleshoot-mcp-servers.mdx. An independent review confirmed that the documentation and command behavior agree, published routes remain valid, and the completed changes have no controlled-word or formatting findings. No further documentation changes are needed.
  • Agent: Codex

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub
  • 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
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result or justification: npx vitest run --project integration test/cli/logs-documented-invocations.test.ts test/cli/logs.test.ts — 2 files, 22 tests passed. With the old --audit line restored, the new file fails on Nonexistent flag: --audit.
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — command/result:
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run 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)

Signed-off-by: Tinson Lai tinsonl@nvidia.com

Summary by CodeRabbit

  • Documentation

    • Updated troubleshooting guidance to use nemoclaw logs --tail 200.
    • Clarified that logs include gateway output and OpenShell audit events.
    • Documented warnings that may appear when audit logging cannot be enabled.
  • Tests

    • Added validation to ensure documented log commands are runnable and use supported options.

… command

The sandbox logs command already returns OpenShell audit records, and its
parser rejects any flag it does not declare, so the documented invocation
failed. A test now runs every documented logs invocation through the CLI.

Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The troubleshooting documentation removes the unsupported --audit option and explains combined log output. A new test discovers runnable nemoclaw logs commands in published MDX files and verifies their execution.

Changes

Logs documentation and validation

Layer / File(s) Summary
Combined logs documentation and validation
docs/reference/troubleshoot-mcp-servers.mdx, test/cli/logs-documented-invocations.test.ts
The troubleshooting command now uses combined logs without --audit. The test discovers documented commands, requires at least five invocations, and checks exit status and unsupported-flag errors.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 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
Linked Issues check ✅ Passed The documentation removes the unsupported --audit flag and the test verifies documented logs commands execute successfully, satisfying issue #8315.
Out of Scope Changes check ✅ Passed All changes support issue #8315 by correcting the documentation and adding a regression test for documented logs commands.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main change: removing the unsupported --audit option from the documented logs command, which aligns with the PR objectives and file modifications.
✨ 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/troubleshoot-mcp-logs-flag

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

@github-code-quality

github-code-quality Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit 0bf2442 in the fix/troubleshoot-mcp... branch remains at 96%, unchanged from commit 2b68aa1 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit 0bf2442 in the fix/troubleshoot-mcp... branch remains at 81%, unchanged from commit 2b68aa1 in the main branch.

Show a code coverage summary of the most impacted files.
File main 2b68aa1 fix/troubleshoot-mcp... 0bf2442 +/-
src/lib/domain/.../connect-env.ts 97% 89% -8%
src/lib/credentials/store.ts 56% 55% -1%
src/lib/inferen...er-discovery.ts 88% 87% -1%
src/lib/sandbox...rce-identity.ts 87% 87% 0%
src/lib/shields/index.ts 73% 74% +1%

Updated August 05, 2026 13:28 UTC

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

@laitingsheng laitingsheng added area: cli Command line interface, flags, terminal UX, or output bug-fix PR fixes a bug or regression labels Aug 5, 2026

@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.

Actionable comments posted: 2

🧹 Nitpick comments (1)
test/cli/logs-documented-invocations.test.ts (1)

54-62: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use behavior-oriented titles and add the issue suffix.

Add (#8315) to the parent describe title. Rename the child titles to state the documented command behavior.

Proposed fix
-describe("documented sandbox logs invocations", () => {
+describe("sandbox logs commands documented in published pages run successfully (`#8315`)", () => {
@@
-  it("collects runnable logs invocations from the published pages", () => {
+  it("documents at least five runnable sandbox logs commands", () => {
@@
-    it(`runs the invocation documented at ${reference}`, ({ resources }) => {
+    it(`accepts the sandbox logs command documented at ${reference}`, ({ resources }) => {

As per coding guidelines, use behavior-oriented test titles and place local issue references in a final (#1234) suffix.

🤖 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 `@test/cli/logs-documented-invocations.test.ts` around lines 54 - 62, Update
the parent describe title in the documented logs invocation tests to include the
issue suffix (`#8315`), and rename the child test titles to describe the
documented command behavior rather than implementation details or references.
Keep each issue reference, if present, as the final suffix.

Source: Coding guidelines

🤖 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/troubleshoot-mcp-servers.mdx`:
- Line 149: Update the lead-in sentence for the `logs` command to end with a
period, leaving the command block and surrounding documentation unchanged.

In `@test/cli/logs-documented-invocations.test.ts`:
- Around line 22-51: Remove the five inline if statements from walkMdxFiles and
documentedLogsInvocations. Replace directory/file exclusion and invocation
filtering with linear map/filter operations or named helper predicates,
preserving _build exclusion, recursive traversal, .mdx selection,
placeholder/shell-syntax skipping, and invocation construction.

---

Nitpick comments:
In `@test/cli/logs-documented-invocations.test.ts`:
- Around line 54-62: Update the parent describe title in the documented logs
invocation tests to include the issue suffix (`#8315`), and rename the child test
titles to describe the documented command behavior rather than implementation
details or references. Keep each issue reference, if present, as the final
suffix.
🪄 Autofix

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: f91b43ba-031f-4ecd-9610-9cc08df8900b

📥 Commits

Reviewing files that changed from the base of the PR and between 2b90d18 and 952aa99.

📒 Files selected for processing (2)
  • docs/reference/troubleshoot-mcp-servers.mdx
  • test/cli/logs-documented-invocations.test.ts

Comment thread docs/reference/troubleshoot-mcp-servers.mdx Outdated
Comment thread test/cli/logs-documented-invocations.test.ts Outdated
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings reported

Advisor assessment: No blocking advisor findings reported
Next action: Review the warnings below.
Findings: 0 blockers · 1 warning · 0 suggestions

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 1 warning · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Model comparison: normalized findings differ; normalized terminology decisions differ; normalized E2E selections match; Nemotron reported the same number of blockers, 1 fewer warning, the same number of suggestions.

Second-opinion terminology and E2E selections are advisory. They do not change the primary assessment or E2E / PR Gate.

3 semantic terminology decisions

Terminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.

  • established — sandbox log at docs/reference/troubleshoot-mcp-servers.mdx:148: Keep `sandbox log`; repository documentation already uses it for this log surface.
  • established — OpenShell audit events at docs/reference/troubleshoot-mcp-servers.mdx:149: Keep `OpenShell audit events`; it matches the existing command and lifecycle documentation.
  • justified — policy denial events at docs/reference/troubleshoot-mcp-servers.mdx:156: Keep `policy denial events`; the modifier identifies the affected troubleshooting evidence.

E2E guidance

Advisory only. E2E / PR Gate selects and runs jobs independently.

Recommended E2E: None

1 warning · 0 suggestions

Warnings

Warnings do not block.

PRA-1 Warning — Document the `--since` log-source exception

  • Location: docs/reference/troubleshoot-mcp-servers.mdx:149
  • Category: docs
  • Problem: The new statement says that `logs` reads both OpenClaw gateway output and OpenShell audit events, but `logs --since <duration>` deliberately skips the OpenClaw gateway source.
  • Impact: Operators who use `--since` can expect gateway records that the command does not collect, which can misdirect incident diagnosis.
  • Recommendation: Qualify the two-source statement with the `--since` exception, or change the supported `--since` path to collect the gateway source.
  • Verification: Read `showSandboxLogsWithDeps` in `src/lib/actions/sandbox/logs.ts` with a non-null `logsOptions.since` value.
  • Test coverage: Add a documentation or CLI behavior test that verifies the documented source behavior for `logs --since`.
  • Evidence: docs/reference/troubleshoot-mcp-servers.mdx:149 says `logs` reads both OpenClaw gateway output and OpenShell audit events. src/lib/actions/sandbox/logs.ts:227-229 skips `runOpenclawGatewayLogs` when `logsOptions.since` is set. src/commands/sandbox/logs.ts:35-37 exposes `--since` as a supported flag.

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@apurvvkumaria

Copy link
Copy Markdown
Collaborator

Follow-up: all 41 current checks now pass, including aggregate CI, DCO, documentation review, CodeQL, both automated advisor lanes, and the E2E rollup. Both actionable review threads are resolved, and the independent documentation review found no further corrections. Independent approval is the only remaining merge gate.

@jyaunches
jyaunches merged commit c6fc2a1 into main Aug 5, 2026
99 checks passed
@jyaunches
jyaunches deleted the fix/troubleshoot-mcp-logs-flag branch August 5, 2026 14:19
@cjagwani cjagwani mentioned this pull request Aug 5, 2026
23 tasks
cjagwani added a commit that referenced this pull request Aug 5, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Add the canonical dated changelog entry for the planned NemoClaw
v0.0.103 release.
The new `docs/changelog/2026-08-05.mdx` entry uses the exact `##
v0.0.103` heading and summarizes supported user-visible changes merged
since v0.0.102.

## Changes

- Add the parser-safe MDX SPDX header, three-paragraph release summary,
and detailed grouped bullets to `docs/changelog/2026-08-05.mdx`.
- Link each release-note group to the most specific published OpenClaw,
Hermes, or Deep Agents documentation routes.
- Exclude dormant MXC and Podman foundations, internal managed-inference
adapters, test-only changes, and maintainer tooling from the supported
product narrative.

### Source summary

- [#8082](#8082) ->
`docs/changelog/2026-08-05.mdx`: Document the new one-command agent
launch flow.
- [#8314](#8314) ->
`docs/changelog/2026-08-05.mdx`: Document managed vLLM host capability
validation and restart handling.
- [#8248](#8248) ->
`docs/changelog/2026-08-05.mdx`: Record the DGX Spark Qwen profile MTP
default change.
- [#8223](#8223) ->
`docs/changelog/2026-08-05.mdx`: Record explicit model preservation
across provider switches.
- [#8209](#8209) ->
`docs/changelog/2026-08-05.mdx`: Document corrected Windows WSL provider
selection.
- [#8316](#8316) ->
`docs/changelog/2026-08-05.mdx`: Record clean managed-checkout reuse
after installation.
- [#8239](#8239) ->
`docs/changelog/2026-08-05.mdx`: Record the packaged-service teardown
fallback.
- [#8247](#8247) ->
`docs/changelog/2026-08-05.mdx`: Document uninstall behavior for an
already-removed sandbox.
- [#7998](#7998) ->
`docs/changelog/2026-08-05.mdx`: Record preserved container-start
diagnostics.
- [#8027](#8027) ->
`docs/changelog/2026-08-05.mdx`: Record journal-backed not-ready repair
authority.
- [#7812](#7812) ->
`docs/changelog/2026-08-05.mdx`: Document actionable rebuild preflight
diagnostics.
- [#8222](#8222) ->
`docs/changelog/2026-08-05.mdx`: Record redacted top-level CLI failures.
- [#8313](#8313) ->
`docs/changelog/2026-08-05.mdx`: Record structured MCP bridge
destruction failures.
- [#8211](#8211) ->
`docs/changelog/2026-08-05.mdx`: Document cleanup of incomplete snapshot
captures.
- [#8212](#8212) ->
`docs/changelog/2026-08-05.mdx`: Document best-effort post-restore
policy reconciliation.
- [#8245](#8245) ->
`docs/changelog/2026-08-05.mdx`: Clarify manifest-defined OpenClaw
workspace persistence.
- [#8254](#8254) ->
`docs/changelog/2026-08-05.mdx`: Include corrected snapshot restore
selection guidance.
- [#8238](#8238) ->
`docs/changelog/2026-08-05.mdx`: Document preservation of managed MCP
policy entries.
- [#7568](#7568) ->
`docs/changelog/2026-08-05.mdx`: Record mutable-default Shields rollback
preservation.
- [#8200](#8200) ->
`docs/changelog/2026-08-05.mdx`: Record truthful Shields state after a
rejected transition.
- [#7895](#7895) ->
`docs/changelog/2026-08-05.mdx`: Record descriptor-bound Shields lock
inspection.
- [#7892](#7892) ->
`docs/changelog/2026-08-05.mdx`: Document the canonical Hermes dashboard
profile and migration.
- [#7871](#7871) ->
`docs/changelog/2026-08-05.mdx`: Document fail-closed Hermes cron
restore.
- [#7894](#7894) ->
`docs/changelog/2026-08-05.mdx`: Record the reset Hermes health budget
after recovery.
- [#8228](#8228) ->
`docs/changelog/2026-08-05.mdx`: Document Hermes build-time corporate CA
trust.
- [#8206](#8206) ->
`docs/changelog/2026-08-05.mdx`: Document bounded Deep Agents Code
failure classification.
- [#8297](#8297) ->
`docs/changelog/2026-08-05.mdx`: Record reuse of the published Deep
Agents Code base image.
- [#8321](#8321) ->
`docs/changelog/2026-08-05.mdx`: Document aligned endpoint SSRF
protections and userinfo rejection.
- [#8299](#8299) ->
`docs/changelog/2026-08-05.mdx`: Document the fail-closed `setpriv`
transition in managed images.
- [#7603](#7603) ->
`docs/changelog/2026-08-05.mdx`: Record corrected confidentiality-root
traversal.
- [#8334](#8334) ->
`docs/changelog/2026-08-05.mdx`: Record removal of the unsupported logs
audit example.
- [#8256](#8256) ->
`docs/changelog/2026-08-05.mdx`: Record reordered network-policy
walkthrough prerequisites.
- [#7767](#7767) ->
`docs/changelog/2026-08-05.mdx`: Record platform runtime shape
validation.

## 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
- [x] Existing tests cover changed behavior — justification: `npx vitest
run test/changelog-docs.test.ts` passed all 6 tests.
- [ ] Tests not applicable — justification:
- [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

- [ ] Documentation writer subagent reviewed the completed changes
- Result: `docs-updated`
- Evidence: `docs/changelog/2026-08-05.mdx` follows the release-prep and
documentation writing rules. The changelog contract tests passed 6/6,
and `npm run docs` completed with 0 errors and the repository's 2
existing Fern warnings.
- Agent: Codex Desktop
<!-- docs-review-head-sha: 66fcd80 -->
<!-- docs-review-agents-blob-sha: 3dd7c24 -->

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit: Not applicable.
- Station profile/scenario: Not applicable.
- Result: Not applicable.
- Supporting evidence: Not applicable.

## Verification

- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] 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
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — `npx vitest run
test/changelog-docs.test.ts`: 1 file and 6 tests passed.
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result: Not run for this doc-only
change.
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only) —
completed with 0 errors and 2 existing Fern warnings.
- [x] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)
— the native changelog uses the required parser-safe MDX SPDX comment
and does not use page frontmatter.

---
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>


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

## Summary by CodeRabbit

* **Documentation**
  * Added release notes for v0.0.103.
  * Documented the new `nemoclaw launch` command.
* Included updates covering onboarding, inference, installation,
recovery, snapshots, security, integrations, endpoint validation,
sandbox hardening, and related guidance.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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 release-target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Ubuntu 24.04][Docs] Troubleshoot MCP Servers documents unsupported logs --audit flag

3 participants