Skip to content

docs: fix backup-all copyable example and add regression test (#4754)#5045

Merged
cv merged 2 commits into
NVIDIA:mainfrom
Thabhelo:test/docs-copyable-blocks-4754
Jun 9, 2026
Merged

docs: fix backup-all copyable example and add regression test (#4754)#5045
cv merged 2 commits into
NVIDIA:mainfrom
Thabhelo:test/docs-copyable-blocks-4754

Conversation

@Thabhelo

@Thabhelo Thabhelo commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the last copyable-command violation missed by #4759 in backup-restore.mdx and adds a repo-wide regression test so fenced bash/console blocks cannot reintroduce $ shell prompts.

Related Issue

Fixes #4754

Changes

  • Change backup-restore.mdx backup-all example from console + $ nemoclaw backup-all to bash + $$nemoclaw backup-all per docs/CONTRIBUTING.md.
  • Add test/docs-copyable-command-blocks.test.ts to scan all docs/**/*.mdx for $ prompt prefixes in copyable fences.

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)

Verification

  • npx prek run --all-files passes
  • npm test passes
  • Tests added or updated for new or changed behavior
  • No secrets, API keys, or credentials committed
  • Docs updated for user-facing behavior changes
  • 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: Thabhelo 50872400+Thabhelo@users.noreply.github.com

Summary by CodeRabbit

  • Documentation
    • Updated backup and restore documentation examples with corrected command syntax and enhanced code block formatting standards.

…#4754)

NVIDIA#4759 standardized most copyable command blocks; backup-restore.mdx still
used a `$` shell prompt. Fix the last violation and scan all docs for
regressions.

Signed-off-by: Thabhelo <50872400+Thabhelo@users.noreply.github.com>
@copy-pr-bot

copy-pr-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Jun 9, 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: 3733b6f3-e109-4e5c-9680-67117523d21d

📥 Commits

Reviewing files that changed from the base of the PR and between 2edd531 and 594f073.

📒 Files selected for processing (2)
  • docs/manage-sandboxes/backup-restore.mdx
  • test/docs-copyable-command-blocks.test.ts

📝 Walkthrough

Walkthrough

This PR addresses issue #4754 by implementing validation that copyable command blocks in documentation do not include shell prompt prefixes ($ ) that would break terminal paste operations. A new test scans all .mdx documentation files, parses fenced code blocks, and flags violations in copyable languages. One documentation example is updated to comply with the rule.

Changes

Documentation Prompt Cleanup and Validation

Layer / File(s) Summary
Test infrastructure and prompt validation
test/docs-copyable-command-blocks.test.ts
Vitest test module with collectFencedBlocks() (parses markdown fenced code blocks with language tags and line tracking), listDocMdxFiles() (recursively finds .mdx files in docs while skipping build artifacts), and the main test that iterates all docs, filters to copyable languages (bash, sh, powershell, console, empty), checks each line for leading $ prompt patterns, and fails if any violations are found.
Documentation example compliance
docs/manage-sandboxes/backup-restore.mdx
The backup-all example is updated from a console fenced code block with $ nemoclaw backup-all to a bash fenced code block with $$nemoclaw backup-all, removing the shell prompt prefix from copyable content.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#4759: Standardizes copyable-command documentation rules and applies related formatting updates to the same backup-restore.mdx file.
  • NVIDIA/NemoClaw#4164: Introduces the nemoclaw backup-all workflow in the same backup-restore.mdx file.

Suggested labels

area: docs, bug-fix

Suggested reviewers

  • cv

Poem

🐰 A prompt slipped past—the $ did hide,
Where copyable blocks should cleanly glide.
Now tests stand guard with watchful eye,
No stray $ marks shall sneak on by! ✨

🚥 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: fixing a copyable example in backup-restore.mdx and adding a regression test for copyable command blocks.
Linked Issues check ✅ Passed The PR addresses the core requirements from #4754: fixes the backup-all copyable example by removing the shell prompt, and adds a regression test to prevent reintroduction of leading '$ ' in copyable blocks.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the linked issue #4754: the backup-restore.mdx fix targets a specific violation, and the regression test prevents future violations.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@cv cv merged commit 60d6276 into NVIDIA:main Jun 9, 2026
30 checks passed
jyaunches pushed a commit that referenced this pull request Jun 10, 2026
## Summary
- Add v0.0.62 release notes from Discussion #5100 and link release
highlights to the relevant docs pages.
- Document the release's GPU sandbox recreation, sandbox-side local
inference verification, and Hermes dashboard port guard in the command
and inference references.
- Refresh generated NemoClaw user skills for the release-prep docs set.

## Source Summary
- #4956 -> `docs/reference/commands.mdx`: Document CDI-first Docker GPU
recreation behavior for Linux Docker-driver sandboxes.
- #5024 -> `docs/inference/use-local-inference.mdx`: Document
sandbox-runtime verification of the `inference.local` local inference
route.
- #5018 -> `docs/reference/commands.mdx`: Document Jetson/Tegra
device-node group propagation for sandbox CUDA initialization.
- #5012, #4763, #4706, #5030, #5015 -> `docs/about/release-notes.mdx`:
Summarize onboarding and recovery reliability fixes, including the
reserved Hermes API port guard.
- #5017 and #5043 -> `docs/about/release-notes.mdx`,
`docs/reference/commands.mdx`: Summarize mutable OpenClaw config
recovery and host-side `agents list` coverage.
- #5010 and #5016 -> `docs/about/release-notes.mdx`: Summarize Hermes
upstream metadata visibility and WhatsApp QR rendering reliability.
- #5045 and prior source docs in the v0.0.62 range -> `.agents/skills/`:
Refresh generated user-skill references from the current docs source.

## Skipped
- #5019 -> skipped for new prose because it touched
`openclaw-sandbox-permissive.yaml`, which matches `docs/.docs-skip`.
Existing source docs remain the source for generated skill
synchronization.

## Verification
- `python3 scripts/docs-to-skills.py docs/ .agents/skills/ --prefix
nemoclaw-user --doc-platform fern-mdx`
- `npm run docs` (passes; Fern reports 0 errors and 1 hidden warning)
- Pre-commit hooks passed during commit, including docs-to-skills
verification, markdown lint, gitleaks, and skills YAML tests.

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

* **New Features**
  * Added `nemoclaw <name> agents list` command.
* v0.0.62 release notes added summarizing onboarding and recovery
improvements.

* **Bug Fixes**
* Improved GPU sandbox onboarding reliability (NVIDIA CDI path,
Jetson/Tegra device handling).
* Better local inference verification and recovery for Linux
Docker-driver GPU sandboxes.
  * Quieter/earlier handling of onboarding drift and port collisions.

* **Documentation**
* Expanded GPU passthrough, inference verification, writable paths
(`/dev/pts`), port 8642 restriction, and command examples.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Prekshi Vyas <34834085+prekshivyas@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v0.0.62 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[All Platforms][Docs] console copy buttons include leading "$ " prompt that breaks paste

3 participants