feat(cli): add structured logging with --debug and NEMOCLAW_LOG_LEVEL - #6272
Conversation
|
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:
📝 WalkthroughWalkthroughIntroduces centralized CLI logging with environment and flag-driven level handling, expanded secret redaction, hidden ChangesCLI Logging Feature
Estimated code review effort: 4 (Complex) | ~60 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
src/lib/cli/logger.ts (1)
85-114: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicate write logic across log methods;
debugObjectre-implements the prefix instead of reusing it.
error,warn,info,debugshare identical prefix/join/write logic, anddebugObject(Lines 110-113) duplicates the timestamp-prefix formatting rather than callingthis.prefix("debug"). Consider extracting a privatewrite(level, message)helper.♻️ Proposed refactor
- error(message: string, ...args: unknown[]): void { - if (!this.shouldLog("error")) return; - const parts = [this.prefix("error") + message, ...args.map(String)].join(" "); - process.stderr.write(parts + "\n"); - } - - warn(message: string, ...args: unknown[]): void { - if (!this.shouldLog("warn")) return; - const parts = [this.prefix("warn") + message, ...args.map(String)].join(" "); - process.stderr.write(parts + "\n"); - } - - info(message: string, ...args: unknown[]): void { - if (!this.shouldLog("info")) return; - const parts = [this.prefix("info") + message, ...args.map(String)].join(" "); - process.stderr.write(parts + "\n"); - } - - debug(message: string, ...args: unknown[]): void { - if (!this.shouldLog("debug")) return; - const parts = [this.prefix("debug") + message, ...args.map(String)].join(" "); - process.stderr.write(parts + "\n"); - } + private write(level: LogLevel, message: string, args: unknown[]): void { + if (!this.shouldLog(level)) return; + const parts = [this.prefix(level) + message, ...args.map(String)].join(" "); + process.stderr.write(parts + "\n"); + } + + error(message: string, ...args: unknown[]): void { + this.write("error", message, args); + } + + warn(message: string, ...args: unknown[]): void { + this.write("warn", message, args); + } + + info(message: string, ...args: unknown[]): void { + this.write("info", message, args); + } + + debug(message: string, ...args: unknown[]): void { + this.write("debug", message, args); + }🤖 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/cli/logger.ts` around lines 85 - 114, The logger methods duplicate the same prefix/join/write behavior, and debugObject also re-implements timestamp prefixing instead of reusing the shared formatting. Refactor src/lib/cli/logger.ts by extracting a private helper used by error, warn, info, and debug to centralize message writing, and update debugObject to build its output through the same prefix logic (via prefix("debug") or the new helper) so formatting stays consistent.src/lib/cli/nemoclaw-oclif-command.ts (1)
39-41: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winManual flag casts instead of relying on inferred flag types.
(flags as { debug?: boolean })/(flags as { quiet?: boolean })bypass whatever typethis.parse()already infers fromNemoClawCommand.baseFlags. Per oclif's documented base-command pattern, typedInferredFlags<typeof NemoClawCommand['baseFlags']>should giveflags.debug/flags.quietasbooleanwithout casting. Worth confirming whetherthis.parse(this.constructor as typeof NemoClawCommand)is producing well-typed output; if not, a typed parse signature would remove the need for these casts.🤖 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/cli/nemoclaw-oclif-command.ts` around lines 39 - 41, The debug/quiet checks in NemoClawCommand are using manual casts on the parsed flags instead of the inferred oclif types. Update the parsing in NemoClawCommand so `this.parse(this.constructor as typeof NemoClawCommand)` returns properly typed `flags` from `baseFlags` (for example via `InferredFlags<typeof NemoClawCommand['baseFlags']>` or a typed parse signature), then access `flags.debug` and `flags.quiet` directly without casts.
🤖 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 `@src/lib/cli/nemoclaw-oclif-command.ts`:
- Around line 37-42: The flag handling in NemoClawCommand.init currently applies
setDebug before setQuiet, so passing both --debug and --quiet causes quiet mode
to override debug output via logger.ts. Update the precedence in init so the
intended behavior is explicit: either apply setQuiet first and let setDebug win,
or add conditional logic that prevents quiet from downgrading an already-enabled
debug level. Use the existing symbols NemoClawCommand.init, log.setDebug, and
log.setQuiet to locate and adjust the flag order.
---
Nitpick comments:
In `@src/lib/cli/logger.ts`:
- Around line 85-114: The logger methods duplicate the same prefix/join/write
behavior, and debugObject also re-implements timestamp prefixing instead of
reusing the shared formatting. Refactor src/lib/cli/logger.ts by extracting a
private helper used by error, warn, info, and debug to centralize message
writing, and update debugObject to build its output through the same prefix
logic (via prefix("debug") or the new helper) so formatting stays consistent.
In `@src/lib/cli/nemoclaw-oclif-command.ts`:
- Around line 39-41: The debug/quiet checks in NemoClawCommand are using manual
casts on the parsed flags instead of the inferred oclif types. Update the
parsing in NemoClawCommand so `this.parse(this.constructor as typeof
NemoClawCommand)` returns properly typed `flags` from `baseFlags` (for example
via `InferredFlags<typeof NemoClawCommand['baseFlags']>` or a typed parse
signature), then access `flags.debug` and `flags.quiet` directly without casts.
🪄 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: bba386e9-24ba-42ac-8661-4198f97b7147
📒 Files selected for processing (3)
src/lib/cli/logger.test.tssrc/lib/cli/logger.tssrc/lib/cli/nemoclaw-oclif-command.ts
19b6fe2 to
7983f50
Compare
cv
left a comment
There was a problem hiding this comment.
The eager base init parsing breaks strict=false passthrough commands: CI shows uninstall --yes and sandbox --agent or -m rejected. Global -q also conflicts with debug --quick; quiet behavior does not match the documented warn-plus-error contract; and the new env vars are undocumented. Restore CLI compatibility, resolve the flag collision and docs parity, and return CI to green.
7983f50 to
c2b51cf
Compare
Introduces src/lib/cli/logger.ts — a singleton Logger class with four levels (error < warn < info < debug) written exclusively to stderr so stdout remains clean for --json consumers. - `NEMOCLAW_LOG_LEVEL=debug` env var sets level at process start - `--debug` flag (inherited by all commands via NemoClawCommand.baseFlags) activates debug level and ISO-8601 timestamp prefixes - `-q / --quiet` flag suppresses info; shows only warn+error - `NEMOCLAW_DEBUG=1` and `DEBUG=*nemoclaw*` also activate debug level NemoClawCommand.init() reads both flags and configures the singleton before any command's run() method executes, so subcommands see the correct level without needing to parse flags themselves. Adds unit tests covering all level transitions and env-var pickup. Gradual migration of existing console.log/console.error call sites to log.info/log.error can be done incrementally on separate branches. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
c2b51cf to
6aad973
Compare
|
✨ Thanks for the PR. This adds structured logging with Related open PRs: |
apurvvkumaria
left a comment
There was a problem hiding this comment.
Requesting changes on current head 6aad9731c.
The earlier eager-parse and debug -q collision regressions are improved, but this head still introduces unsafe logging behavior, crosses passthrough argument ownership, fails a required documentation gate, and lacks regression coverage for the new initialization path. Please address the inline findings and run the required CI before reconsidering.
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
|
/ok to test 32d8bad |
|
@coderabbitai review |
✅ Action performedReview finished.
|
apurvvkumaria
left a comment
There was a problem hiding this comment.
Re-reviewed head 32d8bad. The requested redaction boundary, non-throwing serialization, passthrough argument ownership, user-facing documentation, and idempotent logger configuration are implemented with regression coverage. Targeted validation and the full GitHub Actions matrix are green.
There was a problem hiding this comment.
🧹 Nitpick comments (2)
src/commands/sandbox/exec.test.ts (1)
37-49: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winStrengthen the assertion to prove the baseline was actually applied.
Only negative assertions are made on
configure. Iflog.configurewere never called at all (e.g., a regression removing theinit()/parse()wiring), this test would still pass. Add the positive assertion, mirroringagent.test.ts.♻️ Suggested addition
+ expect(configure).toHaveBeenCalledWith({ debug: false, quiet: false }); expect(configure).not.toHaveBeenCalledWith({ debug: true, quiet: false }); expect(configure).not.toHaveBeenCalledWith({ debug: false, quiet: true });🤖 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/commands/sandbox/exec.test.ts` around lines 37 - 49, The test around SandboxExecCommand.run only checks that log.configure is not called with the flag values, so it can still pass if configuration is never invoked at all. Update the assertion in this spec to explicitly verify the baseline call to log.configure, matching the pattern used in agent.test.ts, while keeping the existing negative checks for the post--- logging flags.Source: Path instructions
src/commands/simple-global-oclif-adapters.test.ts (1)
135-146: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winSame vacuous-assertion gap as noted in
exec.test.ts.Only a negative assertion on
configureis made; add the positive baseline assertion so the test can't pass ifconfigureis never invoked.♻️ Suggested addition
+ expect(configure).toHaveBeenCalledWith({ debug: false, quiet: false }); expect(configure).not.toHaveBeenCalledWith({ debug: false, quiet: true });🤖 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/commands/simple-global-oclif-adapters.test.ts` around lines 135 - 146, The test in DebugCliCommand only checks that log.configure is not called with the quiet-mode options, so it can still pass if configure is never called at all. Update the assertion around the configure spy in the DebugCliCommand.run path to include a positive baseline call expectation, alongside the existing negative check, so the test verifies configure is actually invoked and scoped correctly for quick diagnostics.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/commands/sandbox/exec.test.ts`:
- Around line 37-49: The test around SandboxExecCommand.run only checks that
log.configure is not called with the flag values, so it can still pass if
configuration is never invoked at all. Update the assertion in this spec to
explicitly verify the baseline call to log.configure, matching the pattern used
in agent.test.ts, while keeping the existing negative checks for the post---
logging flags.
In `@src/commands/simple-global-oclif-adapters.test.ts`:
- Around line 135-146: The test in DebugCliCommand only checks that
log.configure is not called with the quiet-mode options, so it can still pass if
configure is never called at all. Update the assertion around the configure spy
in the DebugCliCommand.run path to include a positive baseline call expectation,
alongside the existing negative check, so the test verifies configure is
actually invoked and scoped correctly for quick diagnostics.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 7b6c8ea7-5fd8-4ec1-9441-d871e7634c71
📒 Files selected for processing (11)
docs/reference/commands-nemohermes.mdxdocs/reference/commands.mdxsrc/commands/sandbox/agent.test.tssrc/commands/sandbox/exec.test.tssrc/commands/simple-global-oclif-adapters.test.tssrc/lib/cli/logger.test.tssrc/lib/cli/logger.tssrc/lib/cli/nemoclaw-oclif-command.test.tssrc/lib/cli/nemoclaw-oclif-command.tssrc/lib/security/redact.test.tssrc/lib/security/redact.ts
💤 Files with no reviewable changes (2)
- src/lib/security/redact.test.ts
- src/lib/security/redact.ts
✅ Files skipped from review due to trivial changes (2)
- docs/reference/commands.mdx
- docs/reference/commands-nemohermes.mdx
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
|
/ok to test 5ac42be |
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
|
@coderabbitai review |
|
/ok to test 935aa56 |
✅ Action performedReview finished.
|
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@src/lib/security/redact.ts`:
- Around line 314-317: Update isSensitiveKey so it also treats run-together API
key variants like APIKEY and apikey as sensitive, not just separate api/key
tokens. Add an explicit combined-name check or reuse the existing env-name
matching logic inside redact.ts so values stored under those keys are redacted
by the same path as the current SENSITIVE_KEY_WORDS and
words.includes("api")/words.includes("key") checks.
🪄 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: 4400dfd9-b623-4708-81bc-36df0ba2a4be
📒 Files selected for processing (2)
src/lib/security/redact.test.tssrc/lib/security/redact.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/lib/security/redact.test.ts
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
|
@coderabbitai review |
|
/ok to test 844fcf0 |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
Introduces src/lib/cli/logger.ts — a singleton Logger class with four levels (error < warn < info < debug) written exclusively to stderr so stdout remains clean for --json consumers. - `NEMOCLAW_LOG_LEVEL=debug` env var sets level at process start - `--debug` flag (inherited by all commands via NemoClawCommand.baseFlags) activates debug level and ISO-8601 timestamp prefixes - `-q / --quiet` flag suppresses info; shows only warn+error - `NEMOCLAW_DEBUG=1` and `DEBUG=*nemoclaw*` also activate debug level NemoClawCommand.init() reads both flags and configures the singleton before any command's run() method executes, so subcommands see the correct level without needing to parse flags themselves. Adds unit tests covering all level transitions and env-var pickup. Gradual migration of existing console.log/console.error call sites to log.info/log.error can be done incrementally on separate branches. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Head branch was pushed to by a user without write access
844fcf0 to
5f39fc8
Compare
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
|
/ok to test 7f9411a |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Introduces src/lib/cli/logger.ts — a singleton Logger class with four levels (error < warn < info < debug) written exclusively to stderr so stdout remains clean for --json consumers. - `NEMOCLAW_LOG_LEVEL=debug` env var sets level at process start - `--debug` flag (inherited by all commands via NemoClawCommand.baseFlags) activates debug level and ISO-8601 timestamp prefixes - `-q / --quiet` flag suppresses info; shows only warn+error - `NEMOCLAW_DEBUG=1` and `DEBUG=*nemoclaw*` also activate debug level NemoClawCommand.init() reads both flags and configures the singleton before any command's run() method executes, so subcommands see the correct level without needing to parse flags themselves. Adds unit tests covering all level transitions and env-var pickup. Gradual migration of existing console.log/console.error call sites to log.info/log.error can be done incrementally on separate branches. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
7f9411a to
7ff951f
Compare
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
|
@coderabbitai review |
|
Maintainer note: please do not force-push this branch. The force-pushes at 04:01 and 04:59 UTC dropped resolved security and correctness fixes and invalidated green exact-head CI. I restored the reviewed history append-only without rewriting your commits. Please use normal pushes, or coordinate with maintainers before rewriting this branch again. |
|
/ok to test a488c8c |
✅ Action performedReview finished.
|
Resolved on exact tree a488c8c: parser-owned flags respect strict-false and -- passthrough ownership; debug/quiet are mutually exclusive without the -q collision; environment controls are documented; redaction/serialization/reset coverage is present; all review threads are resolved; and the exact-tree security audit plus 205 focused/integration tests passed. Approval remains withheld pending exact-head CI and advisor disposition.
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary Adds the pre-tag v0.0.79 release notes entry to `docs/about/release-notes.mdx` so the release plan can be generated after docs merge. The entry summarizes the merged v0.0.79 release train across inference, diagnostics, runtime hardening, policies, onboarding recovery, and release validation. ## Changes - Added the v0.0.79 release notes section with linked follow-up documentation for OpenRouter onboarding, managed vLLM changes, completion and logging, Deep Agents runtime limits, policy updates, onboarding recovery, and release validation. - Source summary: - #6461 -> `docs/about/release-notes.mdx`: Documents OpenRouter onboarding support and links to inference/provider references. - #6271 and #6272 -> `docs/about/release-notes.mdx`: Documents shell completion and structured logging highlights. - #6465, #6539, #6570, and #6528 -> `docs/about/release-notes.mdx`: Documents status route-drift, orphaned sandbox, gateway cleanup, and DGX Spark express-install diagnostics. - #6523, #6551, #6484, #6488, #6324, and #6542 -> `docs/about/release-notes.mdx`: Documents managed vLLM, Qwen3.6 tool parser, compaction, and timeout/readiness improvements. - #6559, #6538, #6560, #6568, #6552, #6567, and #6587 -> `docs/about/release-notes.mdx`: Documents runtime, credential, proxy, PID namespace, TOML, and provider-state hardening. - #6541, #5415, #6246, #6496, and #6573 -> `docs/about/release-notes.mdx`: Documents GitHub policy, Gmail policy, MCP allowlist, WhatsApp, and messaging-variant updates. - #6253, #6572, #6444, #6536, and #5860 -> `docs/about/release-notes.mdx`: Documents onboarding resume and create-step recovery improvements. - #6508, #6527, #5506, #6588, #6446, #6447, #6582, #6296, #6367, #6397, and #6505 -> `docs/about/release-notes.mdx`: Documents docs, release-risk, and E2E validation updates. ## 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 <!-- Check exactly one tests line and one docs line. Check other lines when applicable. Add every requested justification or approval reference. --> - [ ] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [x] Tests not applicable — justification: Release-note prose only. - [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: ## Verification <!-- Check each applicable item only when supported by the requested evidence. Run targeted tests once per relevant change set and rerun after later edits or hook autofixes that can affect the tested behavior. Do not rerun hook-covered checks. --> - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run check:diff` passed when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result or justification: Tests not applicable, release-note prose only. - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — command/result: - [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) - [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) Docs validation note: `npm run docs:check-agent-variants && npm run docs:check-routes && git diff --check` passed. Full `npm run docs` is currently blocked before Fern validation because the pinned `fern-api@5.65.2` package is unavailable from npm (`ETARGET No matching version found`). --- <!-- DCO sign-off is required in this PR description, and every commit must appear as Verified in GitHub. Run: git config user.name && git config user.email --> Signed-off-by: Julie Yaunches <jyaunches@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added release notes for v0.0.79 with a new summary of recent improvements, including onboarding and inference options, operator/CLI diagnostics, sandbox recovery hardening, runtime limits, network policy behavior, and release validation updates. * Added updated references and links for the latest release. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
…NVIDIA#6272) <!-- markdownlint-disable MD041 --> ## Summary Introduces a centralized CLI logging facility with `error`, `warn`, `info`, and `debug` levels written exclusively to `stderr`. Logging can be configured with `NEMOCLAW_LOG_LEVEL`, `NEMOCLAW_DEBUG`, or hidden long-form `--debug` and `--quiet` flags on commands whose oclif parser owns those options. The logger now uses NemoClaw's shared credential taxonomy as a non-throwing redaction boundary for messages, split arguments, structured values, and argv arrays. Parser-owned flags do not acquire host meaning after `--`, and raw passthrough commands preserve downstream arguments unchanged. The generic `DEBUG` variable is intentionally not a NemoClaw logger control because oclif can emit raw argv before NemoClaw's redaction boundary. The command reference directs users to the NemoClaw-specific controls instead. Replaces NVIDIA#6268, which was closed while it still carried unrelated changes. Existing `console.*` call sites remain unchanged so migration to leveled logging can proceed incrementally. ## Changes - Add `src/lib/cli/logger.ts` with leveled output, deterministic environment precedence, reversible configuration, and non-throwing serialization for circular values, BigInt, Error, Map, and Set. - Add hidden, mutually exclusive `--debug` and `--quiet` base flags without claiming a global `-q` shorthand. - Configure host logging from oclif parser output while preserving strict-false passthrough and `--` argument ownership. - Expand shared log redaction for canonical credential fields, uppercase environment keys, private/session keys, Basic/Digest/proxy authorization, cookies, split logger arguments, and inline or positional argv credentials. Public-key, author, and OAuth labels remain visible. - Document logging controls, precedence, passthrough behavior, and the generic `DEBUG` risk in the canonical command reference and synchronized Hermes variant. - Add unit and integration regressions for credential disclosure paths, serializer and sink failures, environment precedence, singleton reset, passthrough ownership, uninstall forwarding, existing quiet flags, and `debug -q`. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [x] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates <!-- Check all that apply. For any "covered by existing tests", "not applicable", or waiver entry, add a brief justification on the same line or in the Changes section. --> - [x] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [ ] Tests not applicable — justification: - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [x] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [x] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: maintainer security review and requested changes in NVIDIA#6272 (review); fixes applied through `a3ab263da` and independently re-audited. - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Verification <!-- Check each item you ran and confirmed. Leave unchecked items you skipped. Doc-only changes do not require npm test unless you ran it. --> - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Git hooks passed during commit and push, or `npx prek run --from-ref main --to-ref HEAD` passes - [x] Targeted tests pass for changed behavior - [ ] Full `npm test` passes (broad runtime changes only) - [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) - [x] Doc pages follow the style guide (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) Verification detail: - Pre-commit and pre-push hooks pass, including repository checks, environment-variable documentation, gitleaks, commitlint, and CLI TypeScript. - `npm run typecheck:cli` and `npm run build:cli` pass. - Focused logger, redaction, parser, passthrough, and command-adapter tests pass (104/104). - Broader redaction consumers pass (94/94), and compiled diagnostic redaction passes (41/41). - Both observed CI-shard regressions were reproduced locally and fixed: provenance now preserves line boundaries during redaction, while valid Basic/Bearer headers retain later same-line diagnostics. Exact split-label matching also preserves ordinary diagnostic prose while still redacting credential labels and flags. The final focused redaction/logger/provenance/inference set passes (66/66), broader redaction consumers pass (100/100), and compiled OpenClaw integration passes (13/13) after the latest merge from `main`. - Adversarial probes cover uppercase/private/session fields, Basic/Digest/proxy authorization, cookies, split arguments, inline and positional argv, dash-prefixed opaque values, and safe public-key/author/OAuth exceptions. - Debug CLI integration passes (11 passed, 1 platform-dependent test skipped). - Test-size and test-title gates pass. - `npm run docs` passes with 0 Fern errors and 2 pre-existing Fern warnings; documentation review found no additional pages requiring changes. --- Signed-off-by: sauravdev <saurava@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Introduced centralized CLI stderr logging with `NEMOCLAW_LOG_LEVEL` / `NEMOCLAW_DEBUG`, quiet/debug modes, and timestamped debug output. * Added structured `debugObject` output plus sequence-aware redaction for log-like values. * **Bug Fixes** * Improved `--debug`/`--quiet` interactions with environment precedence and `--` option boundaries; ensured stderr write failures don’t break commands. * **Security** * Strengthened credential redaction for headers/cookies and sensitive CLI flag values, including “fails closed” handling. * **Documentation** * Documented logging environment variables, precedence, and hidden flag behavior. * **Tests** * Expanded coverage for parsing, robustness (complex serialization), redaction correctness, and mock isolation. <!-- 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: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Apurv Kumaria <akumaria@nvidia.com> Co-authored-by: Carlos Villela <cvillela@nvidia.com> Co-authored-by: cjagwani <cjagwani@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary Adds the pre-tag v0.0.79 release notes entry to `docs/about/release-notes.mdx` so the release plan can be generated after docs merge. The entry summarizes the merged v0.0.79 release train across inference, diagnostics, runtime hardening, policies, onboarding recovery, and release validation. ## Changes - Added the v0.0.79 release notes section with linked follow-up documentation for OpenRouter onboarding, managed vLLM changes, completion and logging, Deep Agents runtime limits, policy updates, onboarding recovery, and release validation. - Source summary: - NVIDIA#6461 -> `docs/about/release-notes.mdx`: Documents OpenRouter onboarding support and links to inference/provider references. - NVIDIA#6271 and NVIDIA#6272 -> `docs/about/release-notes.mdx`: Documents shell completion and structured logging highlights. - NVIDIA#6465, NVIDIA#6539, NVIDIA#6570, and NVIDIA#6528 -> `docs/about/release-notes.mdx`: Documents status route-drift, orphaned sandbox, gateway cleanup, and DGX Spark express-install diagnostics. - NVIDIA#6523, NVIDIA#6551, NVIDIA#6484, NVIDIA#6488, NVIDIA#6324, and NVIDIA#6542 -> `docs/about/release-notes.mdx`: Documents managed vLLM, Qwen3.6 tool parser, compaction, and timeout/readiness improvements. - NVIDIA#6559, NVIDIA#6538, NVIDIA#6560, NVIDIA#6568, NVIDIA#6552, NVIDIA#6567, and NVIDIA#6587 -> `docs/about/release-notes.mdx`: Documents runtime, credential, proxy, PID namespace, TOML, and provider-state hardening. - NVIDIA#6541, NVIDIA#5415, NVIDIA#6246, NVIDIA#6496, and NVIDIA#6573 -> `docs/about/release-notes.mdx`: Documents GitHub policy, Gmail policy, MCP allowlist, WhatsApp, and messaging-variant updates. - NVIDIA#6253, NVIDIA#6572, NVIDIA#6444, NVIDIA#6536, and NVIDIA#5860 -> `docs/about/release-notes.mdx`: Documents onboarding resume and create-step recovery improvements. - NVIDIA#6508, NVIDIA#6527, NVIDIA#5506, NVIDIA#6588, NVIDIA#6446, NVIDIA#6447, NVIDIA#6582, NVIDIA#6296, NVIDIA#6367, NVIDIA#6397, and NVIDIA#6505 -> `docs/about/release-notes.mdx`: Documents docs, release-risk, and E2E validation updates. ## 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 <!-- Check exactly one tests line and one docs line. Check other lines when applicable. Add every requested justification or approval reference. --> - [ ] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [x] Tests not applicable — justification: Release-note prose only. - [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: ## Verification <!-- Check each applicable item only when supported by the requested evidence. Run targeted tests once per relevant change set and rerun after later edits or hook autofixes that can affect the tested behavior. Do not rerun hook-covered checks. --> - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run check:diff` passed when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result or justification: Tests not applicable, release-note prose only. - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — command/result: - [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) - [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) Docs validation note: `npm run docs:check-agent-variants && npm run docs:check-routes && git diff --check` passed. Full `npm run docs` is currently blocked before Fern validation because the pinned `fern-api@5.65.2` package is unavailable from npm (`ETARGET No matching version found`). --- <!-- DCO sign-off is required in this PR description, and every commit must appear as Verified in GitHub. Run: git config user.name && git config user.email --> Signed-off-by: Julie Yaunches <jyaunches@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added release notes for v0.0.79 with a new summary of recent improvements, including onboarding and inference options, operator/CLI diagnostics, sandbox recovery hardening, runtime limits, network policy behavior, and release validation updates. * Added updated references and links for the latest release. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary
Introduces a centralized CLI logging facility with
error,warn,info, anddebuglevels written exclusively tostderr. Logging can be configured withNEMOCLAW_LOG_LEVEL,NEMOCLAW_DEBUG, or hidden long-form--debugand--quietflags on commands whose oclif parser owns those options.The logger now uses NemoClaw's shared credential taxonomy as a non-throwing redaction boundary for messages, split arguments, structured values, and argv arrays. Parser-owned flags do not acquire host meaning after
--, and raw passthrough commands preserve downstream arguments unchanged.The generic
DEBUGvariable is intentionally not a NemoClaw logger control because oclif can emit raw argv before NemoClaw's redaction boundary. The command reference directs users to the NemoClaw-specific controls instead.Replaces #6268, which was closed while it still carried unrelated changes. Existing
console.*call sites remain unchanged so migration to leveled logging can proceed incrementally.Changes
src/lib/cli/logger.tswith leveled output, deterministic environment precedence, reversible configuration, and non-throwing serialization for circular values, BigInt, Error, Map, and Set.--debugand--quietbase flags without claiming a global-qshorthand.--argument ownership.DEBUGrisk in the canonical command reference and synchronized Hermes variant.debug -q.Type of Change
Quality Gates
a3ab263daand independently re-audited.Verification
Verifiedin GitHubnpx prek run --from-ref main --to-ref HEADpassesnpm testpasses (broad runtime changes only)npm run docsbuilds without warnings (doc changes only)Verification detail:
npm run typecheck:cliandnpm run build:clipass.main.npm run docspasses with 0 Fern errors and 2 pre-existing Fern warnings; documentation review found no additional pages requiring changes.Signed-off-by: sauravdev saurava@nvidia.com
Signed-off-by: Apurv Kumaria akumaria@nvidia.com
Summary by CodeRabbit
NEMOCLAW_LOG_LEVEL/NEMOCLAW_DEBUG, quiet/debug modes, and timestamped debug output.debugObjectoutput plus sequence-aware redaction for log-like values.--debug/--quietinteractions with environment precedence and--option boundaries; ensured stderr write failures don’t break commands.