fix(cli): add sudo hint to debug dmesg-restricted message#4384
fix(cli): add sudo hint to debug dmesg-restricted message#4384jason-ma-nv wants to merge 3 commits into
Conversation
When `kernel.dmesg_restrict=1` and the user runs `nemoclaw debug` as non-root, the Kernel Messages section explained why the section was skipped but did not tell the user how to include kernel logs anyway. Extend `dmesgRestrictedMessage` to append a "Re-run with `sudo nemoclaw debug`" hint so users and triagers see a concrete next step, matching the spec in the bug's Suggested Fix. The TTY-aware `sudo -n dmesg` fallback from the same Suggested Fix is intentionally out of scope for this minimum-viable change. Export `dmesgRestrictedMessage` so the wording can be pinned by a unit test. Fixes #4366. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Jason Ma <jama@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR exports the Changesdmesg-Restricted Message Export and Testing
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Comment |
E2E Advisor RecommendationRequired E2E: Dispatch hint: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
E2E Scenario Advisor RecommendationRequired scenario E2E: None Full scenario advisor summaryE2E Scenario AdvisorBase: Required scenario E2E
Optional scenario E2E
Relevant changed files
|
PR Review AdvisorFindings: 0 needs attention, 2 worth checking, 0 nice ideas Review findings🛠️ Needs attention
🔎 Worth checking
🌱 Nice ideas
Since last review detailsCurrent findings:
This is an automated advisory review. A human maintainer must make the final merge decision. |
Summary
nemoclaw debugrunning as a non-root user withkernel.dmesg_restrict=1already explains in the Kernel Messages section thatdmesgis restricted, but it does not tell the user how to include kernel logs. Add a "Re-run withsudo nemoclaw debug" hint to the skipped message so users and triagers see a concrete next step, matching the spec in the issue's Suggested Fix. The optional TTY-awaresudo -n dmesgfallback in the same Suggested Fix is intentionally out of scope for this minimum-viable change.Related Issue
Fixes #4366.
Changes
src/lib/diagnostics/debug.ts: extenddmesgRestrictedMessageto append a second line —Re-run with `sudo nemoclaw debug` to include kernel logs in this report.— to the parenthetical block, and export the function so the wording can be unit-tested.src/lib/diagnostics/debug.test.ts: two new#4366tests asserting the message still explains why kernel messages were skipped and that it contains the sudo re-run hint.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesnpm run docsbuilds without warnings (doc changes only)Signed-off-by: Jason Ma jama@nvidia.com
Summary by CodeRabbit
New Features
Tests