fix(debug): drop redundant output hint (Fixes #1732)#1947
fix(debug): drop redundant output hint (Fixes #1732)#1947deepujain wants to merge 2 commits intoNVIDIA:mainfrom
Conversation
Fixes NVIDIA#1732 Signed-off-by: Deepak Jain <deepujain@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughExtracted completion-message logic into a new exported helper Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/lib/debug.test.ts (1)
54-67: Consider one integration-level assertion on final CLI output.These helper tests are solid, but a
runDebug({ output: ... })output assertion would better lock the user-visible behavior and catch future regressions from message sources outside this helper.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/lib/debug.test.ts` around lines 54 - 67, Add an integration-style assertion that verifies the final CLI output from runDebug matches the user-visible message from getDebugCompletionMessages; specifically, add a new test that calls runDebug({ output: "/tmp/nemoclaw-debug.tar.gz" }) (or the existing run helper) and asserts the stdout/stderr contains "Done. Tarball is ready to attach to your issue." to ensure message composition outside getDebugCompletionMessages doesn't regress. Locate the test suite around getDebugCompletionMessages and add a descriptive it("prints final tarball-ready message when output provided") that invokes runDebug with an output path and checks the process output for the exact string returned by getDebugCompletionMessages("/tmp/nemoclaw-debug.tar.gz").
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/lib/debug.ts`:
- Around line 461-464: The function getDebugCompletionMessages currently returns
the "Done. Tarball is ready to attach to your issue." confirmation even when an
`output` path is provided, causing a duplicate attachment confirmation; update
getDebugCompletionMessages(output?: string) so that when `output` is truthy it
does not include the attach confirmation (return an empty array or only
non-attachment messages), and only return the attach confirmation when `output`
is falsy—modify the function body accordingly to prevent the duplicate message.
---
Nitpick comments:
In `@src/lib/debug.test.ts`:
- Around line 54-67: Add an integration-style assertion that verifies the final
CLI output from runDebug matches the user-visible message from
getDebugCompletionMessages; specifically, add a new test that calls runDebug({
output: "/tmp/nemoclaw-debug.tar.gz" }) (or the existing run helper) and asserts
the stdout/stderr contains "Done. Tarball is ready to attach to your issue." to
ensure message composition outside getDebugCompletionMessages doesn't regress.
Locate the test suite around getDebugCompletionMessages and add a descriptive
it("prints final tarball-ready message when output provided") that invokes
runDebug with an output path and checks the process output for the exact string
returned by getDebugCompletionMessages("/tmp/nemoclaw-debug.tar.gz").
🪄 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: Pro Plus
Run ID: 4a78e628-60c4-48c3-b6be-055bc90e65b1
📒 Files selected for processing (2)
src/lib/debug.test.tssrc/lib/debug.ts
Fixes NVIDIA#1732 Signed-off-by: Deepak Jain <deepujain@gmail.com>
|
Trimmed the extra post-tarball guidance and added docstrings on the touched debug helpers. Build, CLI typecheck, and the focused debug tests all pass locally. |
fix(debug): drop redundant --output hint after tarball creation (Fixes #1732)
Summary
Fixes #1732.
nemoclaw debug --output ...already tells the user where the tarball was written, warns about redaction, and says to attach that file to the issue. The command then printed a second message telling the user to run the same command with--output, which was redundant and confusing.This change makes the completion text depend on whether a tarball was already written. When
--outputis present, the command now ends with a short confirmation instead of repeating the--outputexample.Changes
src/lib/debug.ts: add a small helper for the final debug messages and use it fromrunDebug().src/lib/debug.test.ts: add coverage for the completion message with and without--output.Testing
npm run build:clinpm run typecheck:clinpm test -- src/lib/debug.test.ts src/lib/debug-command.test.tsnpm testEvidence it works
nemoclaw debug --output ...no longer prints the redundant suggestion to rerun with--output.npm teststill hits unrelated pre-existing suite failures in this environment, including:test/install-preflight.test.tstest/legacy-path-guard.test.tssrc/lib/preflight.test.tssrc/lib/sandbox-version.test.tsSigned-off-by: Deepak Jain deepujain@gmail.com
Summary by CodeRabbit
Tests
Refactor